SlideShare a Scribd company logo
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

Fuzzy Logic and Neural Network
Fuzzy Logic and Neural NetworkFuzzy Logic and Neural Network
Fuzzy Logic and Neural Network
SHIMI S L
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
Subid Biswas
 
Graph colouring
Graph colouringGraph colouring
Graph colouring
Priyank Jain
 
Euler paths and circuits
Euler paths and circuitsEuler paths and circuits
Euler paths and circuits
03446940736
 
Graph theory
Graph theoryGraph theory
Graph theory
Muthulakshmilakshmi2
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theory
NilaNila16
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
Barani Tharan
 
graph theory
graph theory graph theory
graph theory
ganith2k13
 
Application Of Graph Data Structure
Application Of Graph Data StructureApplication Of Graph Data Structure
Application Of Graph Data Structure
Gaurang Dobariya
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
Premsankar Chakkingal
 
Graph theory
Graph theoryGraph theory
Graph theory
Thirunavukarasu Mani
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
Manikanta satyala
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
Ehsan Hamzei
 
Real life application
Real life applicationReal life application
Real life application
umadeviR3
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
Tech_MX
 
Isomorphic graph
Isomorphic graphIsomorphic graph
Isomorphic graph
umair khan
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
Dhammpal Ramtake
 
Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
sumitbardhan
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
Nabeel Ahsen
 
Graph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphsGraph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphs
Ashikur Rahman
 

What's hot (20)

Fuzzy Logic and Neural Network
Fuzzy Logic and Neural NetworkFuzzy Logic and Neural Network
Fuzzy Logic and Neural Network
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentationDijkstra's algorithm presentation
Dijkstra's algorithm presentation
 
Graph colouring
Graph colouringGraph colouring
Graph colouring
 
Euler paths and circuits
Euler paths and circuitsEuler paths and circuits
Euler paths and circuits
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Applications of graph theory
                      Applications of graph theory                      Applications of graph theory
Applications of graph theory
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
graph theory
graph theory graph theory
graph theory
 
Application Of Graph Data Structure
Application Of Graph Data StructureApplication Of Graph Data Structure
Application Of Graph Data Structure
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Real life application
Real life applicationReal life application
Real life application
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
 
Isomorphic graph
Isomorphic graphIsomorphic graph
Isomorphic graph
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Algorithm analysis
Algorithm analysisAlgorithm analysis
Algorithm analysis
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 
Graph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphsGraph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphs
 

Similar to Graph Theory: Paths & Cycles

Graph theory
Graph  theoryGraph  theory
Graph theory
Manash Kumar Mondal
 
Graph Theory: Planarity & Dual Graph
Graph Theory: Planarity & Dual GraphGraph Theory: Planarity & Dual Graph
Graph Theory: Planarity & Dual Graph
Ashikur Rahman
 
Graph ds
Graph dsGraph ds
Math
MathMath
Graph data structure
Graph data structureGraph data structure
Graph data structure
Tech_MX
 
Graph theory
Graph theoryGraph theory
Graph theory
bibinjose31
 
MinFill_Presentation
MinFill_PresentationMinFill_Presentation
MinFill_Presentation
Anna Lasota
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
Hector Zenil
 
Euler graph
Euler graphEuler graph
Euler graph
AAQIB PARREY
 
Fleurys abas abbasli_
Fleurys abas  abbasli_Fleurys abas  abbasli_
Fleurys abas abbasli_
abas1333
 
6.14.4 Angle Relationships
6.14.4 Angle Relationships6.14.4 Angle Relationships
6.14.4 Angle Relationships
smiller5
 
ch10.5.pptx
ch10.5.pptxch10.5.pptx
ch10.5.pptx
GauravGautam216125
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
Robert Almazan
 
6.14.3 Angle Relationships
6.14.3 Angle Relationships6.14.3 Angle Relationships
6.14.3 Angle Relationships
smiller5
 
distructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdfdistructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdf
ansariparveen06
 
Shortest path
Shortest pathShortest path
Shortest path
Ruchika Sinha
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
Tribhuvan University
 
Presentation on graphs
Presentation on graphsPresentation on graphs
Presentation on graphs
ForwardBlog Enewzletter
 
LEXBFS on Chordal Graphs
LEXBFS on Chordal GraphsLEXBFS on Chordal Graphs
LEXBFS on Chordal Graphs
nazlitemu
 
08_Euler and hamiltonian.pptx
08_Euler and hamiltonian.pptx08_Euler and hamiltonian.pptx
08_Euler and hamiltonian.pptx
RajnikantPandey11
 

Similar to Graph Theory: Paths & Cycles (20)

Graph theory
Graph  theoryGraph  theory
Graph theory
 
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
 
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

SOP writing: What, Why & How
SOP writing: What, Why & HowSOP writing: What, Why & How
SOP writing: What, Why & How
Ashikur 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-Vertices
Ashikur Rahman
 
Graph Theory: Trees
Graph Theory: TreesGraph Theory: Trees
Graph Theory: Trees
Ashikur Rahman
 
Cybercrimes and Cybercriminals
Cybercrimes and CybercriminalsCybercrimes and Cybercriminals
Cybercrimes and Cybercriminals
Ashikur Rahman
 
E-Marketing and Advertising Concepts
E-Marketing and Advertising ConceptsE-Marketing and Advertising Concepts
E-Marketing and Advertising Concepts
Ashikur 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 Techniques
Ashikur Rahman
 
Machine learning algorithms for data mining
Machine learning algorithms for data miningMachine learning algorithms for data mining
Machine learning algorithms for data mining
Ashikur Rahman
 
Signature verification Using SIFT Features
Signature verification Using SIFT FeaturesSignature verification Using SIFT Features
Signature verification Using SIFT Features
Ashikur Rahman
 

More from Ashikur Rahman (9)

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
 
Graph Theory: Trees
Graph Theory: TreesGraph Theory: Trees
Graph Theory: Trees
 
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

Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 

Recently uploaded (20)

Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 

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.