1. \ (Prufer \) defined sequence
\ (prufer \) sequence is a sequence corresponding to a tree without roots, focusing on an unrooted tree corresponds to a unique prufer sequence (do not ask me how license)
The unrooted tree into \ (Prufer \) sequence of steps:
- The minimum number of leaf nodes deleted
- The node connected to this node in the added sequence
- Repeat \ (2 \) , the tree until only two nodes
2. \ (Prufer \) to achieve sequence
Let's ask what \ (prefer \) sequence
We look at the picture above
First, we remove the lowest numbered leaf node \ (4 \) , and node \ (2 \) added to the sequence
\ (prufer \) sequence: \ (2 \)
We removed the minimum number of leaf nodes \ (5 \) , the node \ (2 \) to join sequence
\ (prufer \) sequence: \ (2,2 \)
We removed the minimum number of leaf nodes \ (2 \) , the node \ (1 \) to join sequence
\ (prufer \) sequence: \ (2,2,1 \)
We removed the minimum number of leaf nodes \ (1 \) (no root), the node \ (3 \) adding sequence
\ (prufer \) sequence: \ (2,2,1,3 \)
We removed the minimum number of leaf nodes \ (6 \) , the node \ (3 \) adding sequence
\ (prufer \) sequence: \ (2,2,1,3,3 \)
Finally, only node \ (3,7 \) , thus completing \ (prufer \) to achieve sequence
3. \ (Prufer \) Nature sequence
- \ (prufer \) sequence number appears in a number of its degrees \ (--1 \)
- A number of nodes \ (n-\) unrooted tree \ (Prufer \) sequence length must be \ (n-2 \)