Download presentation
Presentation is loading. Please wait.
1
Graph Theory
2
The 7 Bridges of Konigsburg
Konigsburg (now called Kalingrad) is a city on the Baltic Sea wedged between Poland and Lithuania. A river runs through the city which contains a small island. There are 7 bridges which connect the various land masses of the city.
3
The City of Konigsburg
4
The City of Konigsburg
5
The Problem The people of Konigsburg made a sport during the 18th century of trying to cross each and every one of the 7 bridges exactly once. This was to be done in such a way that one would always end up where one began.
6
The problem was solved by Leonhard Euler (1707-1783)
7
Euler Euler was one of the greatest mathematicians of all time.
He contributed to virtually every field of mathematics that existed in his time. The publication of his collected works (Opera Omnia) is presently up to volume 73 and still not complete.
8
Euler and Graph Theory Euler’s solution to the Konigsburg bridge problem was more than a trivial matter. He didn’t just solve the problem as stated; he made a major contribution to graph theory. Indeed, he essentially invented the subject. His contribution has many practical applications.
9
Recall the City of Konigsburg
10
B D A C
11
What is Graph Theory? Definition: The mathematical theory of the properties and applications of graphs Used to understand and solve many of mathematical and path problems.
12
The cells of a GSM mobile phone network
Fields of Study Other examples: Electrical eng. Biochemistry Computerscience Physics The cells of a GSM mobile phone network
13
Applications in computer Science
Since computer science is not a concrete/centralized subject, we can introduce graph theory in many areas.
14
Networks: Graph theory can be used in computer networks, for security purpose or to schematize network topologies, for example.
15
Facebook is based in graph theory
Webpage: can be represented by a direct graph. The vertices are the web pages available at the website and a directed edge from page A to page B exists if and only if A contains a link to B. Facebook is based in graph theory
16
Neural Networks: A series of algorithms that attempt to identify underlying relationships in a set of data by using a process that mimics the way the human brain operates.
17
Google Maps:
18
Subgraphs
19
Subgraphs A Graph H=(V1,E1) is called a Subgraph of G=(V,E) if and only if V1 ⊆ V and E1 ⊆ E. A Graph H=(V1,E1) is called a Spanning Subgraph of G=(V,E) if and only if V1 = V and E1 ⊆ E.
20
Examples Let Graph G be as follows.
21
Spanning subgraphs
22
Induced Subgraph W={a,b,c}. The subgraph induced by W of G is
23
Special Simple Graphs There are some Special Simple graphs which could be used as models for many real applications. Complete Graph Cycle Graph Path Graph Wheel Graph Null Graph Bipartite Graph Complete bipartite Graph Star Graph
24
Complete Graph A graph in which every vertex is connected to every other vertex is called a Complete Graph. The complete graph on n vertices is denoted by Kn. Kn has n(n − 1)/2 edges.
25
Complete graphs on n vertices, for n between 1 and 12, are shown below along with the numbers of edges:
26
Cycle Graph A graph in which all the edges forms a cycle is called Cycle graph. The cycle graph with n vertices is denoted as Cn The number of vertices in Cn is equal to the number of edges.
27
Path Graph A graph whose edges forms a path is called a path graph.
A path graph with n vertices will have n-1 edges.
28
Wheel graph A graph obtained from a cycle graph by joining a single new vertex(the hub) to each vertex of the cycle is called Wheel graph. Wn to denote a wheel graph with n vertices(n>=4). A wheel graph with n vertices contains 2(n-1) edges.
29
Examples
30
Null graph A graph with no edges is called a null graph.
In the mathematical field of graph theory, the term "null graph" may refer either to the order-zero graph, or alternatively, to any edgeless graph (the latter is sometimes called an "empty graph").
31
Bipartite Graph A graph in which the set of vertices can be partitioned into two sets M and N in such a way that each edge joins a vertex in M to a vertex in N is called a bipartite graph. No two graph vertices within the same set are adjacent.
33
Is the following graph is bipartite?
Cycle graphs with an even number of vertices are bipartite A graph is bipartite if and only if it does not contain an odd cycle
34
Complete Bipartite Graph
A Bipartite graph in which every vertex of M is adjacent to every vertex of N is called a Complete Bipartite graph. Complete Bipartite Graph = Complete Graph + Bipartite Graph A complete bipartite graph with partitions of size |V1|=m and |V2|=n,is denoted Km,n
36
Star Graph A Complete Bipartite graph k1,n is called a star graph.
The star graphs K1,3, K1,4, K1,5, and K1,6.
37
Operations on graph Complement of a Graph Union of Graphs
Intersection of Graphs Cut points Bridges
38
Complement of a graph The complement or inverse of a graph G is a graph H on the same vertices such that two distinct vertices of H are adjacent if and only if they are not adjacent in G. That is, to generate the complement of a graph, one fills in all the missing edges required.
39
Example
40
If G is a graph with n vertices then Complement is obtained from kn by simply deleting the edges of G. If G has n vertices and p edges then complement has n vertices and [n(n-1)/2]-p edges. Let G1 and G2 be simple graphs then G1 and G2 are isomorphic iff complements of G1 and G2 are isomorphic.
41
Union and Intersection graphs
42
Subgraph G-v, Cut Points
G-v is the subgraph of G obtained by deleting the vertex v from the vertex set V of G and deleting all edges in set E of G which are incident on v. A vertex v is called a Cut vertex or Cut point for a connected graph G if G-v is disconnected.
43
Find G-a,G-b,G-c for the following graph
45
Find all cut-points of following graph
46
-------------------------------------------
47
Here G-c and G-d are Disconnected graphs.
Hence the vertices C and d are the cut points of G.
48
Sub graph, Bridges Find G-{a,b} and G-{c,d} of the following graph
Here {c,d} is a cut edge or bridge
49
In general an edge e is a bridge for connected graph G if G-e is disconnected.
Find the Bridges of following graph.
51
Connected Graph In a Graph(not Diagraph) G, two vertices v1 and v2 are said to be connected if there is a path from v1 to v2 or v2 to v1. A graph is said to be connected if for every pair of distinct vertices vi,vj in G there is a path.
52
Examples
53
Strongly Connected A directed graph with above said property is called strongly connected. More precisely, A diagraph G is said to be Strongly connected if every pair of distinct vertices vi,vj in G there is Directed path from vi to vj and also from vj to vi.(BiConnectivity) If a Diagraph is not strongly connected but the underlying graph(without directions of the edge) is connected, then the graph is said to be weakly connected.
54
Examples
57
Strong components In a graph, there may be more than one set and within a set all the vertices are Strongly connected. Each set is known as a Component. Note that, if a graph is connected then number of component is one and all the vertices in the component are strongly connected. The problem is more important if the graph is directed and each strongly connected component results in sub-graph of the graph.
58
Example
59
Euler Path and Euler Circuits
An Euler path is a path that uses every edge of a graph exactly once. An Euler path starts and ends at different vertices. An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler circuit starts and ends at the same vertex.
60
In the graph shown below, there are several Euler paths
In the graph shown below, there are several Euler paths. One such path is CABDCB. The path is shown in arrows to the right, with the order of edges numbered.
61
The graph above has several possible Euler circuits.
AECABCFEDA is shown above.
62
EULER’S PATH AND CIRCUIT THEOREMS
A graph will contain an Euler path if it contains at most two vertices of odd degree. A graph will contain an Euler circuit if all vertices have even degree
63
In the graph below, vertices A and C have degree 4, since there are 4 edges leading into each vertex. B is degree 2, D is degree 3, and E is degree 1. This graph contains two vertices with odd degree (D and E) and three vertices with even degree (A, B, and C), so Euler’s theorems tell us this graph has an Euler path, but not an Euler circuit.
64
Assume the graph has an Euler path but not a circuit.
Notice that every time the path passes through a vertex, it contributes…. 2 to the degree of the vertex (1 when it enters, 1 when it leaves). Obviously the first and the last vertices will have odd degree and all the other vertices - even degree.
65
Assume exactly two vertices, u and v, have odd degree.
If we connect these two vertices, then every vertex will have even degree.
66
The number of vertices of odd degree must be either zero or two.
If not then there is no "Euler Path“. And if there are two vertices with odd degree, then they are the starting and ending vertices.
67
Eularian Graph A graph G is called Eularian Graph if it contains a Euler circuit.
68
Konigsberg's Bridge Problem
69
Underlying graph B D A C
70
It is not possible to walk over each of seven bridges exactly once and return to the starting point
Eventually, the problem was posed to mathematician Leonhard Euler who tried and failed to solve it and who then declared that the problem actually had no solution at all. Eventually, this problem and the solution or lack of solution to it became the start of graph theory along with the conclusions that came from the problem. Graph theory is a branch of mathematics that studies networks of points connected by lines
71
Hamilton Cycles and Hamilton Paths
72
Dirac’s Theorem The statement is that n-vertex graph in which each vertex has degree at least n/2 must have a Hamiltonian cycle. Refer the following links one by one if you are interested in proof.
73
Dirac’s theorem provides sufficient Condition for a graph G on n vertices to be Hamiltonian.
It’s just sufficient but not necessary for Hamiltonian graph to satisfy the condition that deg(v)>=n/2 for every vertex. Even without this condition graph sometimes can be hamiltonian.
74
Example for this Situation will be any Cycle graph(Cn).
75
Ore's Theorem In a Gtaph G with n vertices ..For any pair of vertices x and y if deg(x)+deg(y)>=n then there is a Hamiltonian Cycle. Whenever Dirac’s theorem is true then Ore’s theorem is true. Graphs that satisfy the requirement of Dirac’s theorem will also satisfy the requirement of Ore’s theorem but not Vice-versa.
76
Ore’s theorem talks about more graphs than what the Dirac’s theorem talks about.
77
Eulerian and Hamiltonian Are they related?
Is Every Eulerian graph Hamiltonian? Is Every Hamiltonian graph Eulerian? Are there graphs which are both? Reference Video:
78
Planar Graphs The three utilities problem: Can each house be connected to each utility, with no connection lines crossing?
79
Solution: the solution to the utility puzzle is "no": there is no way to make all nine connections without any of the lines crossing each other.
80
Construction of non intersecting Roads
B C D E
81
If there were only four friends we can do it.
B C D
82
A Graph is planar, if we can draw it on a plane, such that Edges do not intersect.
83
A B C D
84
Examples for planar graphs
Refer the following link
87
What about K5?
89
What about K3,3?
90
Non-planar
91
Kuratowski’s theorem A necessary and sufficient condition for a graph G to be planar is that G does not contain K5 or K3,3 as a sungraph. This is the fundamental in the study of planar graphs.
92
Prove that Petersen graph is non planar
Both graphs represent same structure. Non planar by Kurotowski’s theorem.
93
Show that Km,n is planar if either m<=2 or n<=2
94
Through a Diagram prove that 3-regular graph of 6 and size 9 is planar
95
Show that following graphs are plane by redrawing them
96
Bipartite graphs K1,s for s>=1 and K2,s for s>=2 are planar.
97
Suppose there are five houses and two utility outlets
Suppose there are five houses and two utility outlets. Is it possible to join each house to each outlet in such a way that no two lines of joining cross each other? Yes: Consider K2,5
98
Euler’s Formula A connected Planar graph with V vertices and E edges has exactly E-V+2 regions(r). V-E+R=2: Euler’s Fundamental theorem on planar graphs. If G is a planar graph, then it divides the plane into a number of parts called region or face of which exactly one part is unbounded. The number of edges that form the boundary of region is called the degree of that region.
99
Note:The degree of a region is the length of the closed walk bordering the region.
100
Example d(R1)=2 d(R2)=3 d(R3)=5
Sum of degrees of regions=20 which is twice the number of edges in the graph. This property is analogous to the handshaking property and is true for all planar graphs.
101
It should be pointed out that the regions are determined by a diagram of planar graph, not by the graph itself. This means that if we change the diagram of the graph, the regions determined by new diagram will be generally different from those determined by the old one. That is unbounded region in the old diagram need not be unbounded in the new diagram. However, the interesting fact is that the total number of regions in two diagrams remains the same.
102
Example: Find the degrees of four faces in below graphs.
103
We can conclude that, if a pendant edge is a part of the boundary of a region, then by convention, the edge is counted twice while determining the degree of the region.
104
If G is a connected simple planar graph with n (>=3) vertices, e edges(>2) and r regions, then
105
Problems Let G be a 4-regular connected planar graph having 16 edges. Find the number of regions of G. Can a connected simple graph of order n=1000 and size=3000 be planar? Find the maximum number of edges possible in a connected simple planar graph with 8 vertices?
106
Find the minimum number of vertices necessary for simple connected graph with 11 edges to be planar.
107
Show that every connected simple planar graph G with less than 12 vertices must have a vertex of degree<=4. Solution: Suppose every vertex has degree > 4. Then if d1, d2,d3,… dn are degrees of n vertices. We have d1>=5,d2>=5……..dn>=5 So that d1+d2+d3+……..+dn>=5n.
108
2m>=5n (by handshaking property is number of edges).
5n/2<=m We have m<=3n-6 Therefore 5n/2<=3n-6 i.e n>=12 Thus if every vertex of G has degree>4, then G must have at least 12 vertices. Hence if G has < 12 vertices, it must have a vertex of degree<=4.
109
Let G be a connected simple planar graph with fewer than 12 regions in which each vertex has degree at least 3.prove that G has a region bounded by at most 4 edges. Solution: Suppose every region in G is bounded by at least 5 edges. If G has m edges and n vertices then 2m>=5r Since each vertex has at least degree 3,then 2m>=3n or n<=(2m/3) By Euler’s formula we have r= m-n+2 or m+2=n+r
110
Then m+2<=(2m/3)+r or r>=(m/3)+2
This is not possible, because G has fewer than 12 edges. Hence some region in G is bounded by at most 4 edges.
111
Show that every connected simple planar graph G contains a vertex of degree less than 6.
112
Let G be a connected Simple planar graph. Prove the following.
If the degree of G is at least 5,then G has at least 12 vertices of degree 5. If the degree of G is at least 3 and the order of G is at least 4, then G has at least 4 vertices of degree less than 6.
113
Dual of Planar graph. Reference link
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.