[Management Operations Research] Chapter 7 | Graph and Network Analysis (2, Minimum Spanning Tree Problem)


introduction

Following the previous article, after understanding the basic knowledge related to graph theory, let's take a look at a few classic problems in graph theory.


2. Minimum spanning tree problem

2.1 Definition of tree and its basic properties

A connected graph without cycles is called a tree.

insert image description here

It has several fundamental properties that are interrelated.

The nature of the tree 1 - if TTT is a tree, and the number of points in the treen T ≥ 2 n_T \geq 2nT2 , thenTTThere are at least two suspension points in T.

The nature of the tree 2 - Figure TTT is a tree, thenTTThe number of sides in T mmm is equal to the number of pointsnnSubtract 1 from n , that is, m = n − 1. m=n-1.m=n1.

The nature of the tree 3 - Figure TTThe necessary and sufficient condition for T to be a tree is that there is exactly one link between any two vertices.

From property 3, the following inferences can be drawn:

  1. If any edge is removed from a tree, the remaining graph is disconnected. It can be seen that in all graphs with the same set of points, the tree is the connected graph with the fewest edge trees.
  2. Fill in an edge between two non-adjacent points in the tree, and you get exactly one circle.

In summary, it can be concluded that the tree TTSix basic properties of T , namely:

  1. acyclic graph;
  2. connected graph;
  3. m T = n T − 1 ; m_T=n_T-1; mT=nT1;
  4. minus one edge is not connected;
  5. Adding a side has exactly one circle;
  6. At least two hanging points.

2.2 The braced tree of a graph

Suppose graph T = ( V , E ′ ) T=(V,E')T=(V,E )is graphG = ( V , E ) G=(V,E)G=(V,E ) the supporting subgraph, if the graphTTT is a tree, call itGGA spanning tree of G.

Theorem - Graph GGThe necessary and sufficient condition for G to have a spanning tree is that the graph GGG is connected.

Proof: The necessity clearly holds.

sufficiency. Design GGG is a connected graph, if it does not contain a cycle, it is a tree itself, soGGG is a brace tree of itself. IfGGG contains a cycle, and any edge can be removed from the cycle to getGGA supporting subgraphG 1 G_1 of GG1. if G 1 G_1G1Does not contain circles, then G 1 G_1G1is GGA spanning tree of G ; ifG 1 G_1G1contains a circle, then from G 1 G_1G1Take any circle in the circle, remove another edge from the circle, and get G 2 G_2G2, and so on, and finally a support subgraph G k G_k without circles can be obtainedGk, the brace tree.

The proof of the sufficiency of this theorem also inspires us a way to find spanning trees of connected graphs. It is to take a circle at random, remove one side from the circle, and repeat this step for the remaining circles until no circle is contained, and a support tree can be obtained. This method is called "the method of breaking circles " .

You can also think in reverse, take any edge e 1 e_1 from the graphe1, find a line that does not match e 1 e_1e1The sides e 2 e_2 that make up the circlee2, find another one that does not match ( e 1 , e 2 ) (e_1,e_2)(e1,e2) constitutes the sidee 3 e_3e3, until it becomes impossible. At this time, the graph formed by all the edges taken out is a braced tree, and this method is called " circle avoidance method ".

2.3 Definition of minimum spanning tree and related theorems

Given an undirected network G = ( V , E , W ) G=(V,E,W)G=(V,E,W ) , forGGEach edge e ∈ E e \in Ein GeE , designw ( e ) ≥ 0 w(e) \geq0w ( e )0 , forGGEvery spanning treeTT of GT , we defineTTThe value of this W ( T ) = ∑ e ∈ E w ( e ) W(T)=\sum_{e\in E}w(e)W(T)=eEw ( e ) if the spanning treeT ∗ T^*T is the one with the smallest weight among all supporting trees, then it is calledT ∗ T^*T isGGThe minimum spanning tree of G.

Theorem - Let TTT is the networkG = ( V , E , W ) G=(V,E,W)G=(V,E,W ) support tree, any edgee ∈ E e \in EeE , uniquely determines a circleC ( e ) C(e)C ( e ) . Exclusion_Outside e , C ( e ) C(e)All other edges of C ( e ) belong to TTT , ifTTT is forGGA minimum spanning tree of G , then eee isC ( e ) C(e)Maximum weight edges in C ( e ) .

Proof: In the cycle C ( e ) C(e)Take any other sidee ′ e' in C ( e )e,刪T ∪ { e } − { e ′ } T \cup\{e\}-\{e'\}T{ e}{ e }is still connected and does not contain circles, that is, it is a tree, denoted asT ′ T'T ,thenW ( T ′ ) = W ( T ) + w ( e ) − w ( e ′ ) W(T')=W(T)+w(e)-w(e')W(T)=W(T)+w ( e )w ( ie' ). Thanks toTTT is the minimum spanning tree,W ( T ) ≤ W ( T ′ ) W(T) \leq W(T')W(T)W(T ),即w ( e ) ≤ w ( e ′ ) w(e) \leq w(e')w ( e )w ( ie ), sincee ′ e'e , so the original proposition is proved.

Theorem - Let TTT is the networkG = ( V , E , W ) G=(V,E,W)G=(V,E,W ) support tree, then for any edgee ∈ E e \in EeE , uniquely determinesGGA cut set of G Φ ( e ) \varPhi(e)Φ ( e ) ,removedeee外,Φ ( e ) \varPhi(e)None of the other edges on Φ ( e ) belong to TTT , ifTTT is forGGThe minimum spanning tree of G , then eee isΦ ( e ) \varPhi(e)Minimum weight edges in Φ ( e ) .

2.4 Minimum spanning tree algorithm

There are three main algorithms, which are the circle avoidance method, the anti circle method and the circle breaking method.

2.4.1 Circle avoidance method (KRUSKAL algorithm)

First set the network GGThe edges in G are sorted according to their weight, starting from the smallest edge, each time a new edge is selected, it is necessary to judge whether it forms a circle with the selected edge, if so, discard the edge, otherwise the selected edge knows all The number of selected edges is equal to the number of vertices minus 1. Each time an edge is selected, the edge with the smallest weight is given priority, so it is also called the minimum edge optimization method.

2.4.2 Anti-circle method (PRIM algorithm)

From graph G = ( V , E ) G=(V,E)G=(V,E ) any vertex is taken and put into the treeTTThe point setVT V_T of TVT, for the graph GGG is divided intoVT , V ‾ T V_T,\overline{V}_TVT,VTThe cut set Φ ( VT ) \varPhi(V_T)F ( VT) , select an edge with the smallest weight and put it into the treeTTSet the edges of T , and put the vertices associated with the edges intoVT V_TVT, repeat the above steps until all vertices are selected into VT V_TVTuntil.

2.4.3 Circle breaking method

Let G ( k ) G^{(k)}G( k ) isGGThe connected generation subgraph of G (starting G ( 0 ) = GG^{(0)}=GG(0)=G ), ifG ( k ) G^{(k)}G( k ) does not contain a circle, then it is a minimum spanning tree; if it contains a circle, select the edge with the largest weight in the circle to remove, and repeat the above process until no circle is found.


write at the end

Next question, let's take a look at the shortest path problem!

Guess you like

Origin blog.csdn.net/Douglassssssss/article/details/132672433