ALGORITHMS FOR FINDING AN EULERIAN TRAIL

Size: px
Start display at page:

Download "ALGORITHMS FOR FINDING AN EULERIAN TRAIL"

Transcription

1 THE 1 ST INTERNATIONAL CONFERENCE ON APPLIED MATHEMATICS AND INFORMATICS AT UNIVERSITIES 2001 Section of didactic of mathematics and informatics, pp ALGORITHMS FOR FINDING AN EULERIAN TRAIL MILAN POKORNÝ Trnava, Trnava University, Faculty of Education Abstract: The trail T of the graph G is called Eulerian one, if it is closed and contains all the vertices and edges of the given graph G. In the present paper we describe two algorithms for finding the Eulerian trail of the graph. We also describe our software which can be used in teaching methods. This part of the theory of graphs is suitable for different types of schools. In mathematics it is very often possible to run into a problem to draw the given picture in one move and go through out each line only once (through the intercepts lines it is possible to go arbitrarily many times). It is known that there are quite difficult pictures on one side that can be drawn in one move and on the other side there are very simple pictures that cannot be drawn in one move. The problem has been evolved to find necessary and sufficient condition for drawing the picture in one move. This condition has been known in mathematics since the 18 th century. In 1736 an important mathematician L. Euler solved the following problem. The river Pregel, that flowed through the town Königsberg, formed two islands and so the town was divided into four parts joined together with seven bridges (see picture No.1). The problem was to design a circular walk around the town in the way to cross over the brigde only once. 364

2 L. Euler not only proved that such walk didn t exist but also he avolved the theory of solving similar problems. [3], [5], [1] The above mentioned problem of drawing the picture in one move that belongs into the field of funny mathematics has also got a practical utilization for optimalization of some Picture No. 1 situations related to distribution of goods etc. The problem of drawing picture in one move only can be transformed into the theory of graphs. Every intercept of two or more lines (or initial and end point of a line) is considered as a vertex of the graph and every line connecting two of these points is considered as an edge of the graph determined by these points. All basic definitions and terms such as graph, directed graph, connected graph, trail, etc. from the theory of graphs can be found in [3], [1], and [5]. In this article we deal with only simply undirected graphs without loops and multiple edges. All of mentioned terms and results can be extended into directed graphs, mixed graphs or multigraphs. The trail T of the graph G is called Eulerian trail, if it is closed and contains all the vertices and edges of the given graph G. Assuming the preceeding definition without the closing condition the trail is called open Eulerian trail. Graph G is called Eulerian graph if it contains the Eulerian trail. Eulerian graphs are characterized by the following theorem: Theorem: (see [3, Theorem 7.1]) For the arbitrary connected graph (multigraph) G, the following statements are equivalent: 1. the graph G is the Eulerian one, 2. a degree of every vertex of the graph G is even, 3. the set of edges of the graph G can be decomposed into simple cycles. The following simple algorithm is based on the idea of previous theorem to find Eulerian trail (see [4]). If we suppose the graph G is Eulerian one we can start form the arbitrary vertex v 0 of the graph G and ride over the ungone edges of the graph G. This riding will stop in the vertex v 0 because the degree of every vertex of the graph G is even. In this way we have formed the v 0 -v 0 trail T. If E(T)=E(G) then T is Eulerian trail. Otherwise we select a nontrivial component C G-E(T). Because the graph G is connected, T and C have a common vertex w. We will form the nontrivial w-w trail Q of the graph C by the same way as we have formed the v 0 -v 0 trail T. If we insert the trail Q into the trail T, we will obtain the 365

3 v 0 -v 0 trail T which is longer than the trail T. Because the graph G is the finite one the extention of the trails like that leads to Eulerian trail of the graph G. Edmonds and Johnson (1973) (see [2]) designed more effective algorithm on the base of Tarry s algorithm for the research of labyrinth. In the graph G we can choose the arbitrary vertex v 0 and then form a walk according to the following rules: - we are allowed to go over the edge in the same direction only once - at the point of leaving the arbitrary vertex we prefer the edges in this order: 1. non-gone over edges yet 2. gone over edges only in the direction to this vertex besides the first coming edge 3. the first coming edge Alongside it we remember the direction of going over the edges and for every vertex v v 0 of the graph G also the first coming edge into v. We try to remember the edges in that order how they are gone over the second time. This sequence of the edges is called feedback one and it is the searched Eulerian trail. (see [4, page 262]) Introduced method is a special case of Tarry s algorithm and if it is impossible to go on every edge of the component containing the vertex v 0 is gone over in both directions only once. This algorithm can be realised by the following programme (written in Turbo Pascal): uses crt; var f:text; {we suppose that information about a graph are in the text file with structure: the 1 st line number of vertices, the 2 nd line number of edges, the 3 rd and the 4 th line the vertices of the first edge, the 5 th and the 6 th line the vertices of the second edge, etc.} first_coming:array[1..100] of integer; {we remember the edge of the first coming for every vertex} edges:array[1..100,1..100] of byte; {this array contains information about the edges: 0-edge doesn t exist, 1- non-gone over edge, 2- gone over edge, 3- gone over edge, but in the reverse direction, 4- gone over edge in both directions} connected:array[1..100] of boolean; {if the vertex is connected with the vertex number one} i,j,ii,jj,vertex_number,edges_number,ph:integer; active_vertex,goal,gone_edges:integer; connect,change:boolean; c:char; function next_not_gone(i:integer):integer; {it finds the edge which started in the vertex i and we haven t gone over it yet and returns the number of the second vertex of this edge} var pom,pi:integer; pom:=0; for pi:=1 to vertex_number do if edges[i,pi]=1 then pom:=pi; next_not_gone:=pom; 366

4 function next_gone (i:integer):integer; {it finds the edge which started in the vertex i and we have already gone over it and returns the number of the second vertex of this edge } var pom,pi:integer; pom:=0; for pi:=1 to vertex_number do if (edges[i,pi]=3)and(pi<>first_coming[i]) then pom:=pi; next_gone:=pom; gone_edges:=0; {number of edges which are gone in both directions} for i:=1 to 100 do for j:=1 to 100 do edges[i,j]:=0; {reading information about the graph from the text file graph.pas} assign(f,'graph.pas');reset(f); {we suppose that text file is correct} readln(f,vertex_number); {number of vertices} for i:=1 to vertex_number do first_coming[i]:=0; readln(f,edges_number); {number of edges} for i:=1 to edges_number do {reading information about edges} readln(f,ii); readln(f,jj); edges[ii,jj]:=1; edges[jj,ii]:=1; {we check if the graph is connected} {connected[i] is true if there exist a path from vertex 1 to the vertex i} for i:=2 to vertex_number do connected[i]:=false; connected[1]:=true; repeat change:=false; for i:=1 to vertex_number do if connected[i] then for j:=1 to vertex_number do if (edges[i,j]>0) and (not connected[j]) then connected[j]:=true; change:=true; until (not change); {if connected[i] is false for some vertex i 2..vertex_number then the graph is not connected and programme will be finished} connect:=true; for i:=2 to vertex_number do if (not connected[i]) then connect:=false; if (not connect) then writeln('your graph isn t connected.'); readln; halt; 367

5 {we check if the degree of each vertex is even} for i:=1 to vertex_number do ph:=0; {number of edges incoming to the vertex i} for j:=1 to vertex_number do if edges[i,j]>0 then inc(ph); {if ph is odd for some vertex, programme will be finished} if (ph mod 2 = 1) then writeln('the degree of the vertex ',i,' is odd!'); readln; halt; {now we can start to find an Eulerian trail, because graph is connected and the degree of each vertex is even} active_vertex:=1; {we started in the vertex 1} repeat {first we are trying to go over the edges we haven t gone yet} if next_not_gone (active_vertex)>0 then goal:=next_not_gone (active_vertex); edges[active_vertex,goal]:=2; edges[goal,active_vertex]:=3; if first_coming[goal]=0 then first_coming[goal]:=active_vertex; active_vertex:=goal; end {then we chose the edges we have gone over only in the direction to the vertex active_vertex, but not the edge of the first coming} else if next_gone (active_vertex)>0 then goal:=next_gone(active_vertex); edges[active_vertex,goal]:=4; edges[goal,active_vertex]:=4; if first_coming[goal]=0 then first_coming[goal]:=active_vertex; writeln(active_vertex,'-',goal); active_vertex:=goal; inc(gone_edges); end {finally we go over the edge of the first coming} else goal:=first_coming[active_vertex]; edges[active_vertex,goal]:=4; edges[goal,active_vertex]:=4; if first_coming[goal]=0 then first_coming[goal]:=active_vertex; writeln(active_vertex,'-',goal); active_vertex:=goal; inc(gone_edges); end until (edges_number=gone_edges); Readln; end. If we want to use this algorithm in teaching at the different types of schools, we should solve some problems. We should start teaching with simple graphs and then use obtained 368

6 knowledge for more difficult graphs. However if the graph we want to draw in one move is too simple, students mostly draw it experimentally, without using this algorithm. That s why we decided to produce software that will serve to understand and practice this algorithm. All this software you can find on the web pages of the Department of mathematics and informatics of Pedagogical Faculty of Trnava University. The programme ukaztah shows the graph in the graphic mode. It simulates the algorithm of Edmonds and Johnson using colours. It stops after each step. Execution of the next step can be activated by pressing a key by user. Explanation in more details for all programs can be found in the file citajma.doc. The programme najditah can serve for teaching of finding Eulerian trail. The user can see the whole situation in the way as if he just walked along the graph. So he cannot see all graph. He can see only his local part, that is the vertex, in which he stands and the edges incoming to this vertex. Different groups of the edges (non-gone over, gone in both directions, gone in the direction to the vertex, gone in the direction from the vertex, the first coming edge) are displayed using different colours. If the user s decision in the vertex is wrong, the programme warns him about his mistake and makes him correct a mistake himself. At the end the programme displays all graph and shows user s going over the graph step by step. The difference between the programmes skusanie and najditah can be seen if user s decision in a vertex is wrong. Programme skusanie ignores user s mistakes and at the end it displays all graph and shows user s going over the graph step by step. Now user can see if he really found an Eulerian trail or not and if he did it according to Edmonds and Johnson s algorithm. If he made a mistake in some vertex, this part of programme warns him about it. Programme urobgraf enables to user to create a graph in graphic mode (he can create a graph as a text file following instructions in the file citajma.doc). This is more comfortable because he can see all graph. He can add and delete vertices and edges. He can also take some vertex and move it. Edges incoming to this vertex are moved automatically, of course. That s why this programme can be used in teaching isomorphic graphs, but it isn t our purpose. In this article we deal with only simple undirected graphs, but similar problems we can solve in directed graphs and mixed graphs (see [4]). If the Eulerian trail of the graph doesn t exist, we often find Eulerian walk (some edges can be occured more times). In practical life we often find the shortest walk, especially for evaluated graphs. References [1] BOSÁK, J.: Grafy a ich aplikácie. Alfa, Bratislava [2] ČUPR, K.: Geometrické hry a zábavy. Cesta k vědení, Praha [3] HARARY, F.: Graph theory. Reading, Addison Wesley, Moskva 1973 (Russian translation). [4] PLESNÍK, J.: Grafové algoritmy, Veda, Bratislava [5] SEDLÁČEK, J.: Úvod do teorie grafů. Academia, Praha

Relation between 3 Utility Problem And Eulerian Trail

Relation between 3 Utility Problem And Eulerian Trail IOSR Journal of Computer Engineering (IOSR-JCE) e-issn: 2278-0661, p- ISSN: 2278-8727Volume 16, Issue 2, Ver. X (Mar-Apr. 2014), PP 13-22 Relation between 3 Utility Problem And Eulerian Trail Yashasvini

More information

#30: Graph theory May 25, 2009

#30: Graph theory May 25, 2009 #30: Graph theory May 25, 2009 Graph theory is the study of graphs. But not the kind of graphs you are used to, like a graph of y = x 2 graph theory graphs are completely different from graphs of functions.

More information

Fundamental Properties of Graphs

Fundamental Properties of Graphs Chapter three In many real-life situations we need to know how robust a graph that represents a certain network is, how edges or vertices can be removed without completely destroying the overall connectivity,

More information

11.2 Eulerian Trails

11.2 Eulerian Trails 11.2 Eulerian Trails K.. onigsberg, 1736 Graph Representation A B C D Do You Remember... Definition A u v trail is a u v walk where no edge is repeated. Do You Remember... Definition A u v trail is a u

More information

Introduction to Graphs

Introduction to Graphs Introduction to Graphs Historical Motivation Seven Bridges of Königsberg Königsberg (now Kaliningrad, Russia) around 1735 Problem: Find a walk through the city that would cross each bridge once and only

More information

Displaying Data with Graphs. Chapter 6 Mathematics of Data Management (Nelson) MDM 4U

Displaying Data with Graphs. Chapter 6 Mathematics of Data Management (Nelson) MDM 4U Displaying Data with Graphs Chapter 6 Mathematics of Data Management (Nelson) MDM 4U Cause and Effect Diagrams Developed by Dr. Kaoru Ishikawa in 1943 (Japan) Picture composed of lines and symbols designed

More information

4.1 Eulerian Tours. 4. Eulerian Tours and Trails. Königsberg. Seven Bridges. Try. Königsberg bridge problem

4.1 Eulerian Tours. 4. Eulerian Tours and Trails. Königsberg. Seven Bridges. Try. Königsberg bridge problem 4. Eulerian Tours and Trails 4.1 Eulerian Tours FMONG NIE 1 FMONG NIE 2 Königsberg Königsberg was a city in eastern Prussia in 18 th century. river flowed through this city and separated it into four pieces.

More information

Varying Applications (examples)

Varying Applications (examples) Graph Theory Varying Applications (examples) Computer networks Distinguish between two chemical compounds with the same molecular formula but different structures Solve shortest path problems between cities

More information

Grade 7/8 Math Circles Graph Theory - Solutions October 13/14, 2015

Grade 7/8 Math Circles Graph Theory - Solutions October 13/14, 2015 Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 7/8 Math Circles Graph Theory - Solutions October 13/14, 2015 The Seven Bridges of Königsberg In

More information

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. An Introduction to Graph Theory SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics An Introduction to Graph Theory. Introduction. Definitions.. Vertices and Edges... The Handshaking Lemma.. Connected Graphs... Cut-Points and Bridges.

More information

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur

Lecture 5: Graphs. Rajat Mittal. IIT Kanpur Lecture : Graphs Rajat Mittal IIT Kanpur Combinatorial graphs provide a natural way to model connections between different objects. They are very useful in depicting communication networks, social networks

More information

6.2. Paths and Cycles

6.2. Paths and Cycles 6.2. PATHS AND CYCLES 85 6.2. Paths and Cycles 6.2.1. Paths. A path from v 0 to v n of length n is a sequence of n+1 vertices (v k ) and n edges (e k ) of the form v 0, e 1, v 1, e 2, v 2,..., e n, v n,

More information

Introduction to Graphs

Introduction to Graphs Introduction to Graphs Slides by Lap Chi Lau The Chinese University of Hong Kong This Lecture In this part we will study some basic graph theory. Graph is a useful concept to model many problems in computer

More information

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ - artale/z

CHAPTER 10 GRAPHS AND TREES. Alessandro Artale UniBZ -  artale/z CHAPTER 10 GRAPHS AND TREES Alessandro Artale UniBZ - http://www.inf.unibz.it/ artale/z SECTION 10.1 Graphs: Definitions and Basic Properties Copyright Cengage Learning. All rights reserved. Graphs: Definitions

More information

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC January 26, 2011

Graph Theory. 1 Introduction to Graphs. Martin Stynes Department of Mathematics, UCC   January 26, 2011 Graph Theory Martin Stynes Department of Mathematics, UCC email: m.stynes@ucc.ie January 26, 2011 1 Introduction to Graphs 1 A graph G = (V, E) is a non-empty set of nodes or vertices V and a (possibly

More information

Mohammad A. Yazdani, Ph.D. Abstract

Mohammad A. Yazdani, Ph.D. Abstract Utilizing Euler s Approach in Solving Konigsberg Bridge Problem to Identify Similar Traversable Networks in a Dynamic Geometry Teacher Education Environment: An Instructional Activity Mohammad A. Yazdani,

More information

Graph Theory CS/Math231 Discrete Mathematics Spring2015

Graph Theory CS/Math231 Discrete Mathematics Spring2015 1 Graphs Definition 1 A directed graph (or digraph) G is a pair (V, E), where V is a finite set and E is a binary relation on V. The set V is called the vertex set of G, and its elements are called vertices

More information

Graph Theory. 26 March Graph Theory 26 March /29

Graph Theory. 26 March Graph Theory 26 March /29 Graph Theory 26 March 2012 Graph Theory 26 March 2012 1/29 Graph theory was invented by a mathematician named Euler in the 18th century. We will see some of the problems which motivated its study. However,

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 CS 70 Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7 An Introduction to Graphs A few centuries ago, residents of the city of Königsberg, Prussia were interested in a certain problem.

More information

Week 7: Introduction to Graph Theory. 24 and 26 October, 2018

Week 7: Introduction to Graph Theory. 24 and 26 October, 2018 (1/32) MA284 : Discrete Mathematics Week 7: Introduction to Graph Theory. http://www.maths.nuigalway.ie/ niall/ma284/ 24 and 26 October, 2018 1 Graph theory A network of mathematicians Water-Electricity-Broadband

More information

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs

Discrete Mathematics for CS Spring 2008 David Wagner Note 13. An Introduction to Graphs CS 70 Discrete Mathematics for CS Spring 2008 David Wagner Note 13 An Introduction to Graphs Formulating a simple, precise specification of a computational problem is often a prerequisite to writing a

More information

Grades 7 & 8, Math Circles 31 October/1/2 November, Graph Theory

Grades 7 & 8, Math Circles 31 October/1/2 November, Graph Theory Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grades 7 & 8, Math Circles 31 October/1/2 November, 2017 Graph Theory Introduction Graph Theory is the

More information

8.2 Paths and Cycles

8.2 Paths and Cycles 8.2 Paths and Cycles Degree a b c d e f Definition The degree of a vertex is the number of edges incident to it. A loop contributes 2 to the degree of the vertex. (G) is the maximum degree of G. δ(g) is

More information

GRAPH THEORY AND LOGISTICS

GRAPH THEORY AND LOGISTICS GRAPH THEORY AND LOGISTICS Maja Fošner and Tomaž Kramberger University of Maribor Faculty of Logistics Mariborska cesta 2 3000 Celje Slovenia maja.fosner@uni-mb.si tomaz.kramberger@uni-mb.si Abstract This

More information

Topic 10 Part 2 [474 marks]

Topic 10 Part 2 [474 marks] Topic Part 2 [474 marks] The complete graph H has the following cost adjacency matrix Consider the travelling salesman problem for H a By first finding a minimum spanning tree on the subgraph of H formed

More information

Launch problem: Lining streets

Launch problem: Lining streets Math 5340 June 15,2012 Dr. Cordero Launch problem: Lining streets Lining Street Problem A Problem on Eulerian Circuits http://www.edmath.org/mattours/discrete/ Your job for the day is to drive slowly around

More information

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8 CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao,David Tse Note 8 An Introduction to Graphs Formulating a simple, precise specification of a computational problem is often a prerequisite

More information

Introduction III. Graphs. Motivations I. Introduction IV

Introduction III. Graphs. Motivations I. Introduction IV Introduction I Graphs Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Graph theory was introduced in the 18th century by Leonhard Euler via the Königsberg

More information

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas

Euler and Hamilton paths. Jorge A. Cobb The University of Texas at Dallas Euler and Hamilton paths Jorge A. Cobb The University of Texas at Dallas 1 Paths and the adjacency matrix The powers of the adjacency matrix A r (with normal, not boolean multiplication) contain the number

More information

Chapter 11: Graphs and Trees. March 23, 2008

Chapter 11: Graphs and Trees. March 23, 2008 Chapter 11: Graphs and Trees March 23, 2008 Outline 1 11.1 Graphs: An Introduction 2 11.2 Paths and Circuits 3 11.3 Matrix Representations of Graphs 4 11.5 Trees Graphs: Basic Definitions Informally, a

More information

Graphs. Reading Assignment. Mandatory: Chapter 3 Sections 3.1 & 3.2. Peeking into Computer Science. Jalal Kawash 2010

Graphs. Reading Assignment. Mandatory: Chapter 3 Sections 3.1 & 3.2. Peeking into Computer Science. Jalal Kawash 2010 Graphs Mandatory: hapter 3 Sections 3.1 & 3.2 Reading ssignment 2 Graphs bstraction of ata 3 t the end of this section, you will be able to: 1.efine directed and undirected graphs 2.Use graphs to model

More information

Graph theory was invented by a mathematician named Euler in the 18th century. We will see some of the problems which motivated its study.

Graph theory was invented by a mathematician named Euler in the 18th century. We will see some of the problems which motivated its study. Graph Theory Graph theory was invented by a mathematician named Euler in the 18th century. We will see some of the problems which motivated its study. However, it wasn t studied too systematically until

More information

FINDING THE RIGHT PATH

FINDING THE RIGHT PATH Task 1: Seven Bridges of Konigsberg! Today we are going to begin with the story of Konigsberg in the 18 th century, its geography, bridges, and the question asked by its citizens. FINDING THE RIGHT PATH

More information

3 Euler Tours, Hamilton Cycles, and Their Applications

3 Euler Tours, Hamilton Cycles, and Their Applications 3 Euler Tours, Hamilton Cycles, and Their Applications 3.1 Euler Tours and Applications 3.1.1 Euler tours Carefully review the definition of (closed) walks, trails, and paths from Section 1... Definition

More information

Circuits and Paths. April 13, 2014

Circuits and Paths. April 13, 2014 Circuits and Paths April 13, 2014 Warm Up Problem Quandroland is an insect country that has four cities. Draw all possible ways tunnels can join the cities in Quadroland. (Remember that some cities might

More information

Eulerian Cycle (2A) Young Won Lim 4/26/18

Eulerian Cycle (2A) Young Won Lim 4/26/18 Eulerian Cycle (2A) Copyright (c) 2015 2018 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any

More information

2. CONNECTIVITY Connectivity

2. CONNECTIVITY Connectivity 2. CONNECTIVITY 70 2. Connectivity 2.1. Connectivity. Definition 2.1.1. (1) A path in a graph G = (V, E) is a sequence of vertices v 0, v 1, v 2,..., v n such that {v i 1, v i } is an edge of G for i =

More information

MATH 113 Section 9.2: Topology

MATH 113 Section 9.2: Topology MATH 113 Section 9.2: Topology Prof. Jonathan Duncan Walla Walla College Winter Quarter, 2007 Outline 1 Introduction to Topology 2 Topology and Childrens Drawings 3 Networks 4 Conclusion Geometric Topology

More information

The University of Sydney MATH2969/2069. Graph Theory Tutorial 2 (Week 9) 2008

The University of Sydney MATH2969/2069. Graph Theory Tutorial 2 (Week 9) 2008 The University of Sydney MATH99/09 Graph Theory Tutorial (Week 9) 00. Show that the graph on the left is Hamiltonian, but that the other two are not. To show that the graph is Hamiltonian, simply find

More information

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points MC02 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/1 68 points + 6 extra credit points 1. [CH] p. 1, #1... a. In each case, for the two graphs you say are isomorphic, justify it by labeling their vertices

More information

EULERIAN GRAPHS AND ITS APPLICATIONS

EULERIAN GRAPHS AND ITS APPLICATIONS EULERIAN GRAPHS AND ITS APPLICATIONS Aruna R 1, Madhu N.R 2 & Shashidhar S.N 3 1.2&3 Assistant Professor, Department of Mathematics. R.L.Jalappa Institute of Technology, Doddaballapur, B lore Rural Dist

More information

Dieter Jungnickel (2008), Graphs, Networks and Algorithms, 3rd edition, which is available online via SpringerLink.

Dieter Jungnickel (2008), Graphs, Networks and Algorithms, 3rd edition, which is available online via SpringerLink. Lecture 1 First Steps in Graph Theory This lecture introduces Graph Theory, the main subject of the course, and includes some basic definitions as well as a number of standard examples. Reading: Some of

More information

Module 2: NETWORKS AND DECISION MATHEMATICS

Module 2: NETWORKS AND DECISION MATHEMATICS Further Mathematics 2017 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

The Konigsberg Bridge Problem

The Konigsberg Bridge Problem The Konigsberg Bridge Problem This is a classic mathematical problem. There were seven bridges across the river Pregel at Königsberg. Is it possible to take a walk in which each bridge is crossed exactly

More information

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around 1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************

More information

Intermediate Math Circles Wednesday, February 22, 2017 Graph Theory III

Intermediate Math Circles Wednesday, February 22, 2017 Graph Theory III 1 Eulerian Graphs Intermediate Math Circles Wednesday, February 22, 2017 Graph Theory III Let s begin this section with a problem that you may remember from lecture 1. Consider the layout of land and water

More information

0.0.1 Network Analysis

0.0.1 Network Analysis Graph Theory 0.0.1 Network Analysis Prototype Example: In Algonquian Park the rangers have set up snowmobile trails with various stops along the way. The system of trails is our Network. The main entrance

More information

TWO CONTRIBUTIONS OF EULER

TWO CONTRIBUTIONS OF EULER TWO CONTRIBUTIONS OF EULER SIEMION FAJTLOWICZ. MATH 4315 Eulerian Tours. Although some mathematical problems which now can be thought of as graph-theoretical, go back to the times of Euclid, the invention

More information

Graphs And Algorithms

Graphs And Algorithms Graphs nd lgorithms Mandatory: hapter 3 Sections 3.1 & 3.2 Reading ssignment 2 1 Graphs bstraction of ata 3 t the end of this section, you will be able to: 1. efine directed and undirected graphs 2. Use

More information

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks

Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Further Mathematics 2016 Module 2: NETWORKS AND DECISION MATHEMATICS Chapter 9 Undirected Graphs and Networks Key knowledge the conventions, terminology, properties and types of graphs; edge, face, loop,

More information

INTRODUCTION TO GRAPH THEORY. 1. Definitions

INTRODUCTION TO GRAPH THEORY. 1. Definitions INTRODUCTION TO GRAPH THEORY D. JAKOBSON 1. Definitions A graph G consists of vertices {v 1, v 2,..., v n } and edges {e 1, e 2,..., e m } connecting pairs of vertices. An edge e = (uv) is incident with

More information

Chapter 9. Graph Theory

Chapter 9. Graph Theory Chapter 9. Graph Theory Prof. Tesler Math 8A Fall 207 Prof. Tesler Ch. 9. Graph Theory Math 8A / Fall 207 / 50 Graphs PC Computer network PC2 Modem ISP Remote server PC Emily Dan Friends Irene Gina Harry

More information

of Nebraska - Lincoln

of Nebraska - Lincoln University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln MAT Exam Expository Papers Math in the Middle Institute Partnership 7-2008 De Bruijn Cycles Val Adams University of Nebraska

More information

Fleury s Algorithm The Adjacency Matrix and Distances Is There a Path From A to B? What is the Path from A to B? Is There a Path From ANY A to ANY B?

Fleury s Algorithm The Adjacency Matrix and Distances Is There a Path From A to B? What is the Path from A to B? Is There a Path From ANY A to ANY B? Intro Math Problem Solving 3 Graph TheoryNovember Origin Fleury s Algorithm The Adjacency Matrix and Distances Is There a Path From A to B? What is the Path from A to B? Is There a Path From ANY A to ANY

More information

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL:

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL: Notes slides from before lecture CSE 21, Winter 2017, Section A00 Lecture 9 Notes Class URL: http://vlsicad.ucsd.edu/courses/cse21-w17/ Notes slides from before lecture Notes February 8 (1) HW4 is due

More information

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees Axiomatizing Arithmetic Logic: The Big Picture Suppose we restrict the domain to the natural numbers, and allow only the standard symbols of arithmetic (+,, =, >, 0, 1). Typical true formulas include:

More information

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia)

Crossing bridges. Crossing bridges Great Ideas in Theoretical Computer Science. Lecture 12: Graphs I: The Basics. Königsberg (Prussia) 15-251 Great Ideas in Theoretical Computer Science Lecture 12: Graphs I: The Basics February 22nd, 2018 Crossing bridges Königsberg (Prussia) Now Kaliningrad (Russia) Is there a way to walk through the

More information

Salvador Sanabria History of Mathematics. Königsberg Bridge Problem

Salvador Sanabria History of Mathematics. Königsberg Bridge Problem Salvador Sanabria History of Mathematics Königsberg Bridge Problem The Problem of the Königsberg Bridge There is a famous story from Konigsberg. The city of Konigsberg, Northern Germany has a significant

More information

Beyond the Euler Trail. Mathematics is often thought of as formulas, ratios, and the number Pi. The history of

Beyond the Euler Trail. Mathematics is often thought of as formulas, ratios, and the number Pi. The history of Patino 1 Prof. Petersen Sierra Patino Math 101 Section 4939 6 April 2016 Beyond the Euler Trail Mathematics is often thought of as formulas, ratios, and the number Pi. The history of math and its roots

More information

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G))

1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 10 Graphs 10.1 Graphs and Graph Models 1. a graph G = (V (G), E(G)) consists of a set V (G) of vertices, and a set E(G) of edges (edges are pairs of elements of V (G)) 2. an edge is present, say e = {u,

More information

Chapter 5: The Mathematics of Getting Around

Chapter 5: The Mathematics of Getting Around Euler Paths and Circuits Chapter 5: The Mathematics of Getting Around 5.1 Street-Routing Problem Our story begins in the 1700s in the medieval town of Königsberg, in Eastern Europe. At the time, Königsberg

More information

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions

Basic Combinatorics. Math 40210, Section 01 Fall Homework 4 Solutions Basic Combinatorics Math 40210, Section 01 Fall 2012 Homework 4 Solutions 1.4.2 2: One possible implementation: Start with abcgfjiea From edge cd build, using previously unmarked edges: cdhlponminjkghc

More information

Grade 7/8 Math Circles March 7, 2012 Introduction to Graph Theory

Grade 7/8 Math Circles March 7, 2012 Introduction to Graph Theory 1 University of Waterloo Faculty of Mathematics entre for Education in Mathematics and omputing Grade 7/8 Math ircles March 7, 2012 Introduction to Graph Theory What is graph theory? Graph theory is the

More information

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions

Brief History. Graph Theory. What is a graph? Types of graphs Directed graph: a graph that has edges with specific directions Brief History Graph Theory What is a graph? It all began in 1736 when Leonhard Euler gave a proof that not all seven bridges over the Pregolya River could all be walked over once and end up where you started.

More information

Elements of Graph Theory

Elements of Graph Theory Elements of Graph Theory Quick review of Chapters 9.1 9.5, 9.7 (studied in Mt1348/2008) = all basic concepts must be known New topics we will mostly skip shortest paths (Chapter 9.6), as that was covered

More information

Introduction to Networks

Introduction to Networks LESSON 1 Introduction to Networks Exploratory Challenge 1 One classic math puzzle is the Seven Bridges of Königsberg problem which laid the foundation for networks and graph theory. In the 18th century

More information

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around

Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around 1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: *************************************************************************************

More information

Chapter 3: Paths and Cycles

Chapter 3: Paths and Cycles Chapter 3: Paths and Cycles 5 Connectivity 1. Definitions: Walk: finite sequence of edges in which any two consecutive edges are adjacent or identical. (Initial vertex, Final vertex, length) Trail: walk

More information

An Introduction to Graph Theory

An Introduction to Graph Theory An Introduction to Graph Theory Evelyne Smith-Roberge University of Waterloo March 22, 2017 What is a graph? Definition A graph G is: a set V (G) of objects called vertices together with: a set E(G), of

More information

Chapter 2 Graphs. 2.1 Definition of Graphs

Chapter 2 Graphs. 2.1 Definition of Graphs Chapter 2 Graphs Abstract Graphs are discrete structures that consist of vertices and edges connecting some of these vertices. Graphs have many applications in Mathematics, Computer Science, Engineering,

More information

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0).

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0). CS4234: Optimisation Algorithms Lecture 4 TRAVELLING-SALESMAN-PROBLEM (4 variants) V1.0: Seth Gilbert, V1.1: Steven Halim August 30, 2016 Abstract The goal of the TRAVELLING-SALESMAN-PROBLEM is to find

More information

An Algorithmic Approach to Graph Theory Neetu Rawat

An Algorithmic Approach to Graph Theory Neetu Rawat An Algorithmic Approach to Graph Theory Neetu Rawat nrwt12345@gmail.com, Assistant Professor, Chameli Devi Group of Institutions, Indore. India. Abstract This paper compares two different minimum spanning

More information

Graph Theory. Part of Texas Counties.

Graph Theory. Part of Texas Counties. Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.

More information

Graphs II: Trailblazing

Graphs II: Trailblazing Graphs II: Trailblazing 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,, e n of the graph such that f(e 1 )={x 0,x 1 }, f(e 2 )={x

More information

The premature state of Topology and Graph Theory nourished by Seven Bridges of Königsberg Problem

The premature state of Topology and Graph Theory nourished by Seven Bridges of Königsberg Problem The premature state of Topology and Graph Theory nourished by Seven Bridges of Königsberg Problem Damodar Rajbhandari Many many years ago, There was a problem which created a mind-boggling puzzle to the

More information

Week 10: Colouring graphs, and Euler s paths. 14 and 16 November, 2018

Week 10: Colouring graphs, and Euler s paths. 14 and 16 November, 2018 MA284 : Discrete Mathematics Week 10: Colouring graphs, and Euler s paths http://www.maths.nuigalway.ie/ niall/ma284/ 14 and 16 November, 2018 1 Colouring The Four Colour Theorem 2 Graph colouring Chromatic

More information

1. The Highway Inspector s Problem

1. The Highway Inspector s Problem MATH 100 Survey of Mathematics Fall 2009 1. The Highway Inspector s Problem The Königsberg Bridges over the river Pregel C c d e A g D a B b Figure 1. Bridges f Is there a path that crosses every bridge

More information

Discrete mathematics

Discrete mathematics Discrete mathematics Petr Kovář petr.kovar@vsb.cz VŠB Technical University of Ostrava DiM 470-2301/02, Winter term 2018/2019 About this file This file is meant to be a guideline for the lecturer. Many

More information

Module 11. Directed Graphs. Contents

Module 11. Directed Graphs. Contents Module 11 Directed Graphs Contents 11.1 Basic concepts......................... 256 Underlying graph of a digraph................ 257 Out-degrees and in-degrees.................. 258 Isomorphism..........................

More information

Characterization of Graphs with Eulerian Circuits

Characterization of Graphs with Eulerian Circuits Eulerian Circuits 3. 73 Characterization of Graphs with Eulerian Circuits There is a simple way to determine if a graph has an Eulerian circuit. Theorems 3.. and 3..2: Let G be a pseudograph that is connected

More information

Sarah Will Math 490 December 2, 2009

Sarah Will Math 490 December 2, 2009 Sarah Will Math 490 December 2, 2009 Euler Circuits INTRODUCTION Euler wrote the first paper on graph theory. It was a study and proof that it was impossible to cross the seven bridges of Königsberg once

More information

Classic Graph Theory Problems

Classic Graph Theory Problems Classic Graph Theory Problems Hiroki Sayama sayama@binghamton.edu The Origin Königsberg bridge problem Pregel River (Solved negatively by Euler in 176) Representation in a graph Can all the seven edges

More information

Lecture 5: Graphs. Graphs! Euler Definitions: model. Fact! Euler Again!! Planar graphs. Euler Again!!!!

Lecture 5: Graphs. Graphs! Euler Definitions: model. Fact! Euler Again!! Planar graphs. Euler Again!!!! Lecture 5: Graphs. Graphs! Euler Definitions: model. Fact! Euler Again!! Planar graphs. Euler Again!!!! Konigsberg bridges problem. Can you make a tour visiting each bridge exactly once? Konigsberg bridges

More information

Section 3.4 Basic Results of Graph Theory

Section 3.4 Basic Results of Graph Theory 1 Basic Results of Graph Theory Section 3.4 Basic Results of Graph Theory Purpose of Section: To formally introduce the symmetric relation of a (undirected) graph. We introduce such topics as Euler Tours,

More information

Graph Theory Mini-course

Graph Theory Mini-course Graph Theory Mini-course Anthony Varilly PROMYS, Boston University, Boston, MA 02215 Abstract Intuitively speaking, a graph is a collection of dots and lines joining some of these dots. Many problems in

More information

Graph Theory

Graph Theory Graph Theory 2012.04.18 Our goal today is to learn some basic concepts in graph theory and explore fun problems using graph theory. A graph is a mathematical object that captures the notion of connection.

More information

Worksheet 28: Wednesday November 18 Euler and Topology

Worksheet 28: Wednesday November 18 Euler and Topology Worksheet 28: Wednesday November 18 Euler and Topology The Konigsberg Problem: The Foundation of Topology The Konigsberg Bridge Problem is a very famous problem solved by Euler in 1735. The process he

More information

Number Theory and Graph Theory

Number Theory and Graph Theory 1 Number Theory and Graph Theory Chapter 7 Graph properties By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com 2 Module-2: Eulerian

More information

Figure 2.1: A bipartite graph.

Figure 2.1: A bipartite graph. Matching problems The dance-class problem. A group of boys and girls, with just as many boys as girls, want to dance together; hence, they have to be matched in couples. Each boy prefers to dance with

More information

EECS 203 Lecture 20. More Graphs

EECS 203 Lecture 20. More Graphs EECS 203 Lecture 20 More Graphs Admin stuffs Last homework due today Office hour changes starting Friday (also in Piazza) Friday 6/17: 2-5 Mark in his office. Sunday 6/19: 2-5 Jasmine in the UGLI. Monday

More information

Ma/CS 6a Class 8: Eulerian Cycles

Ma/CS 6a Class 8: Eulerian Cycles Ma/CS 6a Class 8: Eulerian Cycles By Adam Sheffer The Bridges of Königsberg Can we travel the city while crossing every bridge exactly once? 1 How Graph Theory was Born Leonhard Euler 1736 Eulerian Cycle

More information

IJIET, e-issn , p-issn , Vol. 2, No. 2, July 2018

IJIET, e-issn , p-issn , Vol. 2, No. 2, July 2018 IJIET, e-issn 2548-8430, p-issn 2548-8422, Vol. 2, No. 2, July 2018 International Journal of Indonesian Education and Teaching http://e-journal.usd.ac.id/index.php/ijiet Sanata Dharma University, Yogyakarta,

More information

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities?

How can we lay cable at minimum cost to make every telephone reachable from every other? What is the fastest route between two given cities? 1 Introduction Graph theory is one of the most in-demand (i.e. profitable) and heavily-studied areas of applied mathematics and theoretical computer science. May graph theory questions are applied in this

More information

Contents. Bibliography 19. List of Symbols and Abbreviations 21. Index 22

Contents. Bibliography 19. List of Symbols and Abbreviations 21. Index 22 Contents Contents v 1 Basics of Graph Theory 1 1.1 Introduction.................................... 1 1.2 Basic Definitions................................. 2 1.3 Paths and Cycles.................................

More information

Basics of Graph Theory

Basics of Graph Theory Basics of Graph Theory 1 Basic notions A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Simple graphs have their

More information

Graphs. The ultimate data structure. graphs 1

Graphs. The ultimate data structure. graphs 1 Graphs The ultimate data structure graphs 1 Definition of graph Non-linear data structure consisting of nodes & links between them (like trees in this sense) Unlike trees, graph nodes may be completely

More information

GRAPH THEORY AND COMBINATORICS ( Common to CSE and ISE ) UNIT 1

GRAPH THEORY AND COMBINATORICS ( Common to CSE and ISE ) UNIT 1 GRAPH THEORY AND COMBINATORICS ( Common to CSE and ISE ) Sub code : 06CS42 UNIT 1 Introduction to Graph Theory : Definition and Examples Subgraphs Complements, and Graph Isomorphism Vertex Degree, Euler

More information

Chapter 2: Graph Theory

Chapter 2: Graph Theory Chapter 2: Graph Theory Graph Theory Introduction Applications of Graphs: Convenient representation/visualisation to many Mathematical, Engineering and Science Problems. Fundamental Data Structure in Computer

More information

Dissertation Title. Royal Holloway logo guidelines. Dissertation Subtitle. Stephen D. Wolthusen

Dissertation Title. Royal Holloway logo guidelines. Dissertation Subtitle. Stephen D. Wolthusen Dissertation Title Dissertation Subtitle Stephen D. Wolthusen Thesis submitted to the University of London for the degree of Doctor of Philosophy Royal Holloway logo guidelines 2012 Standard logo The logo

More information