Tree-related knowledge points:
Relative to the Tsinghua University Press this "discrete mathematics" about the tree of this chapter is relatively simple, the concept is not much, about trees, forests, leaves, sub-fulcrum, spanning tree, the minimum spanning tree concepts are very simple, here no longer, the following records several theorems and important algorithm steps.
Theorem 1: Set t<v,e> is an n-order non-trivial tree, then T has at least 2 leaves.
Proof: Set T has k leaf, then there are n-k branch points (the degree of the fulcrum is greater than or equal to 2), by the handshake theorem 2m≥k + 2 (n-k), and then consider the tree structure of a very common nature, the number of sides m and the number of vertices n to meet m = n–1, with inequalities, can be k≥2, proof.
Here is a set of concepts that may be unfamiliar: The tree's branch chord, that is, for G's spanning Tree T, which belongs to the "T" side of the G also belongs to T, and belongs to the G but not the t side of the string called T.
Theorem 2: Any undirected connectivity graph G has a spanning tree.
Proof: If G does not exist loop, then G is a tree; If g exists a loop, then remove any one of the loop side, so that it is not a loop, but does not affect the connectivity of G, repeated operation, will inevitably get a no-loop graph G, that is to get a spanning tree.
Greedy-based Kruskal algorithm and Huffman algorithm:
They are based on a basic algorithm idea-greed. This kind of thought is not easy to express in terms of language, so it is not shown here. (the author in an article on the greedy law has tried to give a proof of Huffman algorithm, if the reader is interested can go to see)
Kruskal algorithm (minimum spanning tree):
The weights of M-bars in g are sorted from small to large e1,e2,e3,...,em, based on the N-order 0 graph, then the edge-selection is constructed from E1, and if the selected EI causes the current graph to appear in the loop, the edge is discarded.
Huffman (optimal two-yuan tree):
Given the real number W1, W2, W3...WT, as the weight of the leaves of the two-tree T-leaf.
(1) The T weights are sorted by ascending order.
(2) Select the minimum weight sequence of two wi, WJ, the synthesis of a branch point, the weight is WI+WJ, the WI, WJ expediency value sequence is deleted, and add a new weight wi+wj.
(3) Repeat (2), knowing that the weight sequence is empty.
A life application of the Huffman algorithm: the optimal prefix code.
Here are some of the more unfamiliar sets of concepts in the tree structure:
Genchu: Based on a tree structure in a forward graph.
R-Meta-tree: Each branch has a tree of up to r sons.
R Yuan Zheng tree: Each branch point is a tree with r sons.
R-Element fully regular tree: based on the R Yuan Zheng tree, all leaves of the tree are of the same tree structure.
Ordered tree: The tree structure that specifies the order of each layer of nodes for the root tree.
Genchu Tour: In accordance with the visit to the root of the order, here are the sequence, pre-order, after the next three ways to understand their definition is the key is to understand that this is a recursive process.
An application of the Genchu Tour: the Polish symbol.
"Discrete Mathematics"--Graph theory 6.10