SlideShare a Scribd company logo
1 of 29
There is a simple path between every pair of distinct
vertices of a connected undirected graph.
• Suppose a and b are two distinct vertices of the connected undirected
graph G =(V, E).
• we know that G is connected so by definition there is at least one path
between a and b .
• Let x0, x1, …, xn, where x0 = a and xn = b, be the vertex sequence of a path
of a least length.
• Now if this path of the least length is not simple then we have xi = xj, for
some i and j with 0 £ i < j.
• This implies that there is a path from a to b of shorter length with the
vertex sequence x0, x1, …, xi, …, xj+1, …, xn obtained by removing the
edges corresponding to the vertex sequence xi+1, …, xj.
• This shows that there is a simple path.
• Cut vertices (articulation points) are those vertices in the graph
whose removal along with the edges incident on them produces
subgraph with more connected components than in the original
graph.
• Cut edge (bridge) is an edge whose removal produces a graph with
more connected components than in the original graph.
Euler Paths and Circuits
• An Euler circuit in a graph G is a simple circuit containing every edge
of G.
• An Euler path in G is a simple path containing every edge of G.
• Example:
• Find the Euler path or circuit in the following graphs
• No Euler circuit exist,
• but the Euler path is
• 1,2,5,1,3,5,4,3,5,2,4
• The Euler circuit is
• 1,2,3,6,9,8,7,4,5,8,6,5,2,4,1
Necessary and Sufficient Conditions for Euler
Circuits and Paths
• Theorem 5:
• A connected multigraph has an Euler circuit if and only if each of its
vertices has even degree.
• Proof:
• Take a connected multigraph G =(V, E) where V and E are finite. We
can prove the theorem in two parts.
• Theorem 6:
• A connected multigraph has an Euler path but not Euler circuit if and
only if it has exactly two vertices of odd degree.
• Find Euler path or circuit?
• In the above graph, all the vertices have even degree, hence there is an
Euler circuit.
• The Euler circuit is
1,2,3,4,5,10,15,14,13,12,11,6,13,8,9,14,12,7,8,3,10,9,4,2,7,6,1
Hamilton paths
• A path x0, x1, …, xn-1, xn in the graph G = (V, E) is called Hamilton path if
V ={x0, x1, …, xn-1, xn} and xi≠ xj for 0 ≤ i < j ≤n.
• A circuit x0, x1, …, xn-1, xn, x0, with n > 1, in a graph G =(V, E) is a
Hamilton circuit if x0, x1, …, xn-1, xn is a Hamilton path.
• A graph with a vertex of degree one cannot have a Hamilton circuit.
• If a vertex in a graph has degree 2, then both edges incident with this
vertex must be part of Hamilton circuit.
• Example:
Find Hamilton circuit from the following graph if exists? What about
Hamilton path?
In graph (a) there is no Hamilton circuit since
the node c has degree 2 and both the edges
from it must be in Hamilton circuit, which is not
possible. One of the Hamilton path in the graph
(a) is a, b, c, d, e.
• In graph (b) we can find Hamilton circuit, the circuit can be 1,2,3,5,6,
9,8,7,4,1. Since there is circuit we can have path also.
• Theorem 7: Dirac’s Theorem
• If G is a simple graph with n vertices with n >= 3 such that the degree
of every vertex in G is at least n/2, then G has a Hamilton circuit.
• Theorem 8: Ore’s Theorem
• If G is a simple graph with n vertices with n >=3 such that deg(u) +
deg(v) >=n for every pair of nonadjacent vertices u and v in G, then G
has a Hamilton path.
Planar graphs
• A graph is called a planar if it can be drawn in the plane without any
edges crossing.
• Such drawing is called a planar representation of the graph.
• Example:
• Draw the graph below as planar representation of the graph.
• Theorem 9: Euler’s Formula
• Let G be a connected planar simple graph with e edges and v vertices. Let r be the
number of regions in a planar representation of G. Then r = e – v + 2.
• Example:
• Suppose that a connected planar graph has 30 edges. If a planar representation
of this graph divides the plane into 20 regions, how many vertices does this graph
have?
• Solution:
• We have, r = 20, e = 30,
• so by Euler’s formula we have
• v = e – r + 2 = 30 – 20 + 2 = 12.
• So the number of vertices is 12.
• Corollary 1:
• If G is a connected planar simple graph with e edges and v vertices
where v>=3, then e<=3v – 6.
• Corollary 2:
• If G is a connected planar simple graph, then G has a vertex of degree
not exceeding five.
• Corollary 3:
• If a connected planar simple graph has e edges and v vertices with
v>=3 and no circuits of length three, then e<=2v – 4.
• If a graph is planar, any graph obtained by removing an edge {u, v}
and adding a new vertex w together with edges {u, w} and {w, v}. Such
an operation is called an elementary subdivision.
• The graphs G1 = (V1, E1) and G2 = (V2, E2) are called homeomorphic
if they can be obtained from the same graph by a sequence of
elementary subdivisions.
• Example:
• The below example graphs are homeomorphic to the third graph.
• Theorem 10: Kuratowski’s Theorem
• A graph is nonplanar if and only if it contains a subgraph
homeomorphic to K3,3 or K5.
• Example:
• Determine whether the following graph is planar or not?
• Above we saw that the graph is homeomorphic to K5, the given graph
is not planar.
Graph coloring
• A coloring of a simple graph is the assignment of a color to each
vertex of the graph so that no two adjacent vertices are assigned the
same color.
• A chromatic number of a graph is the least number of colors needed
for a coloring of this graph.
• Theorem 11:The Four Color Theorem
• The chromatic number of a planar graph is no greater than four.
• To show the chromatic number of a graph as k we must show that the
graph can be colored using k colors and the given graph cannot be
colored using fewer than k colors
• Example#1
• Construct the dual graph for the map shown. Then find the number of
colors needed to color the map so that no two adjacent regions have
the same color.
• We can color the graph with at most 2 colors as shown in the graph.
Take R and G as red and green
• Example#2
• Find the chromatic number of the graph below.
• Lets start with vertex 1, it has adjacent vertices as 2, 3, 4, 5, 6, 9 so using
only 2 colors would suffice for the graph having the edges from 1 to its
adjacent vertices.
• However since 9 has its adjacent vertices as 1, 2, 3, 4 we cannot just color
the above graph with 2 colors because at least 1, 2 and 9 must have
different colors.
• Trying with 3 colors we found that at least 1, 2, 3, and 9 must have different
colors.
• So trying with four colors we can color the graph. Hence the chromatic
number of the above graph is 4. possible coloring is shown in the figure
below
Ds lec 5_chap4
Ds lec 5_chap4

More Related Content

What's hot

Applications of graphs
Applications of graphsApplications of graphs
Applications of graphsTech_MX
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network systemManikanta satyala
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringSaurabh Kaushik
 
Math unit39 matrices
Math unit39 matricesMath unit39 matrices
Math unit39 matriceseLearningJa
 
Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graphRounak Biswas
 
Graph in Data Structure
Graph in Data StructureGraph in Data Structure
Graph in Data StructureProf Ansari
 
Graph: Euler path and Euler circuit
Graph: Euler path and Euler circuitGraph: Euler path and Euler circuit
Graph: Euler path and Euler circuitLiwayway Memije-Cruz
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structurehafsa komal
 
Introduction to homography
Introduction to homographyIntroduction to homography
Introduction to homographyShih-Hsiang Lin
 
Calculus and Numerical Method =_=
Calculus and Numerical Method =_=Calculus and Numerical Method =_=
Calculus and Numerical Method =_=Fazirah Zyra
 
Three Dimensional Geometry(Class 12)
Three Dimensional Geometry(Class 12)Three Dimensional Geometry(Class 12)
Three Dimensional Geometry(Class 12)TarunSingh389
 
Math unit28 straight lines
Math unit28 straight linesMath unit28 straight lines
Math unit28 straight lineseLearningJa
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - GraphMadhu Bala
 
Graph (Data structure)
Graph (Data structure) Graph (Data structure)
Graph (Data structure) shamiur rahman
 
CPSC 125 Ch 5 Sec 1
CPSC 125 Ch 5 Sec 1CPSC 125 Ch 5 Sec 1
CPSC 125 Ch 5 Sec 1David Wood
 
Data structure computer graphs
Data structure computer graphsData structure computer graphs
Data structure computer graphsKumar
 

What's hot (20)

Applications of graphs
Applications of graphsApplications of graphs
Applications of graphs
 
Data Structures - Lecture 10 [Graphs]
Data Structures - Lecture 10 [Graphs]Data Structures - Lecture 10 [Graphs]
Data Structures - Lecture 10 [Graphs]
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network system
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Math unit39 matrices
Math unit39 matricesMath unit39 matrices
Math unit39 matrices
 
Data structure
Data structureData structure
Data structure
 
Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graph
 
Graph in Data Structure
Graph in Data StructureGraph in Data Structure
Graph in Data Structure
 
Graph: Euler path and Euler circuit
Graph: Euler path and Euler circuitGraph: Euler path and Euler circuit
Graph: Euler path and Euler circuit
 
Graphs in Data Structure
 Graphs in Data Structure Graphs in Data Structure
Graphs in Data Structure
 
Introduction to homography
Introduction to homographyIntroduction to homography
Introduction to homography
 
Calculus and Numerical Method =_=
Calculus and Numerical Method =_=Calculus and Numerical Method =_=
Calculus and Numerical Method =_=
 
Three Dimensional Geometry(Class 12)
Three Dimensional Geometry(Class 12)Three Dimensional Geometry(Class 12)
Three Dimensional Geometry(Class 12)
 
Math unit28 straight lines
Math unit28 straight linesMath unit28 straight lines
Math unit28 straight lines
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Graph
GraphGraph
Graph
 
Graph (Data structure)
Graph (Data structure) Graph (Data structure)
Graph (Data structure)
 
CPSC 125 Ch 5 Sec 1
CPSC 125 Ch 5 Sec 1CPSC 125 Ch 5 Sec 1
CPSC 125 Ch 5 Sec 1
 
graph theory
graph theory graph theory
graph theory
 
Data structure computer graphs
Data structure computer graphsData structure computer graphs
Data structure computer graphs
 

Similar to Ds lec 5_chap4 (20)

nossi ch 6
nossi ch 6nossi ch 6
nossi ch 6
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
 
distructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdfdistructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdf
 
Presentation on graphs
Presentation on graphsPresentation on graphs
Presentation on graphs
 
ch10.5.pptx
ch10.5.pptxch10.5.pptx
ch10.5.pptx
 
Graph 1
Graph 1Graph 1
Graph 1
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
 
Graph algorithm
Graph algorithmGraph algorithm
Graph algorithm
 
Graph ds
Graph dsGraph ds
Graph ds
 
FCS (graphs).pptx
FCS (graphs).pptxFCS (graphs).pptx
FCS (graphs).pptx
 
6. Graphs
6. Graphs6. Graphs
6. Graphs
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
 
CS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on GraphsCS-102 Data Structure lectures on Graphs
CS-102 Data Structure lectures on Graphs
 
Graph Dynamical System on Graph Colouring
Graph Dynamical System on Graph ColouringGraph Dynamical System on Graph Colouring
Graph Dynamical System on Graph Colouring
 
UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 

More from Self-Employed

Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)Self-Employed
 
Infix prefix postfix
Infix prefix postfixInfix prefix postfix
Infix prefix postfixSelf-Employed
 
Discrete mathematics counting and logic relation
Discrete mathematics counting and logic relationDiscrete mathematics counting and logic relation
Discrete mathematics counting and logic relationSelf-Employed
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structureSelf-Employed
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2Self-Employed
 
2.2 inverse of a matrix
2.2 inverse of a matrix2.2 inverse of a matrix
2.2 inverse of a matrixSelf-Employed
 

More from Self-Employed (7)

Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)
 
Infix prefix postfix
Infix prefix postfixInfix prefix postfix
Infix prefix postfix
 
Discrete mathematics counting and logic relation
Discrete mathematics counting and logic relationDiscrete mathematics counting and logic relation
Discrete mathematics counting and logic relation
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structure
 
Abstract data types (adt) intro to data structure part 2
Abstract data types (adt)   intro to data structure part 2Abstract data types (adt)   intro to data structure part 2
Abstract data types (adt) intro to data structure part 2
 
2.2 inverse of a matrix
2.2 inverse of a matrix2.2 inverse of a matrix
2.2 inverse of a matrix
 
8086 architecture
8086 architecture8086 architecture
8086 architecture
 

Recently uploaded

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 

Recently uploaded (20)

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 

Ds lec 5_chap4

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. There is a simple path between every pair of distinct vertices of a connected undirected graph. • Suppose a and b are two distinct vertices of the connected undirected graph G =(V, E). • we know that G is connected so by definition there is at least one path between a and b . • Let x0, x1, …, xn, where x0 = a and xn = b, be the vertex sequence of a path of a least length. • Now if this path of the least length is not simple then we have xi = xj, for some i and j with 0 £ i < j. • This implies that there is a path from a to b of shorter length with the vertex sequence x0, x1, …, xi, …, xj+1, …, xn obtained by removing the edges corresponding to the vertex sequence xi+1, …, xj. • This shows that there is a simple path.
  • 6. • Cut vertices (articulation points) are those vertices in the graph whose removal along with the edges incident on them produces subgraph with more connected components than in the original graph. • Cut edge (bridge) is an edge whose removal produces a graph with more connected components than in the original graph.
  • 7. Euler Paths and Circuits • An Euler circuit in a graph G is a simple circuit containing every edge of G. • An Euler path in G is a simple path containing every edge of G. • Example: • Find the Euler path or circuit in the following graphs • No Euler circuit exist, • but the Euler path is • 1,2,5,1,3,5,4,3,5,2,4
  • 8. • The Euler circuit is • 1,2,3,6,9,8,7,4,5,8,6,5,2,4,1
  • 9. Necessary and Sufficient Conditions for Euler Circuits and Paths • Theorem 5: • A connected multigraph has an Euler circuit if and only if each of its vertices has even degree. • Proof: • Take a connected multigraph G =(V, E) where V and E are finite. We can prove the theorem in two parts.
  • 10. • Theorem 6: • A connected multigraph has an Euler path but not Euler circuit if and only if it has exactly two vertices of odd degree.
  • 11. • Find Euler path or circuit? • In the above graph, all the vertices have even degree, hence there is an Euler circuit. • The Euler circuit is 1,2,3,4,5,10,15,14,13,12,11,6,13,8,9,14,12,7,8,3,10,9,4,2,7,6,1
  • 12. Hamilton paths • A path x0, x1, …, xn-1, xn in the graph G = (V, E) is called Hamilton path if V ={x0, x1, …, xn-1, xn} and xi≠ xj for 0 ≤ i < j ≤n. • A circuit x0, x1, …, xn-1, xn, x0, with n > 1, in a graph G =(V, E) is a Hamilton circuit if x0, x1, …, xn-1, xn is a Hamilton path. • A graph with a vertex of degree one cannot have a Hamilton circuit. • If a vertex in a graph has degree 2, then both edges incident with this vertex must be part of Hamilton circuit.
  • 13. • Example: Find Hamilton circuit from the following graph if exists? What about Hamilton path? In graph (a) there is no Hamilton circuit since the node c has degree 2 and both the edges from it must be in Hamilton circuit, which is not possible. One of the Hamilton path in the graph (a) is a, b, c, d, e.
  • 14. • In graph (b) we can find Hamilton circuit, the circuit can be 1,2,3,5,6, 9,8,7,4,1. Since there is circuit we can have path also.
  • 15. • Theorem 7: Dirac’s Theorem • If G is a simple graph with n vertices with n >= 3 such that the degree of every vertex in G is at least n/2, then G has a Hamilton circuit. • Theorem 8: Ore’s Theorem • If G is a simple graph with n vertices with n >=3 such that deg(u) + deg(v) >=n for every pair of nonadjacent vertices u and v in G, then G has a Hamilton path.
  • 16. Planar graphs • A graph is called a planar if it can be drawn in the plane without any edges crossing. • Such drawing is called a planar representation of the graph. • Example: • Draw the graph below as planar representation of the graph.
  • 17. • Theorem 9: Euler’s Formula • Let G be a connected planar simple graph with e edges and v vertices. Let r be the number of regions in a planar representation of G. Then r = e – v + 2. • Example: • Suppose that a connected planar graph has 30 edges. If a planar representation of this graph divides the plane into 20 regions, how many vertices does this graph have? • Solution: • We have, r = 20, e = 30, • so by Euler’s formula we have • v = e – r + 2 = 30 – 20 + 2 = 12. • So the number of vertices is 12.
  • 18. • Corollary 1: • If G is a connected planar simple graph with e edges and v vertices where v>=3, then e<=3v – 6. • Corollary 2: • If G is a connected planar simple graph, then G has a vertex of degree not exceeding five. • Corollary 3: • If a connected planar simple graph has e edges and v vertices with v>=3 and no circuits of length three, then e<=2v – 4.
  • 19. • If a graph is planar, any graph obtained by removing an edge {u, v} and adding a new vertex w together with edges {u, w} and {w, v}. Such an operation is called an elementary subdivision. • The graphs G1 = (V1, E1) and G2 = (V2, E2) are called homeomorphic if they can be obtained from the same graph by a sequence of elementary subdivisions. • Example: • The below example graphs are homeomorphic to the third graph.
  • 20.
  • 21. • Theorem 10: Kuratowski’s Theorem • A graph is nonplanar if and only if it contains a subgraph homeomorphic to K3,3 or K5. • Example: • Determine whether the following graph is planar or not?
  • 22. • Above we saw that the graph is homeomorphic to K5, the given graph is not planar.
  • 23. Graph coloring • A coloring of a simple graph is the assignment of a color to each vertex of the graph so that no two adjacent vertices are assigned the same color. • A chromatic number of a graph is the least number of colors needed for a coloring of this graph. • Theorem 11:The Four Color Theorem • The chromatic number of a planar graph is no greater than four. • To show the chromatic number of a graph as k we must show that the graph can be colored using k colors and the given graph cannot be colored using fewer than k colors
  • 24. • Example#1 • Construct the dual graph for the map shown. Then find the number of colors needed to color the map so that no two adjacent regions have the same color.
  • 25. • We can color the graph with at most 2 colors as shown in the graph. Take R and G as red and green
  • 26. • Example#2 • Find the chromatic number of the graph below.
  • 27. • Lets start with vertex 1, it has adjacent vertices as 2, 3, 4, 5, 6, 9 so using only 2 colors would suffice for the graph having the edges from 1 to its adjacent vertices. • However since 9 has its adjacent vertices as 1, 2, 3, 4 we cannot just color the above graph with 2 colors because at least 1, 2 and 9 must have different colors. • Trying with 3 colors we found that at least 1, 2, 3, and 9 must have different colors. • So trying with four colors we can color the graph. Hence the chromatic number of the above graph is 4. possible coloring is shown in the figure below