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.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Chapter 8 Topics in Graph Theory
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Graph-02.
Introduction to Graphs
Graph Theory: Euler Circuits Christina Mende Math 480 April 15, 2013.
1 Lecture 5 (part 2) Graphs II Euler and Hamiltonian Path / Circuit Reading: Epp Chp 11.2, 11.3.
BY: MIKE BASHAM, Math in Scheduling. The Bridges of Konigsberg.
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
Graphs and Trees This handout: Eulerian Cycles: Sufficiency of the condition Hamiltonian tour.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
IEOR266 © Classification of MCNF problems.
1 CIS /204—Spring 2008 Recitation 10 Friday, April 4, 2008.
Analysis of Algorithms CS 477/677
4/17/2017 Section 8.5 Euler & Hamilton Paths ch8.5.
Euler Circuit Chapter 5. Fleury’s Algorithm Euler’s theorems are very useful to find if a graph has an Euler circuit or an Euler path when the graph is.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
Discrete Math Round, Round, Get Around… I Get Around Mathematics of Getting Around.
GRAPH Learning Outcomes Students should be able to:
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Programming for Geographical Information Analysis: Advanced Skills Online mini-lecture: Introduction to Networks Dr Andy Evans.
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
1 Excursions in Modern Mathematics Sixth Edition Peter Tannenbaum.
Chapter 2 Graph Algorithms.
Graph Theory Topics to be covered:
5.1  Routing Problems: planning and design of delivery routes.  Euler Circuit Problems: Type of routing problem also known as transversability problem.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
There is a Postman who delivers mail to a certain neighborhood of streets. The postman is unwilling to walk far so he wants to find the shortest route.
Euler and Hamilton Paths. Euler Paths and Circuits The Seven bridges of Königsberg a b c d A B C D.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
CS 200 Algorithms and Data Structures
Aim: What is an Euler Path and Circuit?
Lecture 10: Graph-Path-Circuit
Associated Matrices of Vertex Edge Graphs Euler Paths and Circuits Block Days April 30, May 1 and May
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
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.
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
Lecture 52 Section 11.2 Wed, Apr 26, 2006
Chapter 6: Graphs 6.1 Euler Circuits
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Introduction to Graph Theory
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
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.
Fleury's Algorithm Euler Circuit Algorithm
(CSC 102) Lecture 30 Discrete Structures. Graphs.
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,
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
1 Lecture 5 (part 2) Graphs II (a) Circuits; (b) Representation Reading: Epp Chp 11.2, 11.3
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
An Introduction to Graph Theory
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Çizge Algoritmaları.
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
Euler Paths and Circuits
Eulerian tours Miles Jones MTThF 8:30-9:50am CSE 4140 August 15, 2016.
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Genome Assembly.
Euler and Hamilton Paths
Applied Combinatorics, 4th Ed. Alan Tucker
Presentation transcript:

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. Euler's Theorem: A connected graph G possesses an Euler circuit if and only if G does not contain any nodes of odd degree. Proof of Euler's theorem: Assume that G has zero nodes of odd degree. It can then be shown that this is a necessary and a sufficient condition for an Euler circuit to exist. Part 1: It is necessary because any Euler circuit drawn on the graph must always enter a node through some edge and leave through another and all edges on the graph must be used exactly once. Thus, an even number of incident edges is required for every node on the graph.

Proof of Euler's theorem Part 2: Sufficiency, on the other hand, can be shown through the following tour construction argument. We begin at some initial node k 0 and draw a circuit through G (thus eventually returning to k 0 ). Let this circuit be denoted C 0. If C 0 happens to be an Euler circuit, this is fine; we stop. If C 0 is not an Euler circuit, then if we remove from G all edges used by circuit C 0, there must be some edges left over. Moreover, at least two of these edges must be incident on some node k 1 through which circuit C 0 has passed. This must be so since, by assumption, G is, first, connected and, second, all its nodes are of even degree (and C 0 has only used up an even number of edges which are incident on k 1 ). Thus, it is possible to draw another circuit C 1 originating and terminating at k 1, which uses only edges of G ', the graph left after we eliminate the edges of C 0 from G. This procedure may now be continued until eventually, say after the n th step, there will be no edges left uncovered. At that time, an Euler circuit will also have been obtained which will be a combination of circuits C 0, C 1, C 2,..., Cn.

Euler's theorem is a proof by construction. However, the algorithm could be O ( E 2 ) or O ( E log E ) where E is the number of edges in the graph. Note: both of these are O ( E 2 ): for i = 1 to n { for k = 1 to n { } for i = 1 to n { }.. (linear function of n times). for i = 1 to n { }

1.Pick any vertex to start. 2.From that vertex pick an edge to traverse, considering following rule: never cross a bridge of the reduced graph unless there is no other choice. 3.Darken that edge, as a reminder that you can't traverse it again. 4.Travel that edge, coming to the next vertex. 5.Repeat 2-4 until all edges have been traversed, and you are back at the starting vertex. By reduced graph we mean the original graph minus the darkened (already used) edges. A bridge of a graph G is an edge whose deletion increases the number of components of G. Fleury's Algorithm: O(E)?

Fleury's Algorithm in Action Pick any vertex (e.g. F) Take F to C (arbitrary) Take C to D (arbitrary)Take D to A (arbitrary) Take A to C. Can't go to B: that edge is a bridge of the reduced graph, and there are two other choices. How can we recognize a bridge efficiently? In the original graph, AB was not a bridge. Can we preprocess the graph in O ( E ) time identifying bridges and building a structure that can be updated in constant time with each reduction? A bridge is not a local property (i.e. if edge EF existed then AB would not be a bridge).

Scrub Tile Puzzle A Hamiltonian Cycle Puzzle Applet Given 10 equally sized index cards each with one of the following words: HEN, HUT, WIT, SAW, CAR, CUB, MOB, DIM, RED, SON. Arrange the cards in a rectangular closed chain such that any two adjacent words must share a common letter. The above may serve to demonstrate a possible arrangement. However, the words SON and RED, although adjacent, do not have a letter in common. Therefore, it's not a valid configuration. Repeat the same problem with the cards SON and HUT replaced by SUN and HOT.

Scrub Tile Puzzle Of the two variants of the puzzle, the second is solvable, the first is not. The two variants are represented by different graphs. A solution to the puzzle constitutes a Hamiltonian circuit on its graph. The first of the two is the famous Petersen graph that is known not to house any Hamiltonian circuits.

Dodecahedral Graph Is it Hamiltonian? If so, find the Hamiltonian Cycle A B C D E N O F G H P J K M Z V W X Y L

Knight's Tour Problem The "Knight's Tour" is a sequence of moves done by a knight on a chessboard. The knight is placed on an empty chessboard and, following the rules of chess, must visit each square exactly once. There are several billion solutions to the problem, of which about 122,000,000 have the knight finishing on a square which is just a move away from the starting square. Such a tour is described as “closed”. The Knight's Tour problem is an instance of the more general Hamiltonian path problem in graph theory. The problem of getting a closed Knight's Tour is similarly an instance of the Hamiltonian cycle problem.

Find a Closed Knight's Tour

State as Hamiltonian Path Problem For a given n value, find an arrangement of the first n natural values such that, at the same time: The sum of every two adjacent numbers is a prime. The sum of every two adjacent squares is a prime. Find such a sequence for n = 10.