Euler Paths and Circuits

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE An Euler.
Chapter 8 Topics in Graph Theory
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Graph-02.
Chapter 7 Graph Theory 7.1 Modeling with graphs and finding Euler circuits. Learning Objectives: Know how to use graphs as models and how to determine.
1 Lecture 5 (part 2) Graphs II Euler and Hamiltonian Path / Circuit Reading: Epp Chp 11.2, 11.3.
Lecture 21 Paths and Circuits CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Section 14.1 Intro to Graph Theory. Beginnings of Graph Theory Euler’s Konigsberg Bridge Problem (18 th c.)  Can one walk through town and cross all.
A Presentation By: Jillian Minuto Troy Norman Alan Leggett Group Advisor: Prof. G. Warrington Graph Theory.
An Euler Circuit is a cycle of an undirected graph, that traverses every edge of the graph exactly once, and ends at the same node from which it began.
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
4/17/2017 Section 8.5 Euler & Hamilton Paths ch8.5.
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
Euler and Hamilton Paths
The Bridge Obsession Problem By Vamshi Krishna Vedam.
Can you find a way to cross every bridge only once?
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Graphs Rosen, Chapter 8. Isomorphism (Rosen 560 to 563) Are two graphs G1 and G2 of equal form? That is, could I rename the vertices of G1 such that the.
Euler and Hamilton Paths. Euler Paths and Circuits The Seven bridges of Königsberg a b c d A B C D.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
5.4 Graph Models (part I – simple graphs). Graph is the tool for describing real-life situation. The process of using mathematical concept to solve real-life.
Graphs, Paths & Circuits
Aim: What is an Euler Path and Circuit?
Lecture 10: Graph-Path-Circuit
Eulerian Paths and Cycles. What is a Eulerian Path Given an graph. Find a path which uses every edge exactly once. This path is called an Eulerian Path.
1.Quiz 5 due tomorrow afternoon in E309 from 1pm to 4pm. 2.Homework grades will be based on ten graded homework assignments (dropping the lowest one).
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
Lecture 52 Section 11.2 Wed, Apr 26, 2006
Lecture 11: 9.4 Connectivity Paths in Undirected & Directed Graphs Graph Isomorphisms Counting Paths between Vertices 9.5 Euler and Hamilton Paths Euler.
Chapter 6: Graphs 6.1 Euler Circuits
Introduction to Graph Theory
Euler and Hamiltonian Graphs
Graphs Rosen, Chapter 8. NOT ONE OF THESE! One of these!
1 Euler and Hamilton paths Jorge A. Cobb The University of Texas at Dallas.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
9.5 Euler and Hamilton graphs. 9.5: Euler and Hamilton paths Konigsberg problem.
1 Lecture 5 (part 2) Graphs II (a) Circuits; (b) Representation Reading: Epp Chp 11.2, 11.3
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
An Introduction to Graph Theory
EECS 203 Lecture 19 Graphs.
Çizge Algoritmaları.
Euler and Hamiltonian Graphs
Data Structures Graphs - Terminology
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
Euler and Hamiltonian Graphs
Graphs Rosen, Chapter 8.
Graph theory Definitions Trees, cycles, directed graphs.
Eulerian tours Miles Jones MTThF 8:30-9:50am CSE 4140 August 15, 2016.
Konigsberg’s Seven Bridges
Discrete Structures – CNS2300
EECS 203 Lecture 20 More Graphs.
Discrete Math: Hamilton Circuits
Euler Paths and Circuits
Euler Circuits and Paths
This unit is all about Puzzles Games Strategy.
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Discrete Math II Howon Kim
Konigsberg- in days past.
Graph Theory What is a graph?.
Representing Graphs Wade Trappe.
Graphs, Paths & Circuits
Euler and Hamilton Paths
Euler and Hamiltonian Graphs
Euler Paths and Euler Circuits
Applied Combinatorics, 4th Ed. Alan Tucker
Discrete Math II Howon Kim
Warm Up – 3/19 - Wednesday Give the vertex set. Give the edge set.
Discrete Math II Howon Kim
A Survey of Mathematics with Applications
Presentation transcript:

Euler Paths and Circuits

The Bridges of Königsberg Puzzle 18th century map of the city of Königsberg with 7 bridges over the Pregel river Find a walk through the city that would cross each bridge once and only once before returning to the starting point

Euler’s Solution to The Bridges of Königsberg C A D B Leonhard Euler (1707-1783) rephrased the question in terms of the multigraph (i.e., multiple edges allowed) C A D B Is there a cycle in the multigraph that traverses all its edges exactly once?

Euler cycles (circuits) and paths Euler cycle: a cycle traversing all the edges of the graph exactly once Euler path: a path (not a cycle) traversing all the edges of the graph exactly once Examples: Has neither Euler cycle no Euler path Has an Euler cycle Has an Euler path, but no Euler cycle

Necessary and sufficient conditions for Euler cycles Theorem 12.3.1 (1) A connected multigraph has an Euler cycle if and only if each of its vertices has even degree. (  ) A necessary condition (Why “only if”) Assume the graph has an Euler cycle. Observe that every time the cycle passes through a vertex, it contributes 2 to the vertex’s degree, since the cycle enters via an edge incident with this vertex and leaves via another such edge.

( ) A sufficient condition (Why “if”) Lemma Assume every vertex in a multigraph has even degree. Start at an arbitrary non-isolated vertex v0, choose an arbitrary edge (v0,v1), then choose an arbitrary unused edge from v1 and so on. Then after a finite number of steps the process will arrive at the starting vertex v0, yielding a cycle with distinct edges. Proof In the above procedure, once you entered a vertex v, there will always be another unused edge to exit v because v has an even degree and only an even number of the edges incident with it had been used before you entered it. The only edge from which you may not be able to exit after entering it is v0 (because an odd number of edges incident with v0 have been used as you didn’t enter it at the beginning) , but if you have reached v0, then you have already constructed a required cycle.

A procedure for constructing an Euler cycle Algorithm Euler(G) //Input: Connected graph G with all vertices having even degrees //Output: Euler cycle Construct a cycle in G using the procedure from Lemma Remove all the edges of cycle from G to get subgraph H while H has edges find a non-isolated vertex v that is both in cycle and in H //the existence of such a vertex is guaranteed by G’s connectivity construct subcycle in H using Lemma’s procedure splice subcycle into cycle at v remove all the edges of subcycle from H return cycle

Example G cycle 1231 H subcycle 34653 splicing 34653 into 1231 H 1 3 5 7 2 4 6 8 G 1 3 5 7 2 4 6 8 1 3 5 7 2 4 6 8 cycle 1231 H subcycle 34653 1 3 5 7 2 4 6 8 splicing 34653 into 1231 1 3 5 7 2 4 6 8 1 3 5 7 2 4 6 8 H

Example (cont.) H splicing 6786 into 12346531 H Euler cycle obtained 1 3 5 7 2 4 6 8 1 3 5 7 2 4 6 8 H 1 3 5 7 2 4 6 8 1 3 5 7 2 4 6 8 splicing 6786 into 12346531 H Euler cycle obtained 12346786531

Necessary and sufficient conditions for Euler paths Theorem 12.3.1 (2) A connected multigraph has an Euler path but not an Euler cycle if and only if it has exactly two vertices of odd degree.