5 2 5 3 graphs and graph terminology
Download
1 / 50

- PowerPoint PPT Presentation


  • 144 Views
  • Uploaded on

§5.2 - 5.3 Graphs and Graph Terminology. “Liesez Euler, Liesez Euler, c’est notre maître à tous.” - Pierre Laplace. Example 1: The following picture is a graph. List its vertices and edges. A. D. Graphs consist of points called vertices lines called edges

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '' - greta


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
5 2 5 3 graphs and graph terminology l.jpg

§5.2 - 5.3 Graphs and Graph Terminology

“Liesez Euler, Liesez Euler, c’est notre maître à tous.”

- Pierre Laplace


Slide2 l.jpg

Example 1: The following picture

is a graph. List its vertices and

edges.

A

D

Graphs consist of

  • points called vertices

  • lines called edges

  • Edges connect two vertices.

  • Edges only intersect at vertices.

  • Edges joining a vertex to itself are called loops.

C

E

B


Slide3 l.jpg

Example 2:

This is also a graph. The vertices just happen to have people’s names.

Such a graph could represent friendships (or any kind of relationship).

Flexo

Bender

Leela

Zoidberg

Farnsworth

Fry

Amy


Slide4 l.jpg

Now check out the graph below.

What can we say about it in comparison to the previous figure?

Leela

Fry

Flexo

Amy

Bender

Zoidberg

Farnsworth


Slide5 l.jpg

Moral of the Story

  • One graph may be drawn in (infinitely) many ways, but it always provides us with the same information.

  • Graphs are a structure for describing relationships between objects.(The vertices denote the objects and the edges represent the relationship.)



Graph terminology7 l.jpg
Graph Terminology

  • (ie - all the math-y jargon one could ask for)

  • AdjacentVertices are two vertices that are joined by an edge.

  • Adjacent Edges are two edges that intersect at a vertex.

  • The degree of a vertex is the number of edges at that vertex.


Graph terminology8 l.jpg
Graph Terminology

A loop counts twice toward the degree.

An odd vertex is a vertex of odd degree. An even vertex is a vertex of even degree.


Slide9 l.jpg

Example 3:

A

Find the degree of each vertex.

Is A adjacent to B?Is D adjacent to A?Is E adjacent to itself?Is C adjacent to itself?

Is AB adjacent to BC?Is CE adjacent to BD?

D

C

E

B


Graph terminology10 l.jpg
Graph Terminology

  • A path is a sequence of vertices such that each vertex is adjacent to the next. In a path, each edge can be traveled only once.

  • The length of a path is the number of edges in that path.


Graph terminology11 l.jpg
Graph Terminology

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

  • A graph is connected if any two vertices can be joined by a path. If this is not possible then the graph is disconnected.


Graph terminology12 l.jpg
Graph Terminology

  • The connected parts of a disconnected graph are called components.

  • A bridge is an edge in a connected graph whose removal makes it disconnected.


Slide13 l.jpg

Example 4:

Find a path from B to K passing through W but not S.

Find a path from H to J of length 4.

Find a circuit of length 5.

Find a circuit of length 1.

Find a bridge.

J

S

B

W

H

K

Example 5: Draw a picture of a graph that satisfies the following:

Vertices: A, B, C, D

Edges: AB, AC, AD, B is adjacent to D.


Slide14 l.jpg

Graph Terminology

  • An Euler Path is a path that travels through every edge of the graph(once and only once).

  • An Euler Circuit is a circuit that travels through every edge of a graph.


Slide15 l.jpg

Example 6: The graph on the left has no Euler paths, but the one on the right has several.

R

R

D

D

A

A

L

L


5 4 5 5 graph models and euler s theorems l.jpg

§5.4 - 5.5 Graph Models and Euler’s Theorems

“Now I will have less distraction.”

- Leonhard Euler

after losing sight

in his right eye.


K nigsberg s bridges ii the rare sequel that is not entirely gratuitous l.jpg
Königsberg’s Bridges II (The rare sequel that is not entirely gratuitous.)

Recall from Tuesday the puzzle that the residents of Königsburg had been unable to solve until Euler’s arrival:

  • Is there a way to cross all seven bridges exactly once and return to your starting point?

  • Is there even a way to cross all seven bridges exactly once?

R

D

A

A

L

A stylized (i.e. - inaccurate)

map of Königsberg’s Bridges.


Slide18 l.jpg

What Euler realized was that most of the information on the maps had no impact on the answers to the two questions.

R

R

D

D

A

A

A

L

L

By thinking of each bank and island as a vertex and each bridge as an edge joining them Euler was able to model the situation using the graph on the right. Hence, the Königsberg puzzle is the same as asking if the graph has an Euler path or Euler circuit.


Slide19 l.jpg

Example: maps had no impact on the answers to the two questions. Slay-age

  • The Scooby Gang needs to patrol the following section of town starting at Sunnydale High (labeled G). Draw a graph that models this situation, assuming that each side of the street must be checked except for those along the park. (Map is from p. 206)


Slide20 l.jpg

Example maps had no impact on the answers to the two questions. 2: (Exercise 21, pg 207) The map to the right of downtown Kingsburg, shows the Kings River running through the downtown area and the three islands (A, B, and C) connected to each other and both banks by seven bridges. The Chamber of Commerce wants to design a walking tour that crosses all the bridges. Draw a graph that models the layout of Kingsburg.


Slide21 l.jpg

Example maps had no impact on the answers to the two questions. 3:

The Kevin Bacon Game

(http://www.cs.virginia.edu/oracle/)


Euler s theorems l.jpg
Euler’s maps had no impact on the answers to the two questions. Theorems

  • Euler’s Theorem 1(a) If a graph has any odd vertices, then it cannot have an Euler circuit.(b) If a graph is connected and every vertex is even, then it has at least one Euler circuit.


Slide23 l.jpg

  • Euler’s Theorem 2 maps had no impact on the answers to the two questions. (a) If a graph has more than two odd vertices, then it cannot have an Euler path.(b) If a connected graph has exactly two odd vertices then it has at least one Euler path starting at one odd vertex and ending at another odd vertex.


Slide24 l.jpg

Example maps had no impact on the answers to the two questions. 4: Königsburg’s Bridges III (The Search For More Money)

Let us consider again the Königsburg Brdige puzzle as represented by the graph below:

R

D

A

L

We have already seen that the puzzle boils down to whether this graph has an Euler path and/or an Euler circuit. Does this graph have either?


Slide25 l.jpg

Example maps had no impact on the answers to the two questions. 5: (Exercise 60, pg 214) Refer to Example 2. Is it possible to take a walk such that you cross each bridge exactly once? Explain why or why not.

N

A

B

C

S


Slide26 l.jpg

  • Example maps had no impact on the answers to the two questions. 6: Unicursal TracingsRecall the routing problems presented on Tuesday:

  • “Do these drawings have unicursal tracings? If so, are they open or closed?”

How might we answer these queries? Well, if we add vertices to the corners of the tracings we can reduce the questions to asking whether the following graphs have Euler paths (open tracing) and/or Euler circuits (closed tracing).

(a)

(b)

(c)


Slide27 l.jpg

  • Euler’s Theorem 3 maps had no impact on the answers to the two questions. (a) The sum of the degrees of all the vertices of a graph equals twice the number of edges.(b) A graph always has an even number of odd vertices.


A quick summary number of odd vertices conclusion l.jpg
A quick summary . . . maps had no impact on the answers to the two questions. Number of odd vertices Conclusion


5 6 fleury s algorithm l.jpg

§5.6 Fleury’s Algorithm maps had no impact on the answers to the two questions.


Slide30 l.jpg

  • Euler’s Theorems give us a simple way to see whether an Euler circuit or an Euler path exists in a given graph, but how do we find the actual circuit or path?

  • We could use a “guess-and-check” method, but for a large graph this could lead to many wasted hours--and not wasted in a particularly fun way!


Algorithms l.jpg
Algorithms Euler circuit or an Euler path

An algorithmis a set of procedures/rules that, when followed, will always lead to a solution* to a given problem.

  • Some algorithms are formula driven--they arrive at answers by taking data and ‘plugging-in’ to some equation or function.

  • Other algorithms are directive driven--they arrive at answers by following a given set of directions.


Fleury s algorithm l.jpg
Fleury’s Euler circuit or an Euler path Algorithm

  • The Idea:“Don’t burn your bridges behind you.”(“bridges”: graph-theory bridges, not real world)

  • When trying to find an Euler path or an Euler circuit, bridges are the last edges we should travel.

  • Subtle point: Once we have traversed an edge we no longer care about it--so by “bridges” we mean the bridges of the part of the graph that we haven’t traveled yet.


Slide33 l.jpg

Example Euler circuit or an Euler path 1:Does this graph have an Euler circuit? If so, find one.

A

B

D

C

E

F


Fleury s algorithm34 l.jpg
Fleury’s Euler circuit or an Euler path Algorithm

  • Ensure the graph is connected and all the vertices are even*.

  • Pick any vertex as the starting point.

  • When you have a choice, always travel along an edge that is not a bridge of the yet-to-be-traveled part of the graph.

  • Label the edges in the order which you travel.

  • When you can’t travel anymore, stop.* - This works when we have an Euler circuit. If we only have a path, wemust start at one of (two) the odd vertices.


Slide35 l.jpg

Example Euler circuit or an Euler path 2:Do the following drawings have unicursal tracings? If so, label the edges 1, 2, 3, . . . In the order in which they can be traced.


Slide36 l.jpg

Example Euler circuit or an Euler path 3: (Exercise 60, pg 214) The map to the right of downtown Kingsburg, shows the Kings River running through the downtown area and the three islands (A, B, and C) connected to each other and both banks by seven bridges. The Chamber of Commerce wants to design a walking tour that crosses all the bridges. Draw a graph that models the layout of Kingsburg.It was shown yesterday that it was possible to take a walk in such that you cross each bridge exactly once. Show how.

N

A

B

C

S


Slide37 l.jpg

Example: Euler circuit or an Euler path Slay-age

  • The Scooby Gang needs to patrol the following section of town starting at Sunnydale High (labeled G). Suppose that they must check each side of the street except for those along the park. Find an optimal route for our intrepid demon hunters to take.


Slide38 l.jpg

Quiz 1, problem 2 Euler circuit or an Euler path

North Bank (N)

B

A

C

South Bank (S)


Mathematics and the arts l.jpg
Mathematics and the Arts? Euler circuit or an Euler path

  • One of Euler’s 800+ publications included a treatise on music theory.

  • Book was too math-y for most composers--too music-y for most mathematicians


Mathematics and the arts40 l.jpg
Mathematics and the Arts? Euler circuit or an Euler path

  • While Euler’s theories did not catch on, a relationship between mathematics and music composition does exist in what is called the golden ratio.


Fibonacci numbers l.jpg
Fibonacci Numbers Euler circuit or an Euler path

  • The Fibonacci Numbers are those that comprise the sequence:1, 1, 2, 3, 5, 8, 13, 21, . . .

  • The sequence can be defined by:F1=1, F2=1;Fn=Fn-1+Fn-2

  • These numbers can be used to draw a series of ‘golden’ rectangles like those to the right.


Fibonacci numbers42 l.jpg
Fibonacci Numbers Euler circuit or an Euler path

  • The sequence of Fibonacci Ratios - fractions like 3/5, 5/8, 8/13 approach a number called the Golden Ratio (≈0.61803398…)


The golden ratio l.jpg
The Golden Ratio Euler circuit or an Euler path

  • Several of Mozart’s piano sonatas make use of this ratio.

  • At the time such pieces regularly employed a division into two parts 1. Exposition and Development2. Recapitulation

  • In Piano Sonata No. 1 the change between parts occurs at measure 38 of 100. (which means that part 2 is 62 ≈ 0.618 x 100)


The golden ratio44 l.jpg
The Golden Ratio Euler circuit or an Euler path

  • Another example in music is in the ‘Hallelujah’ chorus in Handel’s Messiah.

  • The piece is 94 measures long.

  • Important events in piece:1. Entrance of trumpets - “King of Kings” occurs in measures 57-58 ≈ (8/13) x 942. “The kingdom of glory…” occurs in meas. 34-35 ≈ (8/13) x 57etc, etc. . .


The golden ratio in art l.jpg
The Golden Ratio in Art Euler circuit or an Euler path

H

Approx. = 0.618 x H


The golden ratio in art46 l.jpg
The Golden Ratio in Art Euler circuit or an Euler path

H

Approx. = 0.618 x H


The golden ratio in art47 l.jpg
The Golden Ratio in Art Euler circuit or an Euler path


The golden ratio in art48 l.jpg
The Golden Ratio in Art Euler circuit or an Euler path

.618 x Ht.

0.618 x Width


The golden ratio in art49 l.jpg
The Golden Ratio in Art Euler circuit or an Euler path

.618 x Ht.

0.618 x Width