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

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

Chapter 5: The Mathematics of Getting Around

Sections 5.2, 5.3. & 5.4

Chapter 8 Topics in Graph Theory

Section Graphs, Paths, and Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Undirected Network Summary

Excursions in Modern Mathematics Sixth Edition. Chapter 5 Euler Circuits. The Circuit Comes to Town. Peter Tannenbaum

MATH 101: Introduction to Contemporary Mathematics

AQR UNIT 7. Circuits, Paths, and Graph Structures. Packet #

Section Graphs, Paths, and Circuits. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

MA 111 Review for Exam 3

14 Graph Theory. Exercise Set 14-1

Launch problem: Lining streets

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

Street-Routing Problems

Chapter 1. Urban Services. Chapter Outline. Chapter Summary

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

11-5 Networks. Königsberg Bridge Problem

Module 2: NETWORKS AND DECISION MATHEMATICS

14.2 Euler Paths and Circuits filled in.notebook November 18, Euler Paths and Euler Circuits

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

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Graph Theory. 26 March Graph Theory 26 March /29

Topics Covered. Introduction to Graphs Euler s Theorem Hamiltonian Circuits The Traveling Salesman Problem Trees and Kruskal s Algorithm

Chapter 11: Graphs and Trees. March 23, 2008

Math 110 Graph Theory II: Circuits and Paths

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

#30: Graph theory May 25, 2009

Multi-edges, loops, and two or more pieces are all allowed. Example 4 (Not Graphs). None of the following are graphs.

The Bridges of Konigsberg Problem Can you walk around the town crossing each bridge only once?

Graph Theory CS/Math231 Discrete Mathematics Spring2015

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

Junior Circle Meeting 3 Circuits and Paths. April 18, 2010

1. The Highway Inspector s Problem

Circuits and Paths. April 13, 2014

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

GRAPH THEORY AND LOGISTICS

a) Graph 2 and Graph 3 b) Graph 2 and Graph 4 c) Graph 1 and Graph 4 d) Graph 1 and Graph 3 e) Graph 3 and Graph 4 f) None of the above

Sarah Will Math 490 December 2, 2009

Introduction to Engineering Systems, ESD.00. Networks. Lecturers: Professor Joseph Sussman Dr. Afreen Siddiqi TA: Regina Clewlow

Networks and Graphs: Circuits, Paths, and Graph Structures VII.A Student Activity Sheet 1: Euler Circuits and Paths

Networks and Graphs: Circuits, Paths, and Graph Structures VII.A Student Activity Sheet 1: Euler Circuits and Paths

Unit 7 Day 2 Section Vocabulary & Graphical Representations Euler Circuits and Paths

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

CHAPTER 10 GRAPHS AND TREES. Copyright Cengage Learning. All rights reserved.

EECS 203 Lecture 20. More Graphs

Notebook Assignments

FINDING THE RIGHT PATH

13. (a) G,G. A circuit of length 1 is a loop. 14. (a) E,E. (c) A,B,C,A. 16. (a) BF, FG

Chapter 5: The Mathematics of Getting Around. 5.4 Eulerizing and Semi to Eulerizing Graphs

Pre-Calculus. Slide 1 / 192. Slide 2 / 192. Slide 3 / 192. Matrices

Pre-Calculus Matrices

6.2 Initial Problem. Section 6.2 Network Problems. 6.2 Initial Problem, cont d. Weighted Graphs. Weighted Graphs, cont d. Weighted Graphs, cont d

An Introduction to Graph Theory

08. First and second degree equations

Pre-Calculus. Introduction to Matrices. Slide 1 / 192 Slide 2 / 192. Slide 3 / 192. Slide 4 / 192. Slide 6 / 192. Slide 5 / 192. Matrices

Honors ICM- Graph Theory Unit 7 Homework Packet Homework Day 1

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

Number Theory and Graph Theory

8. The Postman Problems

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?

Introduction to Graphs

Graph Theory

14 More Graphs: Euler Tours and Hamilton Cycles

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

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

MEI Further Mathematics Support Programme

New Jersey Center for Teaching and Learning. Progressive Mathematics Initiative

Section 3.4 Basic Results of Graph Theory

Intermediate Math Circles Wednesday, February 8, 2017 Graph Theory I

6.2. Paths and Cycles

Finite Math A Chapter 6 Notes Hamilton Circuits

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

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?

Worksheet for the Final Exam - Part I. Graphs

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

7 Next choice is 4, not 3...

Introduction III. Graphs. Motivations I. Introduction IV

Integrated Math, Part C Chapter 1 SUPPLEMENTARY AND COMPLIMENTARY ANGLES

Network Topology and Graph

Varying Applications (examples)

Graph theory. Po-Shen Loh. June We begin by collecting some basic facts which can be proved via bare-hands techniques.

Eulerian Tours and Fleury s Algorithm

Graphs And Algorithms

Design and Analysis of Algorithms

Salvador Sanabria History of Mathematics. Königsberg Bridge Problem

1 Euler Circuits. Many of the things we do in daily life involve networks, like the one shown below [Houston Street Map]. Figure 1: Houston City Map

Lecture 1: An Introduction to Graph Theory

Majority and Friendship Paradoxes

GRAPH THEORY - FUNDAMENTALS

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

Finite Math A, Chapter 8: Scheduling 1

Chapter 1 Graph Theory

TWO CONTRIBUTIONS OF EULER

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Graph Theory Problems Instructor: Natalya St. Clair. 1 The Seven Bridges of Königsberg Problem

MTH-129 Review for Test 4 Luczak

Introduction to Graphs

(5.2) 151 Math Exercises. Graph Terminology and Special Types of Graphs. Malek Zein AL-Abidin

Eulerian tours. Russell Impagliazzo and Miles Jones Thanks to Janine Tiefenbruck. April 20, 2016

Transcription:

1 Finite Math A Chapter 5: Euler Paths and Circuits The Mathematics of Getting Around Academic Standards Covered in this Chapter: ************************************************************************************* FM.N.1: Use networks, traceable paths, tree diagrams, Venn diagrams, and other pictorial representations to find the number of outcomes in a problem situation FM.N.2: Optimize networks in different ways and in different contexts by finding minimal spanning trees, shortest paths, and Hamiltonian paths including real-world problems. FM.N.4: Construct and interpret directed and undirected graphs, decision trees, networks, and flow charts that model real-world contexts and problems. FM.N.6: Construct vertex-edge graph models involving relationships among a finite number of elements. Describe a vertex-edge graph using an adjacency matrix. Use vertex-edge graph models to solve problems in a variety of real-world settings. ********************************************************************************************* Leonhard Euler (Pronounced: Oil-er 1707-1783 Referred to as the Shakespeare of Mathematics and The Father of Graph Theory whose collective works and creative output outnumber any mathematician to this day. The Beginning of Graph Theory The Scene: Medieval Town of Köningsberg, Eastern Europe, 1700 s The Puzzle: Can you walk around town in such a way that you cross each bridge once and only once? The Result: An intrigued Euler s solution lays the foundation for a new branch of mathematics: Graph Theory 5.1 Street Routing Problems Routing Problems: finding ways to the of goods or services to an assortment of destinations. An Euler circuit problem is a specific type of routing problem where every single street (or bridges, highways, etc) MUST BE COVERED by the route. This is called the requirement. Common Exhaustive Routing Problems: mail delivery, police patrols, garbage collecting, Street sweeping, snow removal, parade routes, tour buses, electric meter reading, etc.

2 Examples: The Sunnyside Neighborhood (pg 169) The Security Guard: A private security guard is hired to make an exhaustive patrol on foot. He parks his car at the corner across from the school (S). Can he start at S and walk every block of the neighborhood JUST ONCE? If not, what is the OPTIMAL trip? How many streets will he have to walk twice? The Mail Carrier: The mail carrier starts and ends at the post office (P). She must deliver mail on every street there are houses. If there are houses on both sides of the street, she must walk that block twice. She would like to cover the neighborhood with the least amount of walking. Try and trace this with your pencil. What do you think? 5.2 An Introduction To Graphs In plain English: connecting The graphs we discuss in this chapter have no connection to the graphs of functions you ve discussed in Algebra. Vertices: The points on the graph Edges: The lines on the graph. The edge connecting B and A can be called or Np Loop: An edge connecting a vertex to itself. Example: Multiple Edge: Two edges connecting the same pair of vertices Example: and Isolated Vertices: Vertices not connected by any edges. Example: Vertex Set: Edge Set:

3 Why are graphs useful? They help tell a story in a simple picture. Friends at a Party Euler s Bridge Problem A graph is just a VISUAL REPRESENTATION of a set of objects and the relationships between those objects. You have a lot of freedom in how you draw a graph model! Two graphs are if they are exactly the same. That is they have exactly the same vertices and exactly the same edges.

4 Adjacent Two vertices are adjacent if they are joined by an edge. Ex: and are adjacent. and are not adjacent. is adjacent to itself. Two edges are adjacent if they share a common vertex. Ex. and are adjacent. and are not adjacent. Degree deg(v) = # The number of edges meeting at that vertex. deg(a) = deg(b) = deg (E) = (loops count as 2 toward the degree) Vertices whose degree is odd: odd vertices Vertices whose degree is even: even vertices Circuit A trip along the edges of the graph. Path: An trip along the edges of the graph. A circuit starts and ends in the same place. A path has different starting/ending points. Important points about circuits and paths: 1. No EDGE can be covered twice. 2. You can use a vertex as many times as you wish. 3. Length = the number of edges traveled Examples of circuits: Find a circuit through the point B Examples of paths: Find a path from G to E

5 Connected Think in piece You can get to any vertex from any vertex along a path. Disconnected Think in pieces. Graph is made of several components. Bridge: An edge that, when removed, causes a connected graph to become disconnected. In the picture above there are three bridges:,, Examples: 1. For the graph shown, list the degree of each vertex E F G H 2. Consider the graph with Vertices: A, B, C, D, E, Edges: AB, AC, AD, BE, BC, CD, EE Draw two different pictures of the graph.

6 3. Consider the graph with Vertices: A,B,C,D,E Edges: AD, AE, BC, BD, DD, DE (a) List the vertices adjacent to D. (b) Find the degree of D (c) Find the sum of the degrees of the vertices 4. A B E F G C D H a) Find a path of length 4 from A to E b) Find a circuit through G c) Find a path from A to E that goes d) Find a path of length 7 from F to B through C twice e) How many paths are there from A to D? f) How many paths are there from E to G? g) How many paths are there from A to G? h) Are there any bridges in this graph?

7 Graph Models The Goal: Take a real life picture/situation Create a Graph to Model this The Rules: Only use vertices (dots) and edges (lines) The Result: The only thing that really matters is the relationship between the vertices and the edges. Examples: Köningsberg Map Think: What are my vertices? Graph Model What are my edges? Sunnyside Neighborhood Map Security Guard: Each block once Mail carrier: both sides of any street with houses. Remember: You are only using vertices and edges! Vertices may represent: land masses, street intersections, or people Edges may represent: bridges, streets, or relationships!

8 You TRY! Create a Graph Model A beautiful river runs through Madison county. There are four islands and 11 bridges joining the islands to both banks of the river (the Right Bank,R, and the Left Bank, L). Plan: Vertices Edges Draw a graph model of this Avon, Indiana neighborhood.

9 5.3 Euler Theorems & Fleury s Algorithm The Big Questions Euler Circuit/Path: A Circuit/Path that covers EVERY EDGE in the graph once and only once. Euler Circuit: Do you think that these graphs have an Euler Circuit? Try tracing them with your pencil. Euler Path: Euler studied a lot of graph models and came up with a simple way of determining if a graph had an Euler Circuit, an Euler Path, or Neither. Remember: Euler Circuit: Travels every edge exactly once, start/end @ same vertex Euler Path: Travels every edge exactly once, start/end @ different vertex

10 To have an Euler Circuit: you must be able to travel IN and OUT of each vertex. A graph with this vertex would be OK. A graph with this vertex would NOT! Examples: Determine if the graph has an Euler Circuit, an Euler Path, or neither and explain why. You do not have to find an actual path or circuit through the graph. 1. 2. 3. 4. 5. 6.

11 What if there is 1 odd vertex? Finding an Euler Path or Euler Circuit Fleury s Algorithm: Don t cross a bridge to an untraveled part of your graph unless you have no other choice. Once you cross the bridge from A to B, the only way to get back to A is by recrossing the bridge which you must not do!!! Examples: Does the graph have an Euler Path, Euler Circuit, or Neither? If it has an Euler Path or Euler Circuit, find it! Label the edges 1, 2, 3 etc. in the order traveled. 1. Steps 1. Make sure the graph is connected No odd vertices = Euler circuit Two odd vertices = Euler path 2. Start Euler Circuit start anywhere Euler Path start at an odd vertex 3. If you have a choice, don t choose a bridge. Number your edges as you travel them. 4. When you ve traveled every edge exactly once, you re done! Euler Circuit end where you started Euler Path end at the other odd vertex.

12 2. 3. Another Method to try: You will want multiple colored pens/pencils for this. 4.

13 5. 6. 7.

14 5.4 Eulerizing Graphs Remember that we are trying to find OPTIMAL SOLUTIONS to routing problems. We want 1. an exhaustive route covers each and every edge in the graph 2. to minimize deadhead travel multiple passes on a single edge is a waste of time/money OPTIMAL SITUATION: An Euler Circuit or Path Already Exists OTHERWISE EULERIZE your graph: Strategically ADD edges to your graph. These represent edges you plan to cross more than once. These edges should eliminate odd vertices so that your new graph has a Euler Circuit or Euler Path. Consider the following model of a street network. How many odd vertices are there? Does an Euler Circuit exist? Strategically add edges to eliminate odd vertices. You will need AT LEAST edges. You MAY NOT create new edges! You may only DUPLICATE EXISTING EDGES! Example: This is OK This is NOT OK Here are a couple of solutions:

15 Ex. 1 Find an optimal eulerization of the following graph. Ex. 2. Find an optimal eulerization of the following graph. Then FIND the Euler Circuit through the graph by labeling the edges 1, 2, 3 etc. as you would travel them. a) b) c. d)

16 Example 3: The street network of a city can be modeled with a graph in which the vertices represent the street corners and the edges represent the streets. Suppose you are the city street inspector and it is desirable to minimize time and cost by not inspecting the same street more than once. a. In this graph of the city, is it possible to begin at the garage (G) and inspect each street only once? Will you be back at the garage at the end of the inspection? b. Find a route that inspects all street, repeats the least number of edges possible, and returns to the garage. c. Suppose it takes you approximately 5 minutes to inspect each street. Approximately how long will it take you to inspect the entire street network? NOTE: When labeling your edges, it is not a bad idea to have a friend try to follow your work. For example: What is wrong with this problem? Find the optimal eulerization of the following graph. Then find the Euler circuit by labeling the edges 1, 2, 3 as you travel them.

17 Supplement Adjacency Matrix There are several ways to describe a graph. With a diagram: With a list of vertices/edges: With an Adjacency Matrix: How to create an Adjacency Matrix: 1. Create an n x n square matrix with a row and column for each vertex of your graph. 2. If a vertex is adjacent to another vertex, put a 1 in the corresponding position. If a vertex is not adjacent, put a 0 in the corresponding position. Example 1: Make an adjacency matrix for the following graphs a. 2.

18 b. *NOTE: A LOOP adds 2 degrees to a vertex. It should be entered into the matrix as a 2 so that the sum of each row and column consistently gives the degree of that particular vertex. Example 2: Draw the graph given its adjacency matrix a.

19 b. c. 0 1 2 0 1 1 0 0 3 0 2 0 0 1 0 0 3 1 0 1 1 0 0 1 2 More Graph Terminology Simple Graph: No multiple Edges and no loops Example 3: Which type of graph is a simple graph? a) 0 1 0 0 1 2 1 1 0 1 0 0 0 1 0 0 b) 0 0 1 1 0 0 1 1 1 1 0 1 1 1 1 0 c) 0 0 2 2 0 0 1 1 2 1 0 0 2 1 0 0