Click Below To Download All Chapters ... · 2020. 4. 10. · Click Below To Download All Chapters ...
Main Menu (Click on the topics below)
-
Upload
heather-walton -
Category
Documents
-
view
18 -
download
0
description
Transcript of Main Menu (Click on the topics below)
![Page 1: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/1.jpg)
Spanning Trees Minimum Spanning Trees Kruskal’s Algorithm Example Planar Graphs Euler’s Formula
Main Menu Main Menu (Click on the topics below)
Click here to continue
Sanjay Jain, Lecturer, School of ComputingSanjay Jain, Lecturer, School of Computing
![Page 2: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/2.jpg)
Spanning Trees and Planar GraphsSpanning Trees and Planar Graphs
Sanjay Jain, Lecturer, Sanjay Jain, Lecturer,
School of ComputingSchool of Computing
![Page 3: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/3.jpg)
Spanning TreesSpanning TreesDefinition: A spanning tree for a graph G is a subgraph
of G that
a) contains every vertex of G and
b) is a tree.
.. .
. ..
![Page 4: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/4.jpg)
Spanning TreesSpanning TreesDefinition: A spanning tree for a graph G is a subgraph
of G that
a) contains every vertex of G and
b) is a tree.
.. .
. ..
![Page 5: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/5.jpg)
END OF SEGMENT
![Page 6: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/6.jpg)
PropositionPropositiona) Every connected finite graph G has a spanning tree.b) Any two spanning trees for a graph have the same
number of edges (If G has n vertices, then spanning tree of G has n-1 edges).
Proof: (of a)G is connected. Let G’=G1. If G’ is a tree then we are done.2. Otherwise, delete an edge from a circuit of G’ and go
to 1.
At the end of the above algorithm, G’ will be a spanning tree of G.
![Page 7: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/7.jpg)
END OF SEGMENT
![Page 8: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/8.jpg)
Minimal Spanning Trees.Minimal Spanning Trees.
.
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
65
45
![Page 9: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/9.jpg)
Minimal Spanning TreesMinimal Spanning TreesWeighted Graph.Each edge has a weight associated with it.
Minimal spanning tree, is a spanning tree with the minimum weight.
)(
)()(TEe
eweightTweight
![Page 10: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/10.jpg)
Minimal Spanning TreesMinimal Spanning TreesMay not be unique
. .. .
1
1
1
1
Minimal spanning tree can be formed by taking any three edges in the above graph.
![Page 11: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/11.jpg)
END OF SEGMENT
![Page 12: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/12.jpg)
Kruskal’s AlgorithmKruskal’s AlgorithmInput: Graph G, V(G), E(G), weights of edges.Output: Minimal spanning tree of G.Algorithm:1. Initialize T to contain all vertices of G and no edges. Let E=E(G). n= number of vertices in V(G) m=02. While m < n-1 do
2a. Find an edge in E with least weight.
2b. Delete e from E
2c. If adding e to T does not introduce a non-trivial circuit, then add e to the edge set of T
m=m+1
Endif
Endwhile
![Page 13: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/13.jpg)
END OF SEGMENT
![Page 14: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/14.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 15: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/15.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 16: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/16.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 17: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/17.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 18: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/18.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 19: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/19.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 20: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/20.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 21: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/21.jpg)
ExampleExample
.
..
.Singapore
KL
JakartaLondon
New York
89
76
23
88
34
102
99
.
![Page 22: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/22.jpg)
END OF SEGMENT
![Page 23: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/23.jpg)
Planar GraphsPlanar GraphsDefinition: A graph G is planar iff it can be drawn on a
plane in such a way that edges never “cross” (I.e. edges meet only at the endpoints).
.. .
. ..
![Page 24: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/24.jpg)
Plane GraphPlane Graph A drawing of planar graph G on a plane, without any
crossing, is called the plane graph representation of G
.. .. .
. .
.
![Page 25: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/25.jpg)
END OF SEGMENT
![Page 26: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/26.jpg)
Euler’s FormulaEuler’s FormulaTheorem: Suppose G is a connected simple planar graph with n3
vertices and m edges. Then, m 3n-6.
Note that the above theorem is applicable only for connected simple graphs.
![Page 27: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/27.jpg)
END OF SEGMENT
![Page 28: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/28.jpg)
Euler’s Formula ExamplesEuler’s Formula Examples
K5
number of vertices: 5 number of edges : 10
m 3n-6 does not hold.10 3*5-6 =9
So K5 is not planar.
![Page 29: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/29.jpg)
Euler’s Formula ExamplesEuler’s Formula Examples
K4
number of vertices: 4 number of edges : 6 m 3n-6 holds.
6 3*4-6 =6
So K4 may be planar (it is actually planar as we have already seen).
![Page 30: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/30.jpg)
Euler’s Formula ExamplesEuler’s Formula Examples
K3,3
number of vertices: 6 number of edges : 9 m 3n-6 holds.
9 3*6-6 =12
So K3,3 may be planar (however K3,3 is not planar).
![Page 31: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/31.jpg)
END OF SEGMENT
![Page 32: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/32.jpg)
Planar GraphsPlanar Graphs
A graph is planar iff it does not have K5 or K3,3 as a “portion” of it.
There is a linear time algorithm to determine whether a given graph is planar or not. If the graph is planar, then the algorithm also gives a plane graph drawing of it.
![Page 33: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/33.jpg)
END OF SEGMENT
![Page 34: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/34.jpg)
Proof of Euler’s FormulaProof of Euler’s FormulaFaces: The portion enclosed by
edges. The outside is also a face.
Let m be number of edges,n be number of vertices,and f be number of faces.Then:f = m-n+2 ----------- (1) .
..
...
.
..
![Page 35: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/35.jpg)
Proof of Euler’s FormulaProof of Euler’s FormulaFaces: The portion enclosed by
edges. The outside is also a face.
Let m be number of edges,n be number of vertices,and f be number of faces.Then:f = m-n+2 ----------- (1) .
..
...
.
..
![Page 36: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/36.jpg)
Proof of Euler’s FormulaProof of Euler’s FormulaFaces: The portion enclosed by
edges. The outside is also a face.
Let m be number of edges,n be number of vertices,and f be number of faces.Then:f = m-n+2 ----------- (1) .
..
...
.
..
![Page 37: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/37.jpg)
Proof of Euler’s FormulaProof of Euler’s FormulaFaces: The portion enclosed by
edges. The outside is also a face.
Let m be number of edges,n be number of vertices,and f be number of faces.Then:f = m-n+2 ----------- (1) .
..
...
.
..
![Page 38: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/38.jpg)
Proof of Euler’s FormulaProof of Euler’s FormulaFaces: The portion enclosed by
edges. The outside is also a face.
Let m be number of edges,n be number of vertices,and f be number of faces.Then:f = m-n+2 ----------- (1) .
..
...
.
..
![Page 39: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/39.jpg)
Proof of Euler’s FormulaProof of Euler’s FormulaFaces: The portion enclosed by
edges. The outside is also a face.
Let m be number of edges,n be number of vertices,and f be number of faces.Then:f = m-n+2 ----------- (1) .
..
...
.
..
3f/2 m ----------- (2)By substituting (1) in (2) we get3m - 3n + 6 2mor m 3n - 6
![Page 40: Main Menu (Click on the topics below)](https://reader035.fdocuments.net/reader035/viewer/2022062719/5681301e550346895d959d74/html5/thumbnails/40.jpg)
END OF SEGMENT