KNURE, Software department, Ph. 7021-446, N.V. Bilous Faculty of computer sciences Software department, KNURE An Euler.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Addition Facts
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Transportation.
Great Theoretical Ideas in Computer Science for Some.
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Connectivity Lecture _13.
Graphs, Planar graphs Graph coloring
Discrete Mathematics Dr.-Ing. Erwin Sitompul
Discrete Mathematics 6. GRAPHS Lecture 10 Dr.-Ing. Erwin Sitompul
Addition 1’s to 20.
Week 1.
© 2008 Pearson Addison-Wesley. All rights reserved Chapter 13 Mathematics and Business.
Epp, section 10.? CS 202 Aaron Bloomfield
Chapter 8 Topics in Graph Theory
Chapter 9 Graphs.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Graph-02.
1 Lecture 5 (part 2) Graphs II Euler and Hamiltonian Path / Circuit Reading: Epp Chp 11.2, 11.3.
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.
Discrete Structures Chapter 7B Graphs Nurul Amelina Nasharuddin Multimedia Department.
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.
4/17/2017 Section 8.5 Euler & Hamilton Paths ch8.5.
Euler and Hamilton Paths
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Discrete.
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:
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
Euler and Hamilton Paths
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.
CS 200 Algorithms and Data Structures
Graphs.  Definition A simple graph G= (V, E) consists of vertices, V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements.
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.
Planar Graphs Graph Coloring
Aim: What is an Euler Path and Circuit?
Unit – V Graph theory. Representation of Graphs Graph G (V, E,  ) V Set of vertices ESet of edges  Function that assigns vertices {v, w} to each edge.
Discrete Mathematical Structures: Theory and Applications
Lecture 10: Graph-Path-Circuit
Vertex-Edge Graphs Euler Paths Euler Circuits. The Seven Bridges of Konigsberg.
AND.
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.
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
Chapter 6: Graphs 6.1 Euler Circuits
1) Find and label the degree of each vertex in the graph.
Euler and Hamiltonian Graphs
Graphs Rosen, Chapter 8. NOT ONE OF THESE! One of these!
(CSC 102) Lecture 30 Discrete Structures. Graphs.
Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
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
An Introduction to Graph Theory
Homework 8 Graph G is given by the figure below.
Euler and Hamiltonian Graphs
Graphs Hubert Chan (Chapter 9) [O1 Abstract Concepts]
Euler and Hamiltonian Graphs
Euler Paths and Circuits
Graphs Rosen, Chapter 8.
Konigsberg’s Seven Bridges
Discrete Structures – CNS2300
Can you draw this picture without lifting up your pen/pencil?
Introduction to Graph Theory Euler and Hamilton Paths and Circuits
Graph Theory What is a graph?.
Euler and Hamilton Paths
Euler and Hamiltonian Graphs
Warm Up – 3/19 - Wednesday Give the vertex set. Give the edge set.
Presentation transcript:

KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE An Euler and Hamilton paths and circuits Discrete mathematics.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 2 The task of Königsberg bridge problem The Seven Bridges of Königsberg. Whether it is possible to start at some location in the town, travel across all the bridges without crossing any bridge twice, and return to the starting point. The Seven Bridges of Königsberg

N.V.Belous5.Euler and Hamilton Circuits and Paths. 3 The task of Königsberg bridge problem Euler studied this problem using the multigraph obtained when the four regions are represented by vertices and the bridges by edges. The question becomes: Is there a simple circuit in this multigraph that contains every edge. Multigraph Model of the Town of Königsberg

N.V.Belous5.Euler and Hamilton Circuits and Paths. 4 An Euler circuit. An Euler path 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 Have the undirected graph G an Euler circuit, an Euler path. The graph G has an Euler circuit: V 1, V 2, V 3, V 4, V 6, V 5, V 4, V 2, V 6, V 1 The graph G does not have an Euler path.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 5 An Euler circuit. An Euler path Example Which of the directed graphs have an Euler circuit? Of those that do not, which have an Euler path? The graph H 2 has an Euler circuit a, g, c, b, g, e, d, f, a. Neither H 1 nor H 3 has an Euler circuit. H 3 has an Euler path c, a, b, e, d, b, but H 1 does not. d fa g H1H1 ba d c H2H2 b e c c b d H3H3 a The Directed Graphs H 1, H 2, and H 3

N.V.Belous5.Euler and Hamilton Circuits and Paths. 6 Necessary and sufficient conditions for Euler Circuit Euler Theorem. A connected multigraph has an Euler circuit if and only if each of its vertices has even degree. The graph, containing an Euler circuit is called an Euler graph. Example The graph G is connected. deg( V 1 )=2 deg( V 4 )=4 deg( V 2 )=4 deg( V 5 )=2 deg( V 3 )=2 deg( V 6 )=4 All vertices have even degrees, then G is Euler graph.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 7 Constructing Euler Circuits Algorithm Constructing Euler Circuits. procedure Euler (G: connected multigraph with all vertices of even degree) circuit: = a circuit in G beginning at an arbitrarily chosen vertex with edges successively added to form a path that returns to this vertex H: = G with the edges of this circuit removed while H has edges begin subcircuit: = a circuit in H beginning at a vertex in H that also is an endpoint of an edge of circuit H: = H with edges of subcircuit and all isolated vertices removed circuit: = circuit with subcircuit inserted at the appropriate vertex end {circuit is an Euler circuit}

N.V.Belous5.Euler and Hamilton Circuits and Paths. 8 Necessary and sufficient conditions for Euler Paths A connected multigraph has an Euler path but not an Euler circuit if and only if it has exactly two vertices of odd degree. Example Which graphs have an Euler path? G 1 contains exactly two vertices of odd degree b and d. Hence it has an Euler path that must have b and d as its endpoints. d b a c a f b e c d g G1G1 G2G2

N.V.Belous5.Euler and Hamilton Circuits and Paths. 9 Necessary and sufficient conditions for Euler Paths Continuation of an example One such Euler path is d, a, b, c, d, b. Similarly, G 2 has no Euler path since it has six vertices of odd degree. d b a c a f b e c d g G1G1 G2G2

N.V.Belous5.Euler and Hamilton Circuits and Paths. 10 The puzzle of Mohammed's scimitars Mohammed's scimitars can be drawn with using Euler circuits and paths. In this way where the drawing begins and ends at the same point. a k g h j i f c b e d

N.V.Belous5.Euler and Hamilton Circuits and Paths. 11 A Hamilton path. A Hamilton circuit A path x 0, x 1,…, x n-1, x n in the graph G = (V, E) is called a Hamilton path if V = {x 0, x 1,…, x n-1,. x n } and x i ≠ x j for 0 ≤ i <j ≤ n. A circuit x 0, x 1,…, x n-1, x n, x 0 (with n > 1) in a graph G = (V, E) is called a Hamilton circuit if x 0, x 1,…, x n-1, x n, x 0, is a Hamilton path.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 12 Hamilton’s puzzle Hamilton's puzzle consisted of a wooden dodecahedron (a polyhedron with 12 regular pentagons as faces). Is there a circuit in the graph that passes through each vertex exactly once? Hamilton's "Round the World" Puzzle.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 13 A Hamilton graph Graph in which exists Hamilton circuit is called a Hamilton graph Example Which of the simple graphs have a Hamilton circuit or, if not, a Hamilton path? a, b, c, d, e, a is a Hamilton circuit in G 1. e a d a d c b f c b g a e c b d

N.V.Belous5.Euler and Hamilton Circuits and Paths. 14 A Hamilton graph Continuation of an example There is no Hamilton circuit in G 2, but G 2 does have a Hamilton path a, b, c, d. G 3 has neither a Hamilton circuit nor a Hamilton path since any path containing all vertices must contain one of the edges {a, b}, {e, f}, and {c, d} more than once. e a d a d c b a e c b d f c b g

N.V.Belous5.Euler and Hamilton Circuits and Paths. 15 Necessary conditions for existence of Hamilton circuits Necessary conditions for existence of Hamilton circuits: 1.The graph G should be connected. 2.For the graph G cuts and bridges are absent.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 16 Sufficient conditions for existence of Hamilton circuits The theorem. If graph G is a connected simple graph with more then 2 vertices, then graph G has a Hamilton circuit if the degree of each vertex is at least n/2.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 17 Sufficient conditions for existence of Hamilton circuits Ore theorem. If in the graph G with n vertices (n 3) the sum of degrees of any two vertices u, v is not smaller than n (deg u + deg v n), That the graph G is a Hamilton graph. König theorem. In the complete directed graph G (which any pair vertices incorporates even in one direction) always exists Hamilton path.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 18 Roberts - Flores algorithm about Hamilton circuits presence on the graph Build a matrix M. Each columns corresponds to each vertex of the graph. Each elements of column specify vertex that incidence to initial vertex (for undirected graph) or is the end of arc that go out from initial vertex (for the directed graph). a b c d e f b c a c c a M = e d f d b c

N.V.Belous5.Euler and Hamilton Circuits and Paths. 19 Roberts - Flores algorithm about Hamilton circuits presence on the graph Begin with vertex a, assume that G´ ={а}. Then add vertices, using a matrix M as follows: 1) From a column a: get out every possible G´ = {а,b}. 2) From a column b: G´ = {а,b,с}.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 20 Roberts - Flores algorithm about Hamilton circuits presence on the graph 3) From a column с, the first vertex a is not possible because it is already chosen earlier. Add the following vertex d. In a result, G´ = {a, b, c, d, f}. 4) From a column f : all vertices a, b, c exist in G. In column f there are no possible variants come back on one step.

N.V.Belous5.Euler and Hamilton Circuits and Paths. 21 Roberts - Flores algorithm about Hamilton circuits presence on the graph 5) In columns d and c also there are no vertices after f and d, means, again come back. G´ = {a,b}. 6) In column b add vertex е, then c,d,f. G´ 1 = {a,b,e,c,d,f} – Hamilton path. The arc (f, a) gives Hamilton circuit. G´ 2 = {a,b,e,d,f,c}