10
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 Suppose you needed to vist a number of locations in the Houston area, by car. In order to be more efficient, you might wish to minimize the total distance travelled minimize the total time travelled minimize the total cost (including tolls) To examine this more closely, we need to introduce some concepts:

1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

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

Suppose you needed to vist a number of locations in the Houston area, by car. In order to be more efficient, you mightwish to

• minimize the total distance travelled

• minimize the total time travelled

• minimize the total cost (including tolls)

To examine this more closely, we need to introduce some concepts:

Page 2: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

Graph

Vertex

Edge

Path

Circuit

Example: Parking Meters (from book)

Page 3: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

A more complicated example is scheduling air plane flight paths connecting 5 cities: New York, London, Berlin,Miami and Rome.

A special type of circuit is called an Euler Circuit:

Page 4: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

A more realistic problem is shown below:

Figure 2: Snapshot of Airplane Traffice over College Station

Page 5: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

As another simpler example, suppose you need to visit a number of places on campus, by foot.

Figure 3: Texas A&M campus Map

What is the best path? How do you determine the best strategy? The answer to this involves an area of mathematicscalled “operations research.”

Page 6: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

2 Finding Euler Circuits

There are two basic questions we need to consider:

Q1: Given a graph (network) G, Does an Euler circuit exist?

Q2: If it does, how do we find it?

We could always do trial and error, but we want to develop a more systematic (mathematical) approach. One whichwill apply to any graph!

Euler (1735) considered a very famous problem, the Bridges of Koenigsberg, and came up with a solution based onthe following ideas

Valence

Connectedness

He eventually arrived at the famous Euler Circuit Theorem:

If G is graph, which is connected and all valences are even, then an Euler circuit exists!

If G has an Euler circuit, then G is connected and all valances are even!

Page 7: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

How do we construct an Euler circuit?

Rule: Don’t split the graph! That is, don’t use an edge which is the only connection between two parts of the graphwhich need to be covered.

“Don’t burn your bridges after you cross them”

Page 8: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

Why is the Euler Circuit Theorem true?

Suppose G has an Euler Circuit R, look at the starting (and ending) point X. It pairs up two edges. In fact everyincoming edge is paired with an outgoing edge at X.

If X is not a starting/ending point we can still pair up incoming and outgoing edges. Every point has paired edges,therefore valence is even!

To show it is connected, we note that every point has at least two edges (no point has valence zero). If the graph werenot connected, e.g. below

then there would not be a path connecting all the points, which contradicts the fact that the graph is Euler.

Page 9: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

3 Eulerizing Graphs

If G doesn’t have an Euler circuit (by having odd valences), can we add edges to make an Euler Circuit? The answeris yes! For example:

This process is called “Eulerizing” a graph.

A natural question is “Given a non-Euler graph, Is there a minimum number of edges that can be added to make itEuler?” This minimizes the cost of making a graph an Euler graph. This problem often comes up in designing postalroutes.

This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician (Meigu Guanin 1962).

There is more than one way to Eulerize a graph, for example, consider the simple network below:

On the left, we add two edges. On the right we only add one edge.

We can squeeze them down (to make a two way street out of a one-way street). We must be careful when we computethe valences ...

Page 10: 1 Euler Circuits - Texas A&M Universitympilant/math167/Notes/Chapter1.pdf · routes. This is called the “Chinese Postman problem,” because it was first studied by a Chinese mathematician

There are some rules of thumb which allow one to construct nearly optimal edge constructions.

I. For a rectangular network (streets align on a grid), we can use “edge-walking.” Since the odd valences are on theboundary, we can walk along the boundary and connect an odd valene vertex with the next vertex. If it is even we skipit, if it is odd, we repeat the process.

II. For non-rectangular networks, we connect nearest odd-valence vertices by a path (shortest length) and double theedges along it.

Tthe number of edges we add is at least as great as the number of odd-valence vertices divided by two!

4 Urban Graph Problems

In a city or town, the networks associated with streets also have various services associaed with them (sewers, utilitypoles, mailboxes, parking, etc). These have costs associated with them.

Minimizing costs for services based on an analysis of urban networks can potentially save quite a bit of money [seetext page 18].