chapter 5 graphs the puzzle of the seven bridge in the königsberg, on the pregel
TRANSCRIPT
![Page 1: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/1.jpg)
Chapter 5 Graphs the puzzle of the seven bridge in the
Königsberg, on the Pregel
![Page 2: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/2.jpg)
![Page 3: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/3.jpg)
Kirchhoff Cayler CnH2n+1
The four colour problem四色问题 Hamiltonian circuits 1920s,König: finite and infinite graphs OS,Compiler,AI, Network
![Page 4: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/4.jpg)
5.1 Introduction to Graphs
5.1.1 Graph terminology Relation: digraph Definition 1 : Let V is not empty set. A directed
graph, or digraph, is an ordered pair of sets (V,E) such that E is a subset of the set of ordered pairs of V. We denote by G(V,E) the digraph. The elements of V are called vertices or simply "points", and V is called the set of vertices. Similarly, elements of E are called "edge", and E is called the set of edges.
![Page 5: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/5.jpg)
G=(V,E),V={a,b,c,d,e,f,g}, E={(a,b),(a,c),(b,c),(c,a),(c,c),(c,e),(d,a),
(d,c),(f,e), (f,f)},
Edge (a,b)a: initial vertex,b:terminal vertexedges (a,b) incident with the vertices a and b。(c,c),(f,f) loopg: isolated vertex。
![Page 6: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/6.jpg)
Definition 2 : Let (a,b) be edge in G. The vertices a and b are called endvertices of edges; a and b are called adjacent in G; the vertex a is called initial vertex of edge (a,b), and the vertex b is called terminal vertex of this edge. The edge (a,b) is called incident with the vertices a and b. The edge (a,a) is called loop 。 The vertex is called isolated vertex if a vertex is not adjacent to any vertex.
g is an isolated vertex, (c,c) ,(f,f) are loop. a and b are adjacent; c and d are adjacent;
![Page 7: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/7.jpg)
Definition 3: Let V is not empty set. An undirected graph is an ordered pair of sets (V,E) such that E is a sub-multiset of the multiset of unordered pairs of V. We denote by G(V,E) the graph. The elements of V are called vertices or simply "points", and V is called the set of vertices. Similarly, elements of E are called "edge", and E is called the set of edges.
V={v1,v2,v3,v4,v5,v6} , E={{v1,v2},{v1,v5,} , {v2,v2}, {v2,v3},{v2,v4},{v2,v5},{v2,v5},{v3,v4},{v4,v5}} ,edges {v1,v2} incidents with the vertices v1 and v2
loop ; isolated vertex edge {v2,v5} multiple edge。
![Page 8: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/8.jpg)
Definition 4 : These edges are called multiple edges if they incident with the same two vertices. The graph is called multigraph. The graph is called a simple graph, if any two vertices in the graph, may connect at most one edge (i.e., one edge or no edge) and the graph has no loop. The complete graph on n vertices, denoted by Kn, is the simple graph that contains exactly one edge between each pair of distinct vertices.
![Page 9: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/9.jpg)
undirected graph: graph finite graph finite digraph
![Page 10: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/10.jpg)
Definition 5 : The degree of a vertex v in an undirected graph is the number of edges incident with it, except that a loop at a vertex contributes twice to the degree of that vertex. The degree of the vertex v is denoted by d(v). A vertex is pendent if only if it has degree one. The minimum degree of the vertices of a graph G is denoted by (G)(=minvV{d(v)}) and the maximum degree by (G)(=maxvV{d(v)}
b=a,{a,a},
![Page 11: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/11.jpg)
![Page 12: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/12.jpg)
Theorem 5.1(the handshaking theorem): Let G(V,E) be an undirected graph with e edge.
Then: evdn
ii 2)(
1
Theorem 5.2: An undirected graph has an even number of vertices of odd degree.
![Page 13: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/13.jpg)
Definition 6 : In a directed graph the out-degree of a vertex v by d+(v) is the number of edges with v as their initial vertex. The in-degree of a vertex v by d-(v), is the number of edges with v as their terminal vertex. Note that a loop at a vertex contributes 1 to both the out-degree and the in-degree of this vertex. The degree of the vertex v is denoted by d(v).
![Page 14: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/14.jpg)
Theorem 5.3: Let G(V,E) be an directed graph. Then
||)()( EvdvdVvVv
![Page 15: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/15.jpg)
aD, bB,cA,dE;
(a,b)(D,B), (a,c)(D,A),… ,
isomorphism
![Page 16: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/16.jpg)
Definition 7 : The directed graphs G(V,E) and G'(V',E') be isomorphic if there is a one to one and onto function f from V to V' with the property that (a, b) is a edge of G if only if (f(a),f(b)) is a edge of G'. We denote by GG'. The undirected graph G(V,E) and G'(V',E') be isomorphic if there is a one to one and onto function f from V to V' with the property that {a, b} is a edge of G if only if {f(a),f(b)} is a edge of G'. We denote by GG'.
![Page 17: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/17.jpg)
![Page 18: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/18.jpg)
Petersen
3-regular The graph is called k-regular if every vertex of G has degree k.
![Page 19: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/19.jpg)
Definition 8: Graphs that have a number assigned to each edge or each vertex are called weighted graphs
weighted digraphs
![Page 20: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/20.jpg)
Definition 9: The graph G'(V',E') is called a subgraph of G(V,E) If V'V and E'E. If V'=V, then G'(V',E') is said to be a spanning subgraph.
![Page 21: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/21.jpg)
Definition 10: If G'(V',E') contains all edges of G that join two vertices in V' then G' is called the induced subgraph by V'V and is denoted by G(V').
induced subgraph by {v1,v2,v4,v5}
![Page 22: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/22.jpg)
Definition 11: The complement of a graph G is the graph (denoted G ) with the same vertex set but whose edge set consists of the edges not present in G (i.e., the complement of the edge set of G with respect to all possible edges on the vertex set of G).
![Page 23: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/23.jpg)
G-v, or G-{v} When we remove a vertex v from a graph, we
must remove all edges incident with the vertex v. When a edge is removed from a graph, without
removing endpoints of the edge
![Page 24: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/24.jpg)
Adjacency matrices and Incidence matrices
Definition 12: Let G(V,E) be a graph of non-multiple edge where |V|=n. Suppose that v1,v2,…,vn are the vertices. The adjacency matrix A of G, with respect to this listing of the vertices, is the nn zero-one matrix with 1 as its (i,j)th entry when vi and vj are adjacent, and 0 as its (i,j)th entry when they are not adjacent. In other words, If its adjacency matrix is A=[aij], then
otherwise
Gofedgeanisvvifa jiij 0
},{1
![Page 25: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/25.jpg)
Let G(V,E) be an undirected graph. Suppose that v1,v2,…,vn are the vertices and e1,e2,…,em are the edges of G. Then the incidence matrix with respect to this ordering of V and E is the nm matrix M=[mij], where
otherwise
vwithincidentiseedgewhenm ijij 0
1
![Page 26: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/26.jpg)
000000
001011
010110
001010
011111
010010
01111000
10001100
00000110
11100011
00010001
5
4
3
2
1
87654321
v
v
v
v
v
eeeeeeee
![Page 27: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/27.jpg)
Paths and Circuits, Connectivity,8.1 P291
![Page 28: Chapter 5 Graphs the puzzle of the seven bridge in the Königsberg, on the Pregel](https://reader035.vdocuments.site/reader035/viewer/2022070415/5697bf741a28abf838c7f9fe/html5/thumbnails/28.jpg)
Exercise P123 27,28; P295 9,10; 1.Represent each of these graphs with an adjacency matrix an
incidence matrix.