Translated from **jelline** Blog

Http://blog.chinaunix.net/uid-9112803-id-411340.html

//==============================

In the process of doing research, we found that the mathematical model or the graph theory model, which used to feel useless, suddenly became very useful. Sigh at their own knowledge of the deficiencies, so search for relevant knowledge to learn, and share.

This reprinted article has certain help for the junior personnel who are engaged in the research of the network direction, for example I. People who are already familiar with the various models and details of graph theory can simply close this page and leave.

//==============================

Summary:

This article uses another kind of thought to reorganize "graph theory and its application" related knowledge. First of all, the paper expounds how to model the relation between things by using the colloquial language. Then, from the practical examples, we give a variety of typical graph theory models, and each graph theory model corresponds to an important content of graph theory. Furthermore, the relevant knowledge is used to solve the problems related to the graph theory model mentioned above. Finally, To supplement some other knowledge of graph theory, including the branch of graph theory and the concept of easy mixing.

Symbolic Conventions:

Q (Question) indicates a description of the problem, M (Modeling) represents the mathematical modeling process, and A (Answer) indicates what graph theory problem the original problem was transformed into.

First, Introduction

Graph theory is a discipline that studies the relationship between points and lines, and belongs to a part of applied mathematics. In real life, the relationship between things can be abstracted as graph theory model. A point represents a thing, a connection between things. The entire solution process is as follows:

The original problem---Graph theory modeling--the solution of transforming to original problem by using graph theory correlation theory

The key of the whole process lies in the modeling of graph theory, the so-called graph theory modeling, is the explicit point to indicate what, the connection is what, the original problem into the graph theory of what problems. The following two scenarios exist:

① If the relationship between things is reversible (for example, two-way, friend), then abstract into a non-map

② If the relationship between things is irreversible (such as one-way road, irreversible state conversion), then the abstract into a graph

If you need to further describe the relationship between things (such as the distance between cities), we assign a weight to the connection, thus abstracting the assignment graph.

In conclusion, according to the practical problems, it can be modeled as one of the following graph theory models: the non-direction-weighted graph, the weighted graph, the non-weighted graph, and the weighted graph.

Example 1. Banquet theorem: In any banquet, there must be two people with the same number of friends

M: The point represents a person, and the connection is indicated when and only if the two people are friends

A: The problem is converted to any one graph must have two vertices of equal degree

Second, graph theory model

Next, we introduce some typical graph theory models, each model almost corresponds to an important content of graph theory, these contents will be discussed in chapter three, and the solution ideas of these models are given.

2.1 Even graph model

It can be abstracted into a model of even graph, which involves the relation between the two kinds of things (that is, only considering the relationship between two kinds of things, regardless of the relation between the same things). When drawing, divide two kinds of things into two rows or two columns. This type of model is usually included in subsequent models, but because many of the real-world problems can be abstracted into the model, they are discussed separately.

(1) warehouse and sales room

M: Point represents the warehouse or point of sale, and the connection represents the relationship between the warehouse and the sales store.

(2) Arrangement of classes

Q: There are 6 teachers in the school who will open 6 courses. The six teachers are named XI (i=1,2,3,4,5,6) and six courses are named Yi (i=1,2,3,4,5,6). It is known that teacher X1 can be competent in curriculum Y2 and Y3, teachers X2 can be qualified for courses Y4 and Y5, teachers X3 be competent for curriculum Y2, teachers X4 be competent for courses Y6 and Y3, teachers Y5 be competent for courses Y1 and Y6, and teachers X6 be competent for courses Y5 and Y6.

M: Points indicate a teacher or course, and the link is indicated when and only if the teacher is competent for the course

2.2 Shortest-circuit model

Any problem involving minimum state conversion can be converted to the shortest-circuit model. The point indicates the allowable state, and the line represents the transition of the state (reversible and irreversible respectively corresponds to the graph of the non-direction, the graph).

(1) Shortest route

M: Points indicate the city, and the connection means that when and only if the two cities have a direct route, and on the line indicating the distance between the two cities, that is, the weight value

A: The problem is converted to the shortest path between two points

(2) State transitions

Q: There is a 8 litre flask filled with wine and two empty pots, 5 liters and 3 liters respectively. The minimum number of operations can be divided into wine.

M: Set X1,X2,X3 to indicate the alcohol in the 8,5,3-liter flask respectively, then

The dots represent the combination (X1,X2,X3), and the lines are represented as if and only if they can be transformed by pouring wine.

A: The problem is converted to a short circuit that points (8,0,0) to point (4,4,0) in the graph

(3) Wolf and lamb dishes crossing the river

Q: There are wolves, sheep and cabbage on one bank. The ferry man had to cross the river, because the boat was too small to carry one thing at a time. Because of the wolf sheep, the cabbage cannot get along alone. How many times can the ferry man cross the river?

M: But the following combinations cannot be allowed: Wolf, lamb, goat, Wolf, man, Wolf, man, 6 kinds of food. Only 10 kinds of combinations can be allowed on shore: Wolf, Goat, Wolf, Wolf, man, lamb, empty, vegetable, sheep, Wolf, Wolf, man, lamb.

Dots represent permissible combinations, which can be changed when and only when two cases of manned (or added) ferries are available.

A: The problem is converted to one of the shortest points of the vertex "man wolf lamb dish" to the vertex "empty".

2.3 Minimum Spanning Tree model

Road laying

Q: The road is paved so that any two places can be reached, and the cost is minimal

M: Point indicates the factory (assuming the factory), any two-point connection, and mark the cost of laying the required

A: The problem is converted to the minimum spanning tree for the graph

2.4 Eulerian graph model

In layman's parlance, G is Eulerian graph when and only if G exists through each edge exactly once, and returns to the starting point of the trace.

(1) The Seven Bridges of Fort Lauderdale

Q: Can you go from one point to the 7 bridges, and pass each bridge exactly once, and finally back to the starting point

M: Point indicates land, connection means bridge

A: The problem is converted to g whether there is an E diagram

(2) Chinese postman problem

Q: The postman must go through every street within his delivery range at least once, choosing a route as short as possible.

M: Point indicates intersection, connection means when and only when two intersections have direct street

A: If G is an e-graph, Euler travels through the Fleury algorithm, that is, the request. Otherwise, the repeated edges are added according to certain rules, and Euler travel is constructed using the Fleury algorithm.

2.5 Hamilton Circle Model

(1) Travel salesman problem--tsp

A salesman wants to go to a number of cities to sell, each city only once, ask how to arrange the walking route, so that the total distance to walk the shortest.

Example:

Q: A computer agent to start from her city, fly to six cities, and then back to the starting point, if the demand for each city only once, can you do? Give a walk plan.

M: Point indicates city, connection means direct route between two cities

A: Is there an H-ring in the graph

(2) Round Table seating arrangements

Q: A number of people meeting around the circumference, each person will be different language, how to arrange the seat, so that everyone can communicate with his side

M: Dots denote a person, and the connection means that if and only two people can communicate, that means at least one language. (Perhaps you suddenly think of the even graph model, it is true that the problem can be abstracted into even graph model, but it is difficult to convert to graph theory problem)

A: Give an H-circle of the graph

2.6 Matching Model

(1) Tour seating arrangement

Q: There is a group of people to organize a tour, some of whom are friends they have to take a bus, and the seats in the car are in pairs. So in order to make everyone's journey more enjoyable, the tour leader needs to arrange the paired friends together. Give a plan for the arrangement.

M: Points indicate the person of the tour, and the connection indicates when and only if the two are friends

A: Find the maximum match for the graph

(2) Graduate job search

Q: Can students find the ideal job?

M: Points represent graduate students or work, and the link indicates when and only when a student applies for the job

A: The problem is turned into a match for each vertex of saturation, which is the perfect match

(3) Optimal dispatch problem

M: Point represents work or person, constructs a complete even picture, the weight of the edge indicates the worker's efficiency in doing this job

A: Problem transformation to the optimal matching of the graph

2.7 Floor Plan Model

The plane model can be understood in such a way that traffic networks do not intersect and do not need to repair viaducts or tunnels (tunnels are obviously different from caves).

(1) circuit board design issues

Q: The wires between the connecting circuit elements cannot be crossed. Otherwise, a short-circuit fault occurs when the insulating layer is damaged.

M; dot indicates circuit component, connection between components

A; Whether the graph can be planar

(2) design of scenic air-conditioning pipeline

M: Point indicates scenic area, connection means when and only when the two places to lay air-conditioning pipe

A: Can you draw on the plane so that the edges don't cross each other?

(3) 3 houses and 3 types of facilities

Q: 3 Utilities (gas, water and electricity) are required to be connected to 3 houses by gas pipes, pipes and wires, and any one line or pipe should not intersect with another line or pipe, can it be done?

M: A point indicates a utility or house, and the connection means that such utility is connected to the house

A: Whether the abstract figure can be planar embedded

2.8 Coloring Model

The point coloring problem corresponds to a partitioning method of the vertex set, which corresponds to the classification problem. Edge shading corresponds to a partitioning method of the edge set, and also corresponds to the classification problem. The point coloring model and the edge shading model are mainly the abstract models, which are adjacent vertices or adjacent edges that cannot be the same color.

(1) Point coloring Model

① Exam Schedule

Q: So that students do not have conflicting exams, minimum number of arrangements

M: Points indicate the course of be deciphered, and the link indicates that at least one student chooses both courses at the same time.

A: The problem is converted to the number of points in the graph (the non-conflicting courses and exams are scheduled to be completed in the same time period)

② Course Arrangement issues

Q: Students Choose the course, so that students do not conflict, how to draw up a lesson number as small as possible schedule

M: Points indicate a course, and the link indicates when and only if a student has selected both courses at the same time

A: The problem is converted to the number of points in the graph

The phase setting problem of ③ traffic light

Q: What is the minimum number of phases required for traffic lights in order to (eventually) allow all vehicles to pass through the junction safely?

M: Point indicates Lane, connection when and only if the car in two lanes cannot safely enter the junction at the same time

A: The problem is converted to the number of points in the graph

(2) Edge coloring model

① Schedule Problem

Q: with M teachers, n classes, which teacher XI to the class YJ Pij class. Find out how to complete all classes at least once.

M: Make x={x1,x2,..., xm}, Y={y1,y2,..., yn},xi and YJ with Pij edge, even graph g= (X, Y).

A: The problem is converted to the number of edges coloring for the graph

(2) Competition arrangement issues

Q: Minimum days to complete the race

M: Points indicate contestants, connect as and only if two people have a match

A: The problem is converted to an optimal edge coloring, that is, the normal edge coloring with a minimum number of colors

2.9 Overlay Model

Covering the model, which corresponds to the control problem, the popularly speaking point overlay corresponds to the least point to control all the edges (that is, either side has at least one vertex in the point independent set), and the edge overlay corresponds to controlling all points with the fewest edges. Corresponds to the control problem.

(1) Sentinel Station design

Q: The city has a post, which allows the Sentinel to supervise the minimum number of posts in all streets.

M: Dots indicate intersections, lines indicate presence of direct streets

A: The problem is converted to the point overlay of the graph

2.10 Strong Connectivity Directional graph model

(1) Urban transportation network design problems

Q: A city is a need to change all the streets to one-way lanes, allowing people to reach each other in any of two locations. How to design single-lane direction

M: Vertices denote street intersections, wired when and only if there are direct streets

A: The problem is equivalent to the strong connected orientation in the model diagram.

(2) Competition chart

M: The results of the cyclic game can be expressed by the so-called "contest Chart". The U team beats the V, then draws a forward edge from the point U to v. Obviously, the "race chart" is a directional map of the complete graph.

Three, the model solution

The solving process is given for the above model, and each model corresponds to a main content of graph theory.

3.1 Even graph model

As mentioned above, the bipartite graph model is only a modeling approach and is not associated with a direct problem.

3.2 Shortest Path algorithm

(1) Dantjig algorithm--Vertex marking method

At the adjacent point of the selected collection A, set B (which does not contain a set of points), select the points that meet the criteria (the selected point does not form the loop, and the edge weights are the smallest) to join the set a. Iteration until the end point appears in collection A.

3.3 Minimum Spanning tree algorithm

(1) Kruskal (Kruskal) algorithm

Starting from the smallest side of G, the ring-avoiding expansion is carried out. Extends from the edges that conform to the extended edge (the newly added edge does not constitute a loop) with the smallest selection weights.

(2) Tomme method of Breaking the circle

Continue to break the circle (starting from any circle in the weighted graph G, remove the most weighted edge of the circle, called the break), until there is no circle in G, and the last remaining G's sub-graph is the smallest spanning tree of G.

(3) Prim algorithm

For any vertex U of the connected weighted graph G, select the edge with the least weight associated with the point U as the first edge of the minimum spanning tree E1. On the next edge e2,e3,..., en-1, select the edge with the least weight in all edges that have only one public endpoint on an already selected edge.

3.4 Euler Tour

(1) Euler travel judgment

Connect graph G is an even number of degrees for each vertex of Euler diagram <==> g

Connectivity graph G with Euler traces <==> g up to two singularity points

(1) Tectonic Euler Tour (Fleury algorithm)

The algorithm solves the method of finding a specific Euler round trip in Eulerian graph. The method is to avoid cutting edges as much as possible.

(2) Optimal round-trip algorithm (Chinese postman problem)

If G is a Euler chart, then any tour of G is the best round trip (the best round is to find a least-weighted tour in a weighted connected graph with nonnegative weights).

If G is not a Euler chart, then any tour of G, through some sides more than once, by the following methods to seek

Add a repeating edge (first, each edge repeats at most once to get a Euler multi-graph; second, in each lap of the multi-graph, if the number of repeated edges exceeds half of the loop length, the repeated and non-repeating edges are exchanged), and then the Fleury algorithm is evaluated.

3.5 Hamilton Map

(1) H Figure determination

The H-graph determines that there is no ordinary necessary and sufficient condition, but can be aided by the following theorem.

Necessary

G is H figure ==> for each non-empty true subset of V S, there are Ω (g-s) ≤| s|, even if to K points, get connected branch number than K, it is not H graph (inverse no proposition). (Obviously there is a cut of the figure is not H figure)

Sufficient conditions

① Set G is a simple graph of n (n≥) Order, Δ≥N/2 ==> g is H graph

②g is a simple graph, for any nonadjacent vertex, satisfies the D (U) +d (v) ≥n,g is H graph <==> g+uv is H graph

③g is H graph <==> g closure is H graph (if the closure of G is a complete graph, then G is the H graph. But the closure of a graph is not necessarily an H graph.

Closure construction Process: the non-contiguous vertices of the number of vertices of the sum of degrees and ≥ graphs are joined recursively until no such vertex pairs exist.

(2) Optimal H-ring

In a fully weighted graph, find an H graph with a minimum weight, which is called the optimal H-circle. There are no effective algorithms at present, but approximate values can be obtained by the following approximate algorithms:

First, an H-ring is obtained, and the upper bounds are continuously improved by replacing the edges. The lower bound is obtained by finding the minimum spanning tree.

3.6 Matching Model

(1) Matching decision

① Maximum matching decision:

G's Match m is the maximum match <==> G does not contain m expandable path

② even graph matching decision

Set G to a even graph with two classifications (x, y), for each subset of x S, G contains the match for each vertex of the saturation x <==> | N (S) |≥| s|

G is a K regular even figure ==> G has a perfect match

In the even graph, the maximum number of matched edges equals the minimum amount of vertices covered

③ Perfect Match judgment

G has a perfect match <==> for each non-empty true subset of V S, the odd branch number ο (g-s) ≤| s|

Every 3 regular graph without cutting edges has a perfect match.

G has a perfect match <==> G has 1 factors (a 1-factor edge set of the graph is equivalent to a perfect match of the graph)

④1-Factor decomposition

The full figure k2n is 1-can be factorial (except 2n, each of the remaining numbers moves one position in the direction of the arrow, and at each position, a two-point adjacency on the same line gets a 1 factor)

Ning is 1-factorial (all 1 factors are calculated by subtracting the perfect match continuously)

Any 3 regular graph with an H-ring is 1-can be factorial (an H-ring of an even number of vertices can be decomposed into two 1-factor)

If 3 regular graphs have cut edges, then 1-factor decomposition is not allowed

(2) Hungarian algorithm--finding the maximum match of even graphs

Starting from any match m, if M is saturated with each vertex in X, then M is the desired one. Otherwise, from the point where X is looking for a non-saturation point u, look for a scalable path by constructing an M-staggered tree rooted in U. Swap edges to get a bigger match.

(3) Optimal matching (optimal dispatch problem)

The best match is to look for a perfect match with the maximal right in the weighted full even graph. The algorithm can be solved by kuhn-munkres optimal matching algorithm, which adopts vertex marking modification strategy.

3.7 Flatness Model

(1) Flatness judgment

① for simple graph g= (n, m), if m>3n-6, then G is non-planar;

② for Connected graphs g= (n, m), if each polygon is at least l≥3 and m> (n-2) l/(L-2), G is non-planar

③g is planar <==> G does not contain sub-graphs with K5 or k3,3 (Kuratowski theorem)

④g is planar <==> G does not contain sub-graphs capable of shrinking into K5 or k3,3 (Wagner theorem)

⑤ is judged by the plane-based algorithm

⑥ observation method, trying to determine whether a plane can be determined by moving the edge

(2) Planar algorithm (DMP algorithm)

3.8 Coloring Model

(1) To find the number of points

① arbitrary figure g, all have χ≤δ+1

②g is a simple connected graph, and G is neither a complete nor a singular circle, then χ≤δ

③g a non-empty simple diagram, then χ≤δ2+1 (find all vertices of the vertex degrees ≥ its adjacent vertex degree of the vertex, in the remaining vertices to find the most generous point, that is, the second magnanimous, not equal to the second magnanimous)

④g is a non-empty simple diagram, if the maximum number of points in G are not adjacent, then χ≤δ

⑤ to arbitrary floor plan, all have χ≤5

⑥ by the color polynomial, that is, the minimum k so that PK (G) is not equal to 0

The above methods are cumbersome, giving only the upper bounds. In the actual solution process, δ2+1 can be obtained as the upper bound, that is, the second magnanimous plus 1. By observing whether the original image has a sub-graph of KN, if present, the lower bound is N. For example, a Wakahara chart exists with a K3 that is a triangle, then the point color number is at least 3.

(2) To find the number of side color

①g is a simple diagram, then χ ' =δ or δ+1

②g is even graph, then χ ' =δ

③g is a simple diagram, if n=2k+1 and m>kδ, then χ ' =δ+1

④g is an odd-order Δ regular simple diagram, then χ ' =δ+1

⑤ the maximum number of χ in a non-ring graph G is μ, then the ' =δ+μ

(3) Coloring algorithm

For the color set designator, the minimum number of colors that match the condition (the adjacent vertex cannot be the same color) is given at each vertex. The algorithm can only guarantee the normal coloring of a graph with δ+1 colors, but there is no guarantee that the number of colors used must be the least.

(4) Coloring count (color-seeking polynomial)

The method of shrinking edge and adding edge recursion

①g is n Jearinto, then Pk (G) =kn

②PK (Kn) =k (k-1) (k-2) ... (k-n+1)

③ if D (u) = 1, then PK (G) = (k-1) PK (g-u)

④ plus side recursion method PK (G-E) = PK (G) + PK (G.E)

Edge Reduction Recursive Method PK (G) = PK (G-E)-PK (G.E)

Ideal sub-graph method

Improvement of ideal sub-graph method

3.9 Overlay Model

(1) Point Overlay

The point-independent set of a graph (a standalone set) is a set of pips that are made up of some distinct points in the graph. The maximum independent set of independent sets with the most number of points, the maximum independent set of vertices is called the independent number of G, recorded as α (g), précis-writers α

An overlay of G refers to a vertex subset K of G, so that at least one end of each of the G's edges belongs to K. G of the minimum coverage of the number of points called G coverage, recorded as β (g), précis-writers for beta

(2) Side overlay

The maximum matched number of sides of G is called the side independent number of G, which is recorded as α ' (G), précis-writers is α '.

Set L is a subset of the edges of G

One side overlay of G is a side subset L of G, so that each point of G is the end of an edge in L. The number of sides of the minimum coverage of G is called the side cover number of G, recorded as β ' (G), précis-writers for beta '

(3) Point overlay and edge overlay relationship

① to any n-order graph G, there are α+β=n

② to any n-order graph G, and δ (G) >0 have α ' +β ' =n

③g is the >0 of Δ (G), then α=β '

3.10 Strong connected Orientation algorithm

(1) Problem of existence

Theorem 3 (Robbins, 1939) non-trivial connectivity graph G with strong connected orientation <==> g is 2-side connected.

(2) Strong connected orientation algorithm

From the labeled Set L, select the highest-numbered point V with an unlabeled set U having a neighboring point, extend the point u, and punctuation U is the point v designator value plus 1. For all unassigned edges, a vertex with a large label value points to a vertex with a small label value

3.11-point side-surface relational operation

① handshake theorem: Figure g= (V, E) twice times the degree of all vertices and equal to the number of sides of M

② set T is (n, m) tree, then: n=m-1

③ g= (n,m) is a floor plan, then ∑deg (f) = 2m

④ plane Chart Euler formula: Set g= (N,M) is a connected plan, φ is the number of polygons of G, then n-m+φ=2

Iv. Branch of graph theory

4.1 Network Diagram theory

Network Diagram theory, also known as network topology, uses the theory of graphs to analyze and study the structure and connection properties of the circuit.

4.2 Extremum graph theory

The main research is the Minimax problem related to graphs. such as the shortest path, the minimum spanning tree, the maximum match, the minimum coverage, the maximum flow and so on. For more information, please refer to Wikipedia extremal Graph theory.

4.3 Algebraic graph theory

The problem of graph theory is studied by algebraic method. For more information, please refer to Wikipedia algebraic Graph theory.

4.4 Topological diagram theory

Read English directly, it studies the embedding of graphs in surfaces, spatial embeddings of graphs, and graphs as topological spaces. It also studies immersions of graphs. For more information, refer to Wikipedia topological Graph theory.

4.5 Random graph theory

A graph that produces points, edges, and edges in a random way (original: A random graph is a graph in which properties such as the number of graph vertices, graph edges , and connections between them is determined in some random.). For more information, please refer to the Wikipedia random Graph.

4.6 Structural Drawing theory

The core of structural graph theory is the Hamilton question [3].

Five, several groups easy to mix the concept

5.1 Graph theory and topology

Graph theory was previously explained as a chapter in topology and has now developed into an independent discipline. Baidu Encyclopedia entry topology, said topology is a modern development of a study of continuity phenomenon of the branch of mathematics. It's hard to understand, right, look at the Sina love to ask the knowledge person to answer, said "topology" mainly research is for the mathematical analysis of the need to produce some geometrical problems. So far, topology has studied the invariant properties and invariants of topological spaces under topological transformations. Wikipedia entry graph theory, said the object of graph theory is equivalent to one-dimensional topology.

5.2 Paths, traces, roads

Euler's round-the-Euler circuit with 5.3 Kohm closed traces

5.4 H-Circuit H-ring

Note: These, and so on again after reading the book again summarizes.

Vi. Further Reading

The teacher PPT gives the following references, we use the postgraduate textbook (Zhang Xiandi, Li Zhengliang. Graph theory and its application [M]. Beijing: Higher Education Press. 2005.2), feeling that the textbook is mainly copied [1], no wonder it is not the editor. I have seen [2], relatively easy to understand, but also give a lot of people background introduction, read more interesting. [3] Our teacher also recommended more.

[1] Beauty, help Dee "graph theory and its application"

[2] The United States, Gary Chartrand "graph theory Guide", People's post and Telecommunications press, 2007

[3] Bela Bollobas, "Modern graph Theory", Science Press, 2001 postgraduate teaching series of Chinese Academy of Sciences

[4] United States, Fred Buckley "A concise tutorial on graphic theory", Tsinghua University Press, 2005 Li Hui pa Wang translation

[5] Li Ying, "graph theory", Hunan Science and Technology Press, 1979

[6] Beauty, Douglas b.west "graph theory Guide", Mechanical industry Press, 2007 Li, Shing translation

[7] Yang Hong, "a selection of common algorithms for Graph theory", China Railway Press, 1988

[8] Chen Shuber, "Network Diagram theory and its Application", Science Press, 1982

[9] Chris Godsil,gordon royle "Algebraic Graph Theory", World Book publishing company Beijing, 2004

[10] Wang Zhaori, "graph theory", Higher Education Press, 1983

Various graph theory models and their solutions (reproduced)