728x90
반응형
Solution
1. Prufer code contains only one value
Let the Prufer code .
Steps*:
Number of vertices:
- The Prufer code has a length of , so the tree has vertices. These vertices are .
Decoding the Prufer code:
- In each step of the decoding process, the smallest leaf is selected and is made adjacent to the vertex corresponding to the first value in the Prufer code.
- Since the Prufer code consists entirely of the value , each leaf will be adjacent to vertex .
Center vertex :
- During the decoding process, all other vertices are sequentially removed as leaves, each connecting to vertex .
- At the end of the decoding process, the only remaining vertex with a degree higher than 1 is vertex .
- This means that all the other vertices are leaves adjacent to .
Conclusion:
- The resulting tree is a star tree, where the center vertex is .
2. Prufer code contains exactly two values
- If the Prufer code alternates between two values and , like , then:
- Vertices and are adjacent to each other.
- Both and have multiple leaves connected to them.
3. Prufer code contains distinct values in all positions
Steps:
- Each value in the Prufer code represents the vertex adjacent to a leaf that is being removed from the tree.
- If all values in the Prufer code are distinct, then every time a leaf is removed, a new leaf appears, and each vertex can become a leaf only once.
- The structure of the tree is formed linearly because:
- No branching occurs.
- No new leaves are created.
Conclusion:
- When the Prufer code finishes, the remaining two vertices are adjacent, forming the final edge in the tree.
- The resulting tree is a single straight path.
728x90
반응형