prufer code
Recover the corresponding tree with Pr¨ufer code (1, 3, 5, 7, 6, 1, 6, 4).
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 thatappears in the prufer code increases by the number of times it appears. Thus, the degreeset can be defined as D = (3, 1, 2, 2, 2, 3, 2, 1, 1, 1). From the prufer code and D, tree canbe constructed through the following pro..
Prufer code에 대하여
u는 독일어 움라우트 표기해야한다.prufer code는 트리구조를 인코딩하는 방법으로 n개 정점을 가진 트리를 n-2개 정수로 표현한다.트리로부터 프뤼퍼코드를 생성하거나 프뤼버코드로부터 트리를 생성하는 예제는 2024 그래프이론 퀴즈와 중간고사 모두에서 출제되었으므로 후배님들은 확인해보길바란다. 그냥 공부했던 내용을 기록하기 위해 붙여둔다.