Chapter 5: The Mathematics of Getting Around

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

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

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

Sections 5.2, 5.3. & 5.4

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

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

Chapter 11: Graphs and Trees. March 23, 2008

Street-Routing Problems

MATH 101: Introduction to Contemporary Mathematics

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

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

Launch problem: Lining streets

10/30/2013. Chapter 7: The Mathematics of Networks. Network. Network. Network. Network. Optimal Network. 7.1 Networks and Trees

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

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

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

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

Graph Theory. 26 March Graph Theory 26 March /29

Chapter 1. Urban Services. Chapter Outline. Chapter Summary

FINDING THE RIGHT PATH

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

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

14 Graph Theory. Exercise Set 14-1

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

Introduction to Networks

EULERIAN GRAPHS AND ITS APPLICATIONS

#30: Graph theory May 25, 2009

11-5 Networks. Königsberg Bridge Problem

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

GRAPH THEORY AND LOGISTICS

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

Section 3.4 Basic Results of Graph Theory

Circuits and Paths. April 13, 2014

GRAPH THEORY - FUNDAMENTALS

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

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?

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

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

Math 110 Graph Theory II: Circuits and Paths

Chapter 8 Topics in Graph Theory

MATH 113 Section 9.2: Topology

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.

Graph Theory CS/Math231 Discrete Mathematics Spring2015

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

Undirected Network Summary

Chapter 6: The Mathematics of Touring

Finite Math A Chapter 6 Notes Hamilton Circuits

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

Discrete mathematics

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

MIT BLOSSOMS INITIATIVE. Taking Walks, Delivering Mail: An Introduction to Graph Theory Karima R. Nigmatulina MIT

Graph Theory

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

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

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

Pre-Calculus Matrices

Salvador Sanabria History of Mathematics. Königsberg Bridge Problem

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

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

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

New Jersey Center for Teaching and Learning. Progressive Mathematics Initiative

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

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

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

WUCT121. Discrete Mathematics. Graphs

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

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

Car Industry A3.1. Which of the graphs in Figure 2 fit the diagram above? Copy all graphs that fit and add names of manufacturers to the vertices.

Graphs And Algorithms

The Human Brain & Graph Theory

Graph Theory. Defining a Graph

1. The Highway Inspector s Problem

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

Introduction to Graphs

Notebook Assignments

MA 111 Review for Exam 3

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

SIM Camp Instructor Application Summer 2017 Submission 4 12/31/ :19:35 A.M.

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

Fundamental Properties of Graphs

Chapter 4 Answers. Lesson 4.1. Chapter 4 Answers 1

08. First and second degree equations

Sarah Will Math 490 December 2, 2009

(Refer Slide Time: 02.06)

6.2. Paths and Cycles

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

Graph Theory Mini-course

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?

MEI Further Mathematics Support Programme

Number Theory and Graph Theory

Graph Theory Lecture 5: Modeling with Graphs, and Euler Circuits/Paths Spring 2014 Morgan Schreffler Office: POT 902

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

SEVENTH EDITION and EXPANDED SEVENTH EDITION

Varying Applications (examples)

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

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

The ancient Egyptians used a decimal system in which pictographs were used to represent powers of 10.

Introduction III. Graphs. Motivations I. Introduction IV

Transcription:

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 was divided by a river into four separate sections, which were connected to one another by seven bridges. The old map of Königsberg shown on the next slide gives the layout of the city in 1735, the year a brilliant young mathematician named Leonhard Euler came passing through. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-2 5.1-2 Euler Paths and Circuits Euler Paths and Circuits While visiting Königsberg, Euler was told of an innocent little puzzle of disarming simplicity: Is it possible for a person to take a walk around town in such a way that each of the seven bridges is crossed once, but only once? Euler, perhaps sensing that something important lay behind the frivolity of the puzzle, proceeded to solve it by demonstrating that indeed such a walk was impossible. But he actually did much more! Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-3 5.1-3 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-4 5.1-4 Euler Paths and Circuits Euler Paths and Circuits Euler laid the foundations for what was at the time a totally new type of geometry, which he called geometris situs ( the geometry of location ). From these modest beginnings, the basic ideas set forth by Euler eventually developed and matured into one of the most important and practical branches of modern mathematics, now known as graph theory. The theme of this chapter is the question of how to create efficient routes for the delivery of goods and services such as mail delivery, garbage collection, police patrols, newspaper deliveries, and, most important, late-night pizza deliveries along the streets of a city, town, or neighborhood. These types of management science problems are known as Euler circuit problems. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-5 5.1-5 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-6 5.1-6 1

Routing Problems Two Basic Questions What is a routing problem? To put it in the most general way, routing problems are concerned with finding ways to route the delivery of goods and/or services to an assortment of destinations. The goods or services in question could be packages, mail, newspapers, pizzas, garbage collection, bus service, and so on. The delivery destinations could be homes, warehouses, distribution centers, terminals, and the like. The existence question is simple: Is an actual route possible? For most routing problems, the existence question is easy to answer, and the answer takes the form of a simple yes or no. When the answer to the existence question is yes, then a second question the optimization question comes into play. Of all the possible routes, which one is the optimal route? Optimal here means the best when measured against some predetermined variable such as cost, distance, or time. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-7 5.1-7 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-8 5.1-8 Euler Circuit Problems Example 5.1 Walking the Hood The common thread in all Euler circuit problems is what we might call, for lack of a better term, the exhaustion requirement the requirement that the route must wind its way through... everywhere. Thus, in an Euler circuit problem, by definition every single one of the streets (or bridges, or lanes, or highways) within a defined area (be it a town, an area of town, or a subdivision) must be covered by the route. We will refer to these types of routes as exhaustive routes. After a rash of burglaries, a private security guard is hired to patrol the streets of the Sunnyside neighborhood shown next. The security guard s assignment is to make an exhaustive patrol, on foot, through the entire neighborhood. Obviously, he doesn t want to walk any more than what is necessary. His starting point is the southeast corner across from the school (S) that s where he parks his car. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-9 5.1-9 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-10 5.1-10 (This is relevant because at the end of his patrol he needs to come back to S to pick up his car.) Example 5.1 Walking the Hood Example 5.1 Walking the Hood Being a practical person, the security guard would like the answers to two questions. (1) Is it possible to start and end at S, cover every block of the neighborhood, and pass through each block just once? (2) If some of the blocks will have to be covered more than once, what is an optimal route that covers the entire neighborhood? (Optimal here means with the minimal amount of walking. ) Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-11 5.1-11 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-12 5.1-12 2

Example 5.2 Delivering the Mail A mail carrier has to deliver mail in the same Sunnyside neighborhood. The difference between the mail carrier s route and the security guard s route is that the mail carrier must make two passes through blocks with houses on both sides of the street and only one pass through blocks with houses on only one side of the street; and where there are no homes on either side of the street, the mail carrier does not have to walk at all. Example 5.2 Delivering the Mail Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-13 5.1-13 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-14 5.1-14 Example 5.2 Delivering the Mail In addition, the mail carrier has no choice as to her starting and ending points she has to start and end her route at the local post office (P). Much like the security guard, the mail carrier wants to find the optimal route that would allow her to cover the neighborhood with the least amount of walking. (Put yourself in her shoes and you would do the same good weather or bad, she walks this route 300 days a year!) Example 5.3 The Seven Bridges of Könisberg Figure 5-2(a) shows an old map of the city of Königsberg and its seven bridges; Fig.5-2(b) shows a modernized version of the very same layout. We opened the chapter with this question: Can a walker take a stroll and cross each of the seven bridges of Königsberg without crossing any of them more than once? Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-15 5.1-15 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-16 5.1-16 Example 5.3 The Seven Bridges of Königsberg Figure 5-2 Example 5.4 The Bridges of Madison County This is a more modern version of Example 5.3. Madison County is a quaint old place, famous for its quaint old bridges. A beautiful river runs through the county, and there are four islands (A, B, C, and D) and 11 bridges joining the islands to both banks of the river (R and L) and one another (Fig.5-3). A famous photographer is hired to take pictures of each of the 11 bridges for a national magazine. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-17 5.1-17 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-18 5.1-18 3

Example 5.4 The Bridges of Madison County Example 5.4 The Bridges of Madison County Figure 5-3 The photographer needs to drive across each bridge once for the photo shoot. Moreover, since there is a $25 toll (the locals call it a maintenance tax ) every time an out-of-town visitor drives across a bridge, the photographer wants to minimize the total cost of his trip and to recross bridges only if it is absolutely necessary. What is the optimal (cheapest) route for him to follow? Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-19 5.1-19 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-20 5.1-20 Example 5.5 Child s Play Figure 5-4 shows a few simple line drawings. The name of the game is to trace each drawing without lifting the pencil or retracing any of the lines. These kinds of tracings are called unicursal tracings. (When we end in the same place we started, we call it a closed unicursal tracing; when we start and end in different places, we call it an open unicursal tracing.) Which of the drawings in Fig. 5-4 can be traced with closed unicursal tracings? Which with only open ones? Example 5.5 Child s Play Which can t be traced (without cheating)? How can we tell if a unicursal tracing (open or closed) is possible? Good question. We will answer it in Section 5.3. Figure 5-4 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-21 5.1-21 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-22 5.1-22 What Is a Graph? Chapter 5: The Mathematics of Getting Around 5.2 An Introduction to Graphs Euler circuit problems can all be tackled by means of a single unifying mathematical concept the concept of a graph. The most common way to describe a graph is by means of a picture. The basic elements of such a picture are a set of dots called the vertices of the graph and a collection of lines called the edges of the graph. On the surface, that s all there is to it lines connecting dots! Below the surface there is a surprisingly rich theory. Let s explore a few basic concepts first. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-23 5.1-23 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-24 5.1-24 4

Figure 5.5 shows the picture of a graph. This graph has six vertices called A, B, C, D, E, and F. Each edge can be described by listing (in any order) the pair of vertices that are connected by the edge. Thus, the edges of this graph, listed in random order, are AB, BC, CD, AD, DE, EB, CD, and BB. Notice several important things about the edges of the graph: It is possible for an edge to connect a vertex back to itself, as is the case with BB. These type of edges are called loops. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-25 5.1-25 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-26 5.1-26 It is possible for two edges to connect the same pair of vertices, as is the case with CD, which is a double edge. In general, we refer to such edges as multiple edges. Sometimes edges cross each other at incidental crossing points that are not themselves vertices of the graph. Such is the case with the crossing point created by edges AD and BE in Fig. 5-5. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-27 5.1-27 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-28 5.1-28 Edges do not have a direction; thus, there is no right or wrong order to write an edge AB or BA are both acceptable. A convenient way to describe the vertices and edges of a graph is by using the notation of sets. For the graph shown in Fig. 5-5 the vertex set is V = {A, B, C, D, E, F}, and the edge set is E = {AB, AD, BB, BC, BE, CD, CD, and DE}. Notice that CD appears twice in the edge set, indicating that there are two edges connecting C and D. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-29 5.1-29 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-30 5.1-30 5

Example 5.7 Relationship Graphs Example 5.7 Relationship Graphs Imagine that as part of a sociology study we want to describe the network of friendships that develops among a group of students through their Facebook sites. We can illustrate this very nicely with a graph such as the one in Fig. 5-6. In this graph the vertices represent people (the students), and an edge connecting vertex X to vertex Y implies that X and Y are Facebook friends. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-31 5.1-31 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-32 5.1-32 Example 5.8 Pure Isolation Figure 5-8 shows a graph with four isolated vertices and having no edges. We won t be seeing graphs like this too often, but it s important to know that graphs with no edges are allowed. The edge set of a graph with no edges is the empty set (we can write it as E = { } or E = φ). Example 5.9 Pictures Optional Suppose you are given the following information about a graph: The vertex set is V = {A, D, L, and R}, and the edge set is E = {AD, AL, AL, AR, AR, DL, DR}. But where is the picture? You are told that if you really want a picture, you can make up your own. That s fine, but where should you place the vertices? What should the edges look like? Good news: These issues are irrelevant! You have total freedom to place the vertices anywhere you please, and as long as you connect the right pairs of vertices, you can connect them any way you like! Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-33 5.1-33 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-34 5.1-34 Example 5.9 Pictures Optional Example 5.9 Pictures Optional Figure 5-9 shows two pictures of the same graph. While they may look like two totally different pictures to the casual observer, they both describe the same vertex set V = {A, D, L, and R} and the same edge set E = {AD, AL, AL, AR, AR, DL, DR}. [From a visual point of view, however, one could argue that the graph in Fig. 5-9(a) looks nice, while the graph in Fig. 5-9(b) looks gnarly.] Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-35 5.1-35 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-36 5.1-36 6

Important Point We think of a graph as a picture consisting of dots and lines, but the picture is just a visual representation of a more abstract idea: a set of objects (represented by the vertices of the graph) and a relationship among pairs of objects (represented by the edges of the graph.) All one needs to describe these two things are a vertex set V and an edge set E. A picture is nice but not essential. Thus, if we simply give the vertex set is V = {A, D, L, and R}, and the edge set is E = {AD, AL, AL, AR, AR, DL, DR}. we have defined a graph. GRAPH A graph is a structure consisting of a set of objects (the vertex set) and a list describing how pairs of objects are related (the edge set). Relations among objects include the possibility of an object being related to itself (a loop) as well as multiple relations between the same pair of objects (multiple edges). Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-37 5.1-37 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-38 5.1-38 Terminology Example 5.10 Adjacency Every branch of mathematics has its own peculiar jargon, and graph theory has more than its share. In this section we will introduce some important concepts and terminology that we will need in the next three chapters. We say that two vertices in a graph are adjacent if they are joined by an edge. In the graph shown in Fig. 5-10, vertices A and B are adjacent and so are vertices B and C. Vertices C and D are not adjacent, and neither are vertices A and E. Because of the loop EE, we say that vertex E is adjacent to itself. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-39 5.1-39 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-40 5.1-40 Example 5.10 Adjacency We can also speak of edges being adjacent. Two edges are said to be adjacent if they share a common vertex. In the graph shown in Fig. 5-10, AB and BF are adjacent edges and so are AB and AD. On the other hand, AB and DE are not adjacent. Example 5.11 Degree of a Vertex The degree of a vertex is the number of edges meeting at that vertex. A loop counts twice toward the degree. We will use the notation deg(v) to denote the degree of vertex V. In Fig. 5-10 the degrees of the vertices are as follows: deg(a) = 3, deg(b) = 5 deg(c) = 3, deg(d) = 2, deg(e) = 4, deg(f) = 3, deg(g) = 1, and deg(h) = 1. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-41 5.1-41 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-42 5.1-42 7

Example 5.11 Degree of a Vertex Because distinguishing vertices with an even degree from vertices with an odd degree is going to be critical later on, we will often refer to vertices as even vertices or odd vertices, depending on their degree. The graph in Fig. 5-10 has two even vertices (D and E) and six odd vertices (all the others). Paths and circuits both describe trips along the edges of a graph. The only real difference between a path and a circuit is that a circuit is a closed trip (the trip ends back at the starting point), whereas a path is an open trip (the starting and ending points are different). In this context, by a trip (be it a path or a circuit), we mean a sequence of adjacent edges with the property that an edge can be traveled just once. Fig. 5-10 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-43 5.1-43 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-44 5.1-44 The standard way to describe a path or a circuit is by listing the vertices in order of travel. Here are a few examples of paths and circuits using the graph in Fig.5-10: A, B, E, D is a path from vertex A to vertex D. The edges of this path in order of travel are AB, BE, and ED. The length of the path (i.e., the number of Edges in the path) is 3. A, B, C, A, D, E is a path of length 5 from A to E. This path visits vertex A twice (that s fine), but no edge is repeated. A, B, C, B, E is another path from A to E. This path is only possible because there are two edges connecting B and C. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-45 5.1-45 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-46 5.1-46 A, C, B, E, E, D is a path of length 5 from A to D. One of the edges in this path is the loop EE. A, B, C, B, A, D is not a path because the edge AB is traveled twice. A, B, C, B, E, E, D, A, C, B is not a path because the edge BC is traveled three times. (The first two passes are fine, since there are two edges connecting B and C, but a third pass requires that we travel through one of those edges a second time.) Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-47 5.1-47 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-48 5.1-48 8

B, C, B is a circuit of length 2. Circuits of length 2 are possible when there are multiple edges. The EE loop is considered to be a circuit of length 1. Example 5.13 Connectedness and Bridges A graph is connected if you can get from any vertex to any other vertex along a path. Essentially, this means that the graph is all in one piece. The graph shown in Fig. 5-11(a) is a connected graph. Fig 5-11 (a) Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-49 5.1-49 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-50 5.1-50 Example 5.13 Connectedness and Bridges Example 5.13 Connectedness and Bridges A disconnected graph is made up of separate connected components. Whereas the graphs shown in Fig. 5-11(b) and (c) are disconnected graphs. (b) Figure 5-11(b) shows a disconnected graph with two components, (c) Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-51 5.1-51 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-52 5.1-52 Example 5.13 Connectedness and Bridges Example 5.13 Connectedness and Bridges and Fig. 5-11(c) shows a disconnected graph with three components (an isolated vertex is a component in and of itself). Notice that Fig. 5-10(b) is the graph we get when we remove the edge BF from the graph in Fig. 5-10(a). (a) (b) Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-53 5.1-53 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-54 5.1-54 9

Example 5.13 Connectedness and Bridges This illustrates how the removal of just one edge from a connected graph can sometimes make the graph disconnected. An edge whose removal makes a connected graph disconnected is called a bridge. Thus, we say that BF is a bridge in the graph in Fig. 5-11(a). The graph has two other bridges FG and FH. Example 5.14 Euler Paths and Euler Circuits An Euler path in a connected graph is a path that travels through all the edges of the graph. Being a path, edges can only be traveled once, so in an Euler path every edge of the graph is traveled once and only once. By definition, only a connected graph can have Euler paths, but, of course, just being connected is not enough. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-55 5.1-55 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-56 5.1-56 Example 5.14 Euler Paths and Euler Circuits Much like Euler paths, we can also define Euler circuits. An Euler circuit is a circuit that travels through every edge of a connected graph. Being a circuit, the trip must end where it started and travel along every edge of the graph once and only once. A connected graph cannot have both an Euler path and an Euler circuit it can have one or the other or neither. Example 5.14 Euler Paths and Euler Circuits In the graph shown in Fig. 5-12(a), the path C, A, B, E, A, D, B, C, D travels along each of the eight edges of the graph and is therefore an Euler path. This graph has several other Euler paths you may want to try to find one that does not start at C. Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-57 5.1-57 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-58 5.1-58 Example 5.14 Euler Paths and Euler Circuits Example 5.14 Euler Paths and Euler Circuits In the graph shown in Fig. 5-12(b), the circuit C, A, B, E, A, D, B, C, D, F, C is an Euler circuit (one of many). You may want to find a different one. (Remember that traveling the edges in the same sequence but using a different starting point is cheating you are rewriting the same circuit.) The graph shown in Fig. 5-12(c) has neither an Euler path nor an Euler circuit. (We will learn how to tell in Section 5.3.) Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-59 5.1-59 Copyright 2014 2010 Pearson Education, Education. Inc. All rights reserved. Excursions in Modern Mathematics, 7e: 1.1-60 5.1-60 10