Recover the corresponding tree with Pr¨ufer code (1, 3, 5, 7, 6, 1, 6, 4).
Graph Theory

Recover the corresponding tree with Pr¨ufer code (1, 3, 5, 7, 6, 1, 6, 4).

728x90
반응형

Length of prufer code is 8. Thus tree have 10 vertices. I defined set of degree of each vertices D. Every vertex initially has a degree of 1, and the degree of each vertex that
appears in the prufer code increases by the number of times it appears. Thus, the degree
set can be defined as D = (3, 1, 2, 2, 2, 3, 2, 1, 1, 1). From the prufer code and D, tree can
be constructed through the following process, as shown in the picture below.

 

728x90
반응형