R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.3 CAYLEY’S THEOREM – משפט קיילי מבוסס על הספר : S. Even, "Graph Algorithms", Computer Science Press, 1979 שקפים, ספר וחומר רלוונטי נוסף באתר הקורס : Slides, book and other related material at:
R. Bar-Yehuda © CAYLEY’S THEOREM משפט קיילי Theorem 2.4: The number of spanning trees for n distinct vertices is n n-2. Proof: )Prüfer( Assume V = {1, 2,..., n}. Let us display a one-to-one correspondence between the set of the spanning trees and the n n-2 words of length n – 2 over the alphabet {1, 2,..., n}. The algorithm for finding the word which corresponds to a given tree is as follows:
R. Bar-Yehuda © 3 Theorem 2.4: The number of spanning trees for n distinct vertices is n n-2. V = {1, 2,..., n} קלט: עץ עם צמתים: {1, 2,..., n} מעל א"ב n-2 פלט: מילה באורך For i=1 to n-2 do Among all leaves of the current tree let j be the least one. Eliminate j and its incident edge e from the tree. The i-th letter of the word is the other endpoint of e.
R. Bar-Yehuda © 4 a[i] = j j עלה מינימלי
R. Bar-Yehuda © 5 i = 1; j=3; min=1 a[1] = 3 3 עלה מינימלי
R. Bar-Yehuda © 6 i = 2; j=2; min=3; a[2] = 2 3 עלה מינימלי
R. Bar-Yehuda © 7 i = 3; j=2; min=4; a[3] = 2 3 עלה מינימלי
R. Bar-Yehuda © 8 i = n-2 w="322" בסיום:
R. Bar-Yehuda © 9 Theorem 2.4: The number of spanning trees for n distinct vertices is n n-2. {1, 2,..., n} מעל א"ב n-2 קלט: מילה באורך V = {1, 2,..., n} פלט: עץ עם צמתים: For i=1 to n-2 do Let j be the least vertex for which d(j) = 1. Construct an edge j – a i, d(j) 0 and d(a i ) d(a i ) – l. Construct an edge between the two vertices whose degree is 1