SlideShare a Scribd company logo
1 of 28
Download to read offline
Path and Cycles
A.B.M. Ashikur Rahman
Week – 2 1
Walks, paths & circuits
• Walk/trail: finite alternating sequence of vertices and edges, beginning
and ending with vertices
• Closed walk: a walk to begin and end at the same vertex
• Open walk: the terminal vertices are distinct
• Path: open walk in which no vertex appears more than once
• Circuit/Cycle: closed walk in which no vertex (except the initial and
the final vertex)appears more than once
Week – 2 2
Walks, paths & circuits
Week – 2 3
Euler Graph
• Euler line: a closed walk running through every edge of G exactly once
• Looking for a Eulerian path in Konigsberg Bridge problem
• Can one find necessary and sufficient conditions for a graph to be
Eulerian?
Week – 2 4
Euler Graph
• THEOREM:
A given connected graph G is an Euler graph if and only if all vertices
of G are of even degree.
• Now check the Konigsberg Bridge problem again.
Week – 2 5
Euler Graph
• Some more examples:
Week – 2 6
Euler graph
• Unicursal line: an open walk that includes (or traces or covers) all
edges of a graph without retracing any edge a unicursal line
• Graph having unicursal line is unicursal graph (semi-Eulerian graph)
Week – 2 7
Operations on Graphs
Let’s assume: two graphs G1 = (V1, E1) and G2 = (V2, E2)
• Union - ∪ (G3 = G1 ⋃ G2)
• vertex set V3 = V1 ⋃ V2 and the edge set E3 = E1 ⋃ E2
• Intersection - ∩
• Same as union
• Ring sum - ⊕ (G3 = G1 ⊕ G2)
• graph consisting of the vertex set V1 ⋃ V2 and of edges that are either in G1 or
G2, but not in both.
Week – 2 8
Operations on Graphs
• Union - ∪
• Intersection - ∩
• Ring sum - ⊕
Week – 2 9
G1 G2
G1 ∩ G2
G1 ∪ G2
G1 ⊕ G2
Operations on Graphs
• If G1 & G2 are edge disjoint, then
• G1 ∩ G2 is a null graph
• G1 ⊕ G2 = G1 ∪ G2
• If G1 & G2 are vertex disjoint, then
• G1 ∩ G2 is empty
• For any graph G
• G ∪ G = G ∩ G = G
• G ⊕ G is a null graph
Week – 2 10
Operations on Graphs
• If g is a subgraph of G, then
• G ⊕ g = G – g ; is often called the complement of g in G
• Decomposition: a graph G is said to have decomposed into to
subgraphs g1 & g2 if
• g1 ∪ g2 = G and g1 ∩ g2 is a null graph
• Deletion(of edge or vertex)
• Fusion (like contraction without edge deletion)
Week – 2 11
Operations on Graphs
Vertex deletion and edge deletion
Fusion of vertices a and b
Week – 2 12
More on Euler graph
• Theorem:
A connected graph G is an Euler graph if and only if it can be
decomposed into circuits.
• Arbitrarily Traceable Graphs from vertex v:
• This graph is arbitrarily traceable from vertex c
Week – 2 13
More on Euler graph
• Theorem:
An Euler graph G is arbitrarily traceable from vertex v in G if and only if
every circuit in G contains v
Not arbitrarily traceable from any vertex arbitrarily traceable from all vertex
Week – 2 14
Fleury’s Algorithms
1. Make sure the graph has either 0 or 2 odd vertices
2. If there are 0 odd vertices, start anywhere. If there are 2 odd vertices,
start at one of them.
3. Follow edges one at a time. If you have a choice between a bridge
and a non-bridge, always choose the non-bridge.
4. Stop when you run out of edges.
Week – 2 15
Fleury’s Algorithms
• Euler circuit is: A-D-E-B-D-C-A
A
D
E
C
B
A
D
E
C
B
Week – 2 16
Hamiltonian graph
• Named after Sir William Hamilton
• Game called ‘Traveler's Dodecahedron’
• A player will choose 5-vertex path, the other
player must extend it to a spanning cycle
Week – 2 17
Hamiltonian Graphs
• Hamiltonian cycle – closed walk that visits every vertex exactly once
• Hamiltonian graph
Hamiltonian Semi-Hamiltonian Non-Hamiltonian
Week – 2 18
Hamiltonian Graphs
• THEOREM 7.1 (Ore, 1960) – If G is a simple graph with n (> 3)
vertices, and if deg(v) + deg(w) ≥ n for each pair of non-adjacent
vertices v and w, then G is Hamiltonian.
AD: 6 BE: 5
BC: 5
Week – 2
19
Hamiltonian Graphs
• THEOREM 7.1 (Ore, 1960) – If G is a simple graph with n (> 3)
vertices, and if deg(v) + deg(w) ≥ n for each pair of non-adjacent
vertices v and w, then G is Hamiltonian.
AD: 4 AE: 4
CD: 4 BE: 4
BC: 4
Week – 2
20
Hamiltonian Graphs
• COROLLARY 7.2 (Dirac, 1952) – If G is a simple graph with n (≥ 3)
vertices, and if deg(v) ≥ n/2 for each vertex v, then G is Hamiltonian.
Week – 2 21
Hamiltonian Graphs
• COROLLARY 7.2 (Dirac, 1952) – If G is a simple graph with n (≥ 3)
vertices, and if deg(v) ≥ n/2 for each vertex v, then G is Hamiltonian.
Week – 2 22
Hamiltonian Graphs
• COROLLARY 7.2 (Dirac, 1952) – If G is a simple graph with n (≥ 3)
vertices, and if deg(v) ≥ n/2 for each vertex v, then G is Hamiltonian.
Week – 2 23
Hamiltonian Graphs
• Are complete graphs or cliques Hamiltonian?
• Number of Hamiltonian Circuits in a Graph:
Theorem:
In a complete graph with n vertices there are (n - l)/2 edge-disjoint
Hamiltonian circuits, if n is an odd number ≥ 3.
Week – 2 24
Seating arrangement
Nine members of a new club meet each day for
lunch at a round table. They decide to sit such that
every member has different neighbors at each
lunch. How many days can this arrangement last?
Solution:
Representing a member x by a vertex and the
possibility of his sitting next to another member y
by an edge between x and y, we construct a graph G
Let us find edge disjoint Hamiltonian cycles.
Week – 2 25
Travelling Salesman Problem
Week – 2 26
Chinese postman problem:
Week – 2 27
• It is the problem that the Chinese Postman faces: he wishes to travel
along every road in a city in order to deliver letters, with the least
possible distance. The problem is how to find a shortest closed walk of
the graph in which each edge is traversed at least once, rather than
exactly once.
Chinese postman problem:
Week – 2 28

More Related Content

What's hot

Cs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersCs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersappasami
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabatinabati
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applicationsManikanta satyala
 
SINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.pptSINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.pptshanthishyam
 
Dijkstra’s algorithm
Dijkstra’s algorithmDijkstra’s algorithm
Dijkstra’s algorithmfaisal2204
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphsTech_MX
 
Bfs and dfs in data structure
Bfs and dfs in  data structure Bfs and dfs in  data structure
Bfs and dfs in data structure Ankit Kumar Singh
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theoryNilaNila16
 
PRIM’S AND KRUSKAL’S ALGORITHM
PRIM’S AND KRUSKAL’S  ALGORITHMPRIM’S AND KRUSKAL’S  ALGORITHM
PRIM’S AND KRUSKAL’S ALGORITHMJaydeepDesai10
 
My Lecture Notes from Linear Algebra
My Lecture Notes fromLinear AlgebraMy Lecture Notes fromLinear Algebra
My Lecture Notes from Linear AlgebraPaul R. Martin
 
A presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithmA presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithmGaurav Kolekar
 

What's hot (20)

Cs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersCs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answers
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
Floyd Warshall Algorithm
Floyd Warshall AlgorithmFloyd Warshall Algorithm
Floyd Warshall Algorithm
 
Graph theory
Graph theoryGraph theory
Graph theory
 
SINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.pptSINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.ppt
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
 
MATCHING GRAPH THEORY
MATCHING GRAPH THEORYMATCHING GRAPH THEORY
MATCHING GRAPH THEORY
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Dijkstra’s algorithm
Dijkstra’s algorithmDijkstra’s algorithm
Dijkstra’s algorithm
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphs
 
Bfs and dfs in data structure
Bfs and dfs in  data structure Bfs and dfs in  data structure
Bfs and dfs in data structure
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theory
 
Trees
Trees Trees
Trees
 
Bipartite graph
Bipartite graphBipartite graph
Bipartite graph
 
PRIM’S AND KRUSKAL’S ALGORITHM
PRIM’S AND KRUSKAL’S  ALGORITHMPRIM’S AND KRUSKAL’S  ALGORITHM
PRIM’S AND KRUSKAL’S ALGORITHM
 
My Lecture Notes from Linear Algebra
My Lecture Notes fromLinear AlgebraMy Lecture Notes fromLinear Algebra
My Lecture Notes from Linear Algebra
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
A presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithmA presentation on prim's and kruskal's algorithm
A presentation on prim's and kruskal's algorithm
 

Similar to Graph Theory: Paths & Cycles

Similar to Graph Theory: Paths & Cycles (20)

Graph Theory: Planarity & Dual Graph
Graph Theory: Planarity & Dual GraphGraph Theory: Planarity & Dual Graph
Graph Theory: Planarity & Dual Graph
 
Graph ds
Graph dsGraph ds
Graph ds
 
graph theory
graph theory graph theory
graph theory
 
Math
MathMath
Math
 
Graph data structure
Graph data structureGraph data structure
Graph data structure
 
Graph theory
Graph theoryGraph theory
Graph theory
 
MinFill_Presentation
MinFill_PresentationMinFill_Presentation
MinFill_Presentation
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
Euler graph
Euler graphEuler graph
Euler graph
 
Fleurys abas abbasli_
Fleurys abas  abbasli_Fleurys abas  abbasli_
Fleurys abas abbasli_
 
6.14.4 Angle Relationships
6.14.4 Angle Relationships6.14.4 Angle Relationships
6.14.4 Angle Relationships
 
ch10.5.pptx
ch10.5.pptxch10.5.pptx
ch10.5.pptx
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
 
6.14.3 Angle Relationships
6.14.3 Angle Relationships6.14.3 Angle Relationships
6.14.3 Angle Relationships
 
distructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdfdistructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdf
 
Shortest path
Shortest pathShortest path
Shortest path
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
 
Presentation on graphs
Presentation on graphsPresentation on graphs
Presentation on graphs
 
LEXBFS on Chordal Graphs
LEXBFS on Chordal GraphsLEXBFS on Chordal Graphs
LEXBFS on Chordal Graphs
 
08_Euler and hamiltonian.pptx
08_Euler and hamiltonian.pptx08_Euler and hamiltonian.pptx
08_Euler and hamiltonian.pptx
 

More from Ashikur Rahman

Graph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphsGraph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphsAshikur Rahman
 
SOP writing: What, Why & How
SOP writing: What, Why & HowSOP writing: What, Why & How
SOP writing: What, Why & HowAshikur Rahman
 
Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism Ashikur Rahman
 
Graph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-VerticesGraph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-VerticesAshikur Rahman
 
Cybercrimes and Cybercriminals
Cybercrimes and CybercriminalsCybercrimes and Cybercriminals
Cybercrimes and CybercriminalsAshikur Rahman
 
E-Marketing and Advertising Concepts
E-Marketing and Advertising ConceptsE-Marketing and Advertising Concepts
E-Marketing and Advertising ConceptsAshikur Rahman
 
Outlier analysis,Chapter-12, Data Mining: Concepts and Techniques
Outlier analysis,Chapter-12, Data Mining: Concepts and TechniquesOutlier analysis,Chapter-12, Data Mining: Concepts and Techniques
Outlier analysis,Chapter-12, Data Mining: Concepts and TechniquesAshikur Rahman
 
Machine learning algorithms for data mining
Machine learning algorithms for data miningMachine learning algorithms for data mining
Machine learning algorithms for data miningAshikur Rahman
 
Signature verification Using SIFT Features
Signature verification Using SIFT FeaturesSignature verification Using SIFT Features
Signature verification Using SIFT FeaturesAshikur Rahman
 

More from Ashikur Rahman (9)

Graph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphsGraph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphs
 
SOP writing: What, Why & How
SOP writing: What, Why & HowSOP writing: What, Why & How
SOP writing: What, Why & How
 
Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism Graph Theory: Connectivity & Isomorphism
Graph Theory: Connectivity & Isomorphism
 
Graph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-VerticesGraph Theory: Cut-Set and Cut-Vertices
Graph Theory: Cut-Set and Cut-Vertices
 
Cybercrimes and Cybercriminals
Cybercrimes and CybercriminalsCybercrimes and Cybercriminals
Cybercrimes and Cybercriminals
 
E-Marketing and Advertising Concepts
E-Marketing and Advertising ConceptsE-Marketing and Advertising Concepts
E-Marketing and Advertising Concepts
 
Outlier analysis,Chapter-12, Data Mining: Concepts and Techniques
Outlier analysis,Chapter-12, Data Mining: Concepts and TechniquesOutlier analysis,Chapter-12, Data Mining: Concepts and Techniques
Outlier analysis,Chapter-12, Data Mining: Concepts and Techniques
 
Machine learning algorithms for data mining
Machine learning algorithms for data miningMachine learning algorithms for data mining
Machine learning algorithms for data mining
 
Signature verification Using SIFT Features
Signature verification Using SIFT FeaturesSignature verification Using SIFT Features
Signature verification Using SIFT Features
 

Recently uploaded

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 

Recently uploaded (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 

Graph Theory: Paths & Cycles

  • 1. Path and Cycles A.B.M. Ashikur Rahman Week – 2 1
  • 2. Walks, paths & circuits • Walk/trail: finite alternating sequence of vertices and edges, beginning and ending with vertices • Closed walk: a walk to begin and end at the same vertex • Open walk: the terminal vertices are distinct • Path: open walk in which no vertex appears more than once • Circuit/Cycle: closed walk in which no vertex (except the initial and the final vertex)appears more than once Week – 2 2
  • 3. Walks, paths & circuits Week – 2 3
  • 4. Euler Graph • Euler line: a closed walk running through every edge of G exactly once • Looking for a Eulerian path in Konigsberg Bridge problem • Can one find necessary and sufficient conditions for a graph to be Eulerian? Week – 2 4
  • 5. Euler Graph • THEOREM: A given connected graph G is an Euler graph if and only if all vertices of G are of even degree. • Now check the Konigsberg Bridge problem again. Week – 2 5
  • 6. Euler Graph • Some more examples: Week – 2 6
  • 7. Euler graph • Unicursal line: an open walk that includes (or traces or covers) all edges of a graph without retracing any edge a unicursal line • Graph having unicursal line is unicursal graph (semi-Eulerian graph) Week – 2 7
  • 8. Operations on Graphs Let’s assume: two graphs G1 = (V1, E1) and G2 = (V2, E2) • Union - ∪ (G3 = G1 ⋃ G2) • vertex set V3 = V1 ⋃ V2 and the edge set E3 = E1 ⋃ E2 • Intersection - ∩ • Same as union • Ring sum - ⊕ (G3 = G1 ⊕ G2) • graph consisting of the vertex set V1 ⋃ V2 and of edges that are either in G1 or G2, but not in both. Week – 2 8
  • 9. Operations on Graphs • Union - ∪ • Intersection - ∩ • Ring sum - ⊕ Week – 2 9 G1 G2 G1 ∩ G2 G1 ∪ G2 G1 ⊕ G2
  • 10. Operations on Graphs • If G1 & G2 are edge disjoint, then • G1 ∩ G2 is a null graph • G1 ⊕ G2 = G1 ∪ G2 • If G1 & G2 are vertex disjoint, then • G1 ∩ G2 is empty • For any graph G • G ∪ G = G ∩ G = G • G ⊕ G is a null graph Week – 2 10
  • 11. Operations on Graphs • If g is a subgraph of G, then • G ⊕ g = G – g ; is often called the complement of g in G • Decomposition: a graph G is said to have decomposed into to subgraphs g1 & g2 if • g1 ∪ g2 = G and g1 ∩ g2 is a null graph • Deletion(of edge or vertex) • Fusion (like contraction without edge deletion) Week – 2 11
  • 12. Operations on Graphs Vertex deletion and edge deletion Fusion of vertices a and b Week – 2 12
  • 13. More on Euler graph • Theorem: A connected graph G is an Euler graph if and only if it can be decomposed into circuits. • Arbitrarily Traceable Graphs from vertex v: • This graph is arbitrarily traceable from vertex c Week – 2 13
  • 14. More on Euler graph • Theorem: An Euler graph G is arbitrarily traceable from vertex v in G if and only if every circuit in G contains v Not arbitrarily traceable from any vertex arbitrarily traceable from all vertex Week – 2 14
  • 15. Fleury’s Algorithms 1. Make sure the graph has either 0 or 2 odd vertices 2. If there are 0 odd vertices, start anywhere. If there are 2 odd vertices, start at one of them. 3. Follow edges one at a time. If you have a choice between a bridge and a non-bridge, always choose the non-bridge. 4. Stop when you run out of edges. Week – 2 15
  • 16. Fleury’s Algorithms • Euler circuit is: A-D-E-B-D-C-A A D E C B A D E C B Week – 2 16
  • 17. Hamiltonian graph • Named after Sir William Hamilton • Game called ‘Traveler's Dodecahedron’ • A player will choose 5-vertex path, the other player must extend it to a spanning cycle Week – 2 17
  • 18. Hamiltonian Graphs • Hamiltonian cycle – closed walk that visits every vertex exactly once • Hamiltonian graph Hamiltonian Semi-Hamiltonian Non-Hamiltonian Week – 2 18
  • 19. Hamiltonian Graphs • THEOREM 7.1 (Ore, 1960) – If G is a simple graph with n (> 3) vertices, and if deg(v) + deg(w) ≥ n for each pair of non-adjacent vertices v and w, then G is Hamiltonian. AD: 6 BE: 5 BC: 5 Week – 2 19
  • 20. Hamiltonian Graphs • THEOREM 7.1 (Ore, 1960) – If G is a simple graph with n (> 3) vertices, and if deg(v) + deg(w) ≥ n for each pair of non-adjacent vertices v and w, then G is Hamiltonian. AD: 4 AE: 4 CD: 4 BE: 4 BC: 4 Week – 2 20
  • 21. Hamiltonian Graphs • COROLLARY 7.2 (Dirac, 1952) – If G is a simple graph with n (≥ 3) vertices, and if deg(v) ≥ n/2 for each vertex v, then G is Hamiltonian. Week – 2 21
  • 22. Hamiltonian Graphs • COROLLARY 7.2 (Dirac, 1952) – If G is a simple graph with n (≥ 3) vertices, and if deg(v) ≥ n/2 for each vertex v, then G is Hamiltonian. Week – 2 22
  • 23. Hamiltonian Graphs • COROLLARY 7.2 (Dirac, 1952) – If G is a simple graph with n (≥ 3) vertices, and if deg(v) ≥ n/2 for each vertex v, then G is Hamiltonian. Week – 2 23
  • 24. Hamiltonian Graphs • Are complete graphs or cliques Hamiltonian? • Number of Hamiltonian Circuits in a Graph: Theorem: In a complete graph with n vertices there are (n - l)/2 edge-disjoint Hamiltonian circuits, if n is an odd number ≥ 3. Week – 2 24
  • 25. Seating arrangement Nine members of a new club meet each day for lunch at a round table. They decide to sit such that every member has different neighbors at each lunch. How many days can this arrangement last? Solution: Representing a member x by a vertex and the possibility of his sitting next to another member y by an edge between x and y, we construct a graph G Let us find edge disjoint Hamiltonian cycles. Week – 2 25
  • 27. Chinese postman problem: Week – 2 27 • It is the problem that the Chinese Postman faces: he wishes to travel along every road in a city in order to deliver letters, with the least possible distance. The problem is how to find a shortest closed walk of the graph in which each edge is traversed at least once, rather than exactly once.