Prüfer sequence

In graph theory, an inspector Code refers to a sequence that uniquely describes a labeled tree. The code for a tree with a node has length and can be created with a simple iterative algorithm. Auditor codes were introduced in 1918 by Heinz auditor to prove the Cayley 's formula.

Algorithm

You can create an examiner code to a tree by iteratively removing nodes until only two nodes left. Given a tree with nodes. In the step, the sheet is removed with the smallest label of the tree and set the - th element of the auditor codes on the label of the only neighbors of the removed sheet.

The code of a tree is obviously unique and has the length.

Example

The above- presented algorithm is applied to the image on the right. At the beginning of the node is 1, the leaf with the smallest label, so this node is removed first and 5 is inserted as the first element in the inspector code. Subsequently, the sheets 3 and 4 are removed from the tree and expanding the result to 5 and 2. Since node 5 is now the smallest sheet, it is removed from the tree, and 2 appended to the result. The last node node 6 is removed from the tree and 2 appended to the result. The algorithm terminates, since only two nodes ( 2 and 7) are left.

Application

The auditor code of a tree with nodes of a unique sequence of length with elements. Conversely, there are at a given auditor code of length with elements of a unique labeled tree. This can easily be shown by induction on.

The direct consequence of this is that auditors codes represent a bijection between the set of labeled trees with nodes and the set of sequences of length with elements of. The latter quantity is the size, thus the existence of the bijection the Cayley formula proves: There are trees with labeled nodes.

The results can be generalized: A labeled tree is a spanning tree of a labeled complete graph. Are appropriate restrictions placed on the examiner code, can be determined using similar methods, the number of spanning trees of complete bipartite graphs. Is a complete bipartite graph with node to node in a partition and into the other partition, so is the number of labeled spanning trees.

663418
de