Havel theorem Description From http://blog.csdn.net/shuangde800/article/details/7857246
Given a nonnegative integer sequence {d1,d2,... dn}, it is said that the sequence can be mapped if there is a graph in which the degree of each point in the graph corresponds to that of the sequence one by one. Further, if the graph is a simple graph, it is said that the sequence can be simply graphical. http://
It is simpler to determine the graph: d1+d2+...dn=0 (MOD2). With regard to the construction of concrete graphs, we can simply pair the points of odd degrees, and all the rest are made from loops.
Can be simple to map the decision, there is a Havel theorem that says: "We line up the sequence without adding order, i.e. D1>=D2>=...>=DN, then D can be simply graphical when and only if d ' = (d2-1, d3-1, ... d (d1+1)-1, D (d1+2), D (D1 +3), ... dn can be simply graphical. The problem with this theorem is that, in fact, after we sort D, find the biggest point (set degree for D1), and it and the degree of D1 between the point of the edge, and then this point can be no matter, continue this process until the completion of the complete map, or the emergence of a negative degree and other obvious unreasonable situation.
The simple proof of the theorem is as follows:
(<=) If d ' can be simple to map, we just have the largest point in the original image and the d ' D1 of the largest point of the edge can be easy to this diagram must be a simple diagram.
(=>) If D can be simply graphical, the simple graph given is G. Consider in two ways:
(a) If there is an edge in G (V1,V2), (v1,v3), ... (V1,v (d1+1)), then remove these edges to a simple graph G ', so d ' can simply map to G '
(b) If a dot vi,vj makes I<j, (V1,VI) not in G, but (V1,VJ) in G. At this time, because DI>=DJ, there must be k to make (Vi, Vk) in G but (VJ,VK) not in G. At this point we can make gg=g-{(VI,VK), (V1,VJ)}+{(VK,VJ), (V1,VI)}. GG's degree sequence is still D, we are back to the situation (a).
(The following demo goes from "A little progress every day" blog: http://sbp810050504.blog.51cto.com/2799422/883904)
Havel-hakimi theorem is easy to understand: Three steps to go: such as sequence: 4 7 7 3 3 3 2 1
| Subscript |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
| Value |
4 |
7 |
7 |
3 |
3 |
3 |
2 |
1 |
First step: Sort the sequence in descending order.
| Subscript |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
| Value |
7 |
7 |
4 |
3 |
3 |
3 |
2 |
1 |
Step two: Delete the first number 7. Sequence into
| Subscript |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
| Value |
7 |
4 |
3 |
3 |
3 |
2 |
1 |
Step three: Start from the beginning, Count 7 numbers, that is subscript: [1,7] Reduce the value in the [1,7] interval by 1 because the first number has been deleted, the sequence becomes this:
| Subscript |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
| Value |
6 |
3 |
2 |
2 |
2 |
1 |
0 |
Then: Repeat the first step: sort. Repeat step two: Delete the first number 6 repeat step three: start from the beginning 6 number: that is, subscript "1,6", The Interval "1,6" in the number of deleted. Sequence into:
| Subscript |
1 |
2 |
3 |
4 |
5 |
6 |
| Value |
2 |
1 |
1 |
1 |
0 |
-1 |
Since 1 is already present, the number of edges (degrees) of a point cannot be negative. So, we can determine that the sequence cannot be a graph, so this sequence is not possible. Here's an example: already sorted:
Delete the first number 5:
Minus 1 of the front 5:
Sort:
Delete First Number 3: