spring 2015 mathematics in management science euler’s theorems euler circuits & paths ect...

33
Spring 2015 Mathematics in Management Science Euler’s Theorems Euler Circuits & Paths ECT & EPT Burning Bridges Fleury’s Algorithm

Upload: muriel-caldwell

Post on 29-Dec-2015

218 views

Category:

Documents


3 download

TRANSCRIPT

Spring 2015Mathematics in

Management Science

Euler’s Theorems

Euler Circuits & Paths

ECT & EPT

Burning Bridges

Fleury’s Algorithm

Graphs

• A graph is a finite set of dots and connecting links.

• The dots are called vertices. • The links are called edges.• The valence of a vertex is the

number edges that meet there.• Vertices can be even or odd

depending on their valence.

Valence Examples

The valence of a vertex is the number edges that meet it.

Vtx B has valence ?

Vtx E has valence ?

Gotta be careful!

Paths and Circuits

• A path is a finite sequence of adjacent edges on a graph that joins two vertices.

• A circuit is a path that begins and ends at the same vertex.

• A graph is connected if every vertex can be joined to every other vertex by a path.

Euler Paths and Circuits

• An Euler path is a path that traverses each edge exactly once.

• An Euler circuit is a circuit that traverses each edge exactly once.

Euler’s Circuit Theorem

A graph has an Euler circuit

if and only if

the graph is connected,

and,all its vertices have even valence.

Any odd vertex means NO Euler circuit.

Euler’s Path Theorem

A graph has an Euler path

if and only if

the graph is connected,

and,exactly two of its vertices are odd.

Once we know one exists,How do we find Euler circuits?Euler paths?

Consider the path represented by the sequence of numbered edges on the graph below. Which statement is correct?

A. The sequence of numbered edges traverses each edge exactly once, but is not an Euler circuit.

B. The sequence of numbered edges forms a circuit, but not an Euler circuit.

C. The sequence of numbered edges forms an Euler circuit.

Consider the path represented by the sequence of numbered edges on the graph below. Which statement is correct?

A. The sequence of numbered edges traverses each edge exactly once, but is not an Euler circuit.

B. The sequence of numbered edges forms a circuit, but not an Euler circuit.

C. The sequence of numbered edges forms an Euler circuit.

ANSWER

Use ‘trial and error’ to find an Euler circuit.

Example

Example

valence 3, so

no Euler circuit

But, there is an Euler path

Example

Yes, there is an Euler circuit

Example Rule of Thumb:

“Don’t burn your bridges”

Bridges

A special kind of edge.

Start with a connected graph.

An edge is called a bridge if erasing it makes the graph disconnected.

BF, FG, FH are bridges

Example

E

A

B C

D

Is there an Euler Circuit?

Suppose we go ABCD.

Should we next go to E?

Yes!

An algorithm is a step-by-step procedure for accomplishing a given task.

Examples

• a recipe for baking a cake

• directions to drive from C to D

Fleury’s Algorithm

Check that the graph is connected and either has no odd vertices (for circuit), or has two odd vertices (for path).

Choose a starting vertex. For a circuit, can be any vertex; for path, it must be one of the two odd vertices.

At each step, if you have a choice, don’t choose a bridge of the yet-to-be-traveled part of the graph.

Summary – so far

Euler circuits and paths provide the most efficient means to traverse all edges of a graph.

Euler’s Theorems tell us an easy way to determine when a graph has an Euler circuit or path: the graph must be connected & all (all but 2 for path) vertices must be even.

Edges & valences

It’s easy to count the number of edges.What about adding up all the valences?Consider an edge joining vtxs A,B.This edge contributes +1 towards A’s valence, & +1 towards B’s valence too.Adding up all valences corresponds to

counting all edges (and doubling).

B

A

Euler’s Sum of valence’s Thm

The sum of valences of all vtxs equals twice the number of edges.

If there are M edges and N vtxs with valences d1 , d2 , …, dN , then

d1 + d2 + …+ dN = 2 M .

Consequently, there is always

an even number of odd vtxs.

Example

Find all graphs which have• exactly four edges,• exactly 1 vertex with valence 3,• no isolated vertices.

Use fact: 3 + other valences = 24 = 8

Examine 3+5, 3+4+1, 3+3+2, 3+3+1+1,

3+2+2+1, 3+2+1+1+1, 3+1+1+1+1+1.