mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · web view:...

22
Section 5.1: Euler Circuit Problems MANAGEMENT SCIENCE PROBLEMS: find _______________________ to organize and carry out a large number of complex tasks that do not often appear possible to make _____________________________ What is a routing problem? Finding ways to ____________________ the delivery of goods/ services to an ___________________________ Real Life Examples: Two Important Basic Questions: o Existence : Is an actual route even possible? o Optimization : If there are multiple possible routes, which is optimal route Special Case of Routing Problem: Exhaustive Requirement : route must go everywhere (all destinations and all paths) Route is called an exhaustive route. Section 5.2: Graphs A graph is a picture consisting of dots and lines (curves). This type of graph represents an area of mathematics called graph theory and is different than graphing of functions on the coordinate plane. Formal Definition of a Graph: a structure that defines pairwise relationships (edges) with a set of objects (vertices). X related to Y if and only if XY is an edge. Key Terms of a Graph: VERTICES: dots or points of the graph EDGES: lines or curves that connect any two vertices LOOP: A B

Upload: others

Post on 09-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Section 5.1: Euler Circuit ProblemsMANAGEMENT SCIENCE PROBLEMS: find _______________________ to organize and carry out a large number of complex tasks that do not often appear possible to make _____________________________

What is a routing problem? Finding ways to ____________________the delivery of goods/ services to an ___________________________

Real Life Examples:

Two Important Basic Questions: o Existence : Is an actual route even possible?

o Optimization : If there are multiple possible routes, which is optimal route

Special Case of Routing Problem: Exhaustive Requirement : route must go everywhere (all destinations and all paths) Route is called an exhaustive route.

Section 5.2: GraphsA graph is a picture consisting of dots and lines (curves). This type of graph represents an area of mathematics called graph theory and is different than graphing of functions on the coordinate plane.

Formal Definition of a Graph: a structure that defines pairwise relationships (edges) with a set of objects (vertices). X related to Y if and only if XY is an edge.

Key Terms of a Graph: VERTICES: dots or points of the graph EDGES: lines or curves that connect any two vertices

LOOP:

MULTIPLE EDGES:

ISOLATED VERTEX:

Set Notation: Empty Set: { }, has nothing in it

VERTEX SET: V = {labeled vertices} EDGE SET: E = {edges labeled by 2 vertices}

A BC

DE

Page 2: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Practice Problems: Identify each of the following, if they exist, in the graphsGraph #1: Graph #2:

Vertex set: Vertex Set:

Edge Set: Edge Set:

Loops: Loop:

Multiple Edge: Multiple Edge:

Isolated Vertex: Isolated Vertex:

Graph #3:

Vertex set:

Edge Set:

Loops:

Multiple Edge:

Isolated Vertex:

Graph #4:

Vertex set:

Edge Set:

Loops:

Multiple Edge:

Isolated Vertex:

A

B

C

D

E M

N

OP

Q R

A B

C D E

F

UV W

X

YZ

Page 3: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Examples: Draw the following graph for the given vertex and edge set information:1) V = {A, B, C, D, E} and E = {AB, BC, CD, DE}

2) V = {A, B, C, D, E} and E = {AB, AD, BC, CE, CD, DA, DE}

3) Vertex Set: {R, S, T, U}Edge Set: {RS, RT, RU, TU, TS}

4) Vertex Set: {A, B, C, D, E}Edge Set: {AA, AB, BC, BD, CD, CE, DC, DB, EA}

SAME GRAPHS: Graphs may look ____ DIFFERENT ______, but still represent the _____SAME___ relationships SPACIALLY : Can you stretch or drag parts of one graph to look like another. BOTH graphs can be labeled to have the SAME VERTEX and EDGE SET

1) 2)

CVertex Set: A, B, C, D,Edge Set: AB, BC, BD AD, AD, CD

SAME: Just switched outside and inside edges of square

Vertex Set: A, B, C, D, E,Edge Set: AB, BC, BD, CD, DE

SAME: Flatten out the first graph

D D

B

EDCBA

AA

E

B BA

CD

C

Page 4: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Which of the following graphs are the SAME GRAPH? Try to label the second graph similar to the first. Check if you can make the same edge set as the original

PAIR #1 PAIR #2

PAIR #3

Section 5.3: Graph Concepts and TerminologyADJACENT Vertices are two SPECIFIC vertices that are joined by an edge.

Loop is adjacent to itself If an edge exists between two vertices, then they are adjacent.

ADJACENT Edges are two edges that intersect at (share) a vertex. Vertex is in both edge notations

The DEGREE of a vertex is the number of edges at that vertex. deg(A) = degree of vertex A

A loop counts twice toward the degree.

ODD vertex is a vertex of odd degree. “ODD refers to edges at vertex”

A

BC D

A

B

CD

E

ABC

DE

Page 5: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

EVEN vertex is a vertex of even degree. “EVEN refers to edges at vertex”

MOVING AROUND A GRAPHPATH is a sequence of vertices such that each vertex is adjacent to the next.

In a path, each edge can be traveled only ONCE.

LENGTH of a path is the number of edges in path.

CIRCUIT is a path that starts and ends at the same vertex.

EXAMPLE: FIGURE #1

a. Find the degree of each vertex.A = C = E =

B = D =

b. Is A adjacent to B? (Yes or No)

c. Is D adjacent to A? (Yes or No)

d. Is E adjacent to itself? (Yes or No)

e. Is C adjacent to itself? (Yes or No)

f. Is AB adjacent to BC? (Yes or No)

g. Is CE adjacent to BD? (Yes or No)

h. Find a path from A to E.

i. Find a circuit for C.

j. Find a circuit for E.

PRACTICE: Figure #21) Find a path from B to K passing

through W but not S.

2) Find a path from H to J of length 4.

3) Find a circuit of length 5.

Figure #1

B

H

S J

WK

A

B

C D

E

Page 6: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

4) Find a circuit of length 1.

5) Find degree of each vertex: A graph is CONNECTED if any two vertices can be joined by a path. It is always possible to travel from one vertex to any other vertex in the graph.

If this is not possible then the graph is DISCONNECTED. The connected parts of a disconnected graph are called COMPONENTS.

GRAPH #1: CONNECTED{A, B, C, D, E}

GRAPH#2: DISCONNECTED{P, Q, R, S, T, U, V, W, X, Y}

Entire graph is ONE ComponentTwo Components: P, R, X, Y and S, W, T, V, U Sections

A BRIDGE is an edge in a connected graph whose removal makes it disconnected. An edge that is also the ONLY PATH between the two vertices. No alternative routes exist to travel between two vertices besides that edge

Example Graph #1: BE, EC, ED Example Graph #2: SW, TW, TV, UV

Bridge Practice: Identify the bridge in Figure #1 and Figure #2:

Draw a graph that satisfies the given properties:#1: Has 6 vertices and 6 edges #2: Has 6 vertices and 2 bridges

#3: Vertex Set: {A, B, C, D} #4: Vertex Set: P, Q, R, S, T Edge Set: AB, AC, AD, BD. Edge Set: PQ, QR, RR, RS, ST, TP,

AB

C

DEF

P R S T U

W VXY

Figure #2

Page 7: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

#5: 3 even vertices and 4 odd vertices. #6: Graph of 5 vertices and 8 edges6a. Connected 6b. Disconnected

HOMEWORK: p. 185 – 186 #1, 4, 5, 7, 9, 11, 13 and p. 191 #57

Page 8: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Section 5.4: Graph ModelsUnicursal Tracing: Use the dot given as your start. Identify if the following drawings are closed, open, or neither type of unicursal tracing. (Hint: It may be more helpful to number rather than trace edges)

FURTHER CLASSIFICATION OF UNICRUSAL TRACINGS WITH GRAPH TERMINOLOGY:1) How does the term Path and Circuit apply to a unicursal tracing terms of open or closed?

2) What additional characteristic does a unicursal tracing have that we haven’t discussed in defining a path and circuit?

EULER PATH: A path that travels through every edge of the graph (once and only once).

EULER CIRCUIT: A circuit that travels through every edge of a graph.

EULER =

INTRODUCTION OF GRAPH THEORY: The city of Konigsberg in Prussia (Now Russia) was set on both sides of the Pregel River, and included two large islands which were connected to each other and the mainland by seven bridges. The people of Konigsberg wanted to know if it was possible to take a stroll through the city and cross each of the seven bridges once and only once. Try on your own to find out?

What were the people trying to find an Euler Path or Circuit?

MODELING: using a mathematical concept to describe and solve a real-life problem WORD PROBLEMS:

GRAPH MODELS :

VERTICES:

EDGES:

Page 9: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

5.4 GRAPH MODEL EXAMPLES:1) DATING PATTERNS : Moose has dated Meg, Ginger, and Betty. Jughead has

dated Ginger and Betty. Archie has only ever dated Veronica. Reggie has only dated Betty.

EDGES = ______________________________

VERTICES = ____________________________

2) GAMES PLAYED : A typical week has the following games being played. Monday: PIT at DC, NY at PHI, CHI at STLTuesday: PIT at DCWednesday: NY at STL, PHI at CHIThursday: PIT at STL, NY at DC, PHI at CHIFriday: PHI at DC, CHI at PIT, STL at NY

EDGES = ______________________

VERTICES = ____________________

Example #3: The figure is a map of a neighborhood.

EDGES = __________________

VERTICES = _______________________

3) Neighborhood Watch wants to be able to patrol each block the community after a rash of burglaries.

Page 10: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Example #4: The figure is a map of a neighborhood

4) The mailman needs to be figure out a delivery route for the same neighborhood.

Example #5: In a map, represent the different zones for high schools and which zones border each other for the 2009 – 2010 WSFCS School Year. .

EDGES: _________________________ VERTICES: ____________________________

Page 11: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

HOMEWORK: pp. 187#15, 17, 19, 20

Page 12: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Section 5.5: Euler’s TheoremINVESTIGATION

For each graph do the following:(1) Does the graph have an Euler Circuit or Path? (At any starting vertex)(2) What is the degree of each vertex of the graph?(3) What is the total number of edges of the graph?

Graph #1 Graph #2 Graph #3 Graph #4 Graph #5

#1Circuit or Path? Circuit or Path? Circuit or Path? Circuit or Path? Circuit or Path?

#2

A =

B =

C =

D =

A =

B =

C =

D =

A =

B =

C =

D =

A =

B =

C =

D =

A = E =

B = F =

C =

D =

#3

OBSERVATION #1: What do you notice about graphs of Euler Circuits v. Euler Paths?EULER CIRCUIT EULER PATH

What type of vertex can you start and end at?

What do all vertices have in common?

What type of vertex can you start and end at?

What is true about the vertices in all Euler path cases?

EXISTENCE THEOREMS FOR EULER#1: Euler’s Circuit Theorem (a) If a graph has ________________________________, then it ______________ have an Euler circuit.

(b) If a graph is ___________________________ vertex is ___________, then it has at least one Euler circuit.

#2: Euler’s Path Theorem (a) If a graph has _________________________________________, then it __________ have an Euler path.

A AA

A

A A B

BBBB

C C C C

C

D DDDD E

F

Page 13: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

(b) If a connected graph has ________________________ then it has at least one Euler path STARTING at one ODD vertex and ending at the OTHER ODD one.For each graph #6 - #8:

(1) What is the degree of each vertex of the graph?(2) What is the total number of edges of the graph?

Graph #6 Graph #7 Graph #8

#1A = B = C = D =

E = F = G =

A = B = C =

D = E = F =

A = B =

C = D =

#2Total Edges: Total Edges: Total Edges:

OBSERVATION #2 - Describe a relationship between total number of edges and degree of all vertices in graph.

Is this relationship also true in graphs #1 – 5?

EULER’S SUM OF THE DEGREES THEOREM

(a) The ________ of the degrees of all the vertices of a graph equals _____________ the number of edges.

(b) A graph _____________________ has an _____________ number of _______________ vertices.

SUMMARY OF THEOREMS: Based on odd vertices in a CONNECTED graph.

A

B

C D

A

B C D

A

BC

D

E

E

FF

G

Page 14: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Number of Odd Vertices Euler Circuit or Path Exist?

0 odd vertices

2 odd vertices

4, 6, 8, …(even number of odd vertices)

1, 3, 5, …(odd number of odd vertices)

HOMEWORK: p. 188 #21 – 25 and p. 191 #53, 55

Page 15: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Section 5.6: Fleury’s AlgorithmDoes an Euler Circuit or Euler Path Exist in each graph. If so, find by identifying the start/ end and number the edges in order.

What do Euler’s Theorems tell us about a graph?

Euler’s Theorems DO __________________________________________ an Euler circuit or an Euler path.

Euler’s Theorems DO NOT_________________________________________ Euler circuit or Euler path.

How have we been finding Euler Paths and Circuits (Closed / Open Unicursal Tracings)???

Fleury’s Algorithm: (Directive Driven)The Idea : “Don’t burn your bridges behind you.” (“bridges”: graph-theory bridges, not real world)

Fact #1: As you trace edges to find an Euler Path or Euler Circuit, you can no longer trace that edge and are limiting the parts of the graph left to travel on.

Fact #2: As you consider the remaining part of your graph that you have not traveled on, certain edges you choose may get you stuck and prevent you from tracing all the edges without re-tracing (BRIDGES)

The concept of a bridge occurs in the yet-to-be-traveled portion of a graph (REMAINING GRAPH)

STEPS Euler Circuit Euler Path1: EXISTENCE – Determine the type of Euler?

Graph is connected and has NO ODD vertices

(Check the degree of all vertices)

Graph is connected and has EXACTLY TWO odd vertices(Check the degree of all vertices)

2: STARTING VERTEX

Choose any vertex unless given a specific starting vertex in a problem

For an Euler Circuit, any vertex can be the start and the end for the circuit.

Choose either of the odd vertices

For an Euler Path, only the two odd vertices can be the start and end.

Page 16: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

3: INTERMEDIATE STEPS – Tracing edges to find an Euler Path or Circuit

Label the edges you have already traveled by numbering them in order.

ALWAYS choose an edge that is NOT A BRIDGE in the yet-to-be-traveled portion of the remaining graph. (unlabeled edges)

ONLY choose a BRIDGE if it is the ONLY OPTION from your current vertex in the yet-to-be-traveled portion of the graph.

EXAMPLES OF FLEURY’S ALGORITHM: Determine if each graph has an Euler PATH or CIRCUIT or None Find the Euler Path or Circuit by NUMBERING EDGES In an Euler Circuit pick vertex A as your start In an Euler Path pick the odd vertex as start.

A B

C D

E F

A

B

C

D

F

G

A B C

D E

F G

A B C

D E F

G H

A

C

B

D

E F

A B C D

FE G H

I J K L

GRAPH #1: GRAPH #2:

GRAPH #3: GRAPH #4:

GRAPH #5: GRAPH #6:

Page 17: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

A B C D

FE G H

IJ K

L

M N O P

A B

CD

FE

A

B

C

DF

E

G

A B

CD

F

E

G

AB CD

FE

G HIJ K L M N OP

GRAPH #7: E. Circuit GRAPH #8: E. PATH

GRAPH #9: NONE GRAPH #10: E. PATH

GRAPH #11: E. Circuit

Page 18: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Section 5.7: Eulerizing GraphsRouting Problems: What if no Euler Circuit or Path exists, but still want to have the exhaustive requirement?

Edges would need to be traveled more than one time (retraced) to be exhaustive

NEW GOAL: is to find an optimal route that has the least number of edge re-crossings (RETRACING).

Eulerizing Graph: The process of creating EULER CIRCUITS by turning odd vertices into even vertices by adding “duplicate” edges in strategic places

PROCESS of EULERIZING a GRAPH: Create a graph that has an Euler Circuit1) IDENTIFY all the odd vertices (circle)

2) Pick any two odd vertices, and “duplicate” the shortest path between them by adding MULTIPLE EDGES along that path.

a. “DUPLICATE”: copy an existing edge by making multiple edges from original edge setb. DO NOT Create a New Edge that wasn’t part of the original graph’s edge set

3) If more than 2 odd vertices remain after Step 2 is completed, find and duplicate the shortest path b/w pairs of the remaining odd vertices until No Odd Vertices Remain.

4) Try for OPTIMAL EULERIZATION. Least Number of Multiple Edges, if possible (Always greater than or equal to half # of odd vertices)

5) Fleury’s Algorithm to find the ACTUAL Euler Circuit on this new graph.

A B C D

FE G H

I J K L

A

B

C D E

F G

A

B C

D

E F

Page 19: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

Semi- Eulerization Graph: The process of creating EULER PATH by turning odd vertices into even vertices by adding “duplicate” edges in strategic places and leaving two key vertices as odd (departure and arrival)

PROCESS of SEMI-EULERIZATION: Create a graph with an Euler path1) Identify all the odd vertices2) Pick any two odd vertices, and “duplicate” the shortest path between them by adding MULTIPLE

EDGES along that path. 3) If more than 2 odd vertices remain after Step 2 is completed, find and duplicate the shortest path

b/w pairs of the remaining pairs odd vertices until Start and End Vertices Remain. a. START and END VERTEX must remain ODD, but more edges can be added to them to make

larger odd degree 4) Try to create an OPTIMAL SEMI-EULERIZATION. 5) Fleury’s Algorithm to find the Euler Path.

EXAMPLES: SEMI-EULERIZING GRAPH

EXAMPLES: EULERIZING GRAPH

END

STARTSTART

END

END

START

START

END

END

START

START

END

Page 20: mathwithmrlloyd.weebly.commathwithmrlloyd.weebly.com/uploads/2/5/8/9/25890947/c…  · Web view: Is an actual route even possible? Optimization: If there are multiple possible routes,

HOMEWORK: pp. 188-190 #27, 33, 34, 41, 42, 43