/
Graph Theory to the Rescue Graph Theory to the Rescue

Graph Theory to the Rescue - PowerPoint Presentation

cheryl-pisano
cheryl-pisano . @cheryl-pisano
Follow
434 views
Uploaded On 2016-05-14

Graph Theory to the Rescue - PPT Presentation

Using graph theory to solve games and problems Dr Carrie Wright University of Arizona Teachers Circle November 17 2011 BRIDGES OF KONIGSBERG In Konigsberg East Prussia a river runs through the city such that in its center is an island and after passing the island the river broke into ID: 319372

cube graph edges bridge graph cube bridge edges vertices konigsberg bridges cubes problem euler insanity instant represent graphs vertex

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Graph Theory to the Rescue" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Graph Theory to the Rescue

Using graph theory to solve games and problems

Dr. Carrie WrightUniversity of ArizonaTeacher’s CircleNovember 17, 2011Slide2

BRIDGES OF KONIGSBERG

In Konigsberg, East Prussia, a river runs through the city such that in its center is an island, and after passing the island, the river broke into two parts. Seven bridges were built so that the people of the city could get from one part to another.

The people wondered whether or not one could walk around the city in a way that would involve crossing each bridge exactly once.Slide3

Bridges of Konigsberg ProblemCan the Konigsberg Bridge Problem be solved?

Suppose they had decided to build one fewer bridge in Konigsberg. Can I solve the problem now? Does it matter which bridge you take away? What if you add bridges?

What about walking through the city crossing every bridge ending at a different place? (Somebody is picking you up)Slide4

GRAPHSA graph is an ordered pair G=(V,E), comprising of a finite, nonempty set, V, (called the vertices) together with a

multiset E of unordered pairs (called edges)EXAMPLE:V={

a,b,c,d} E={(a,c),(a,c),(a,b),(c,b),(b,d),(b,d),(a,a),(d,d)}Slide5

Graph Theory definitionsLet

x and y be vertices in a graph G=(V,E). An x-y

walk in G is a (loop-free) finite alternating sequence of vertices and edges from G starting at vertex x and ending at vertex y.If no edge in the x-y walk is repeated, then the walk is called an

x-y trail. A closed x-x trail is called a

circuit

.

The

degree

of a vertex,

v

, is the number of edges that are incident to

v

; or, the number of edges meeting at a vertex,

v

.Slide6

Represent the Bridges of Konigsberg problem into a graph (the vertices represent the parts of land and the edges represent the bridges)

A graph G is said to have an Euler circuit if there is a circuit in G that traverses every edge of the graph exactly once. If there is an open trail from a to

b in G that traverses each edge in G exactly once, then the trail is called an Euler circuit.Slide7

Graphs and Euler Circuits

Here are some more graphs. Which ones have Euler Circuits and which ones don’t?When do graphs have Euler Circuits?THEOREM: Let G be a graph with no isolated vertices. The graph G has an Euler circuit if and only if G is connected and the degree of every vertex is even.

Theorem: Let G be a graph with no isolated vertices. G has an Euler trail if and only if G has exactly two vertices of odd degree.Slide8

Bridges of Konigsberg ProblemCan the Konigsberg Bridge Problem be solved?

Suppose they had decided to build one fewer bridge in Konigsberg. Can I solve the problem now? Does it matter which bridge you take away? What if you add bridges?

What about walking through the city crossing every bridge ending at a different place? (Somebody is picking you up)Slide9

More ProblemsJeannie, who lives in Eugene, was flying to visit several of her aunts and uncles over Christmas. She flew on an airline that has hubs in Chicago and Denver. She had to get to Minneapolis to visit her aunt Minnie and to St. Louis to see her Uncle Louis and to Little Rock to see her uncle Rocco. Can Jeannie fly on each flight leg exactly once and end up back in Eugene?Slide10

More Problems

Mike had had a very successful Cub Scout popcorn sale. Now the popcorn had arrived and it was time to deliver it to all the neighbors. He had managed to sell popcorn to just about every household in his neighborhood and now had to haul his load of popcorn along 22 blocks to deliver it. He's looking for the most efficient route through his neighborhood--he wants to walk each block exactly once until all his popcorn is delivered. Can you find a route for him? Here's a map of his neighborhood:Slide11

INSTANT INSANITY (1967)A puzzle with 4 cubes. Each cubes face is one of 4 colors: red, blue, green, white

Stack the cubes in a column. So that each side of the column has all four colors showing.Slide12

One Instant Insanity Game

R

G

G

G

G

B

B

B

B

Y

Y

Y

Y

Y

Y

R

R

R

R

G

B

B

Y

R

1

2

3

4Slide13

How many different arrangements are there?Cube 1 at the bottom – 3 different arrangements for this cube (only concerned with the four faces on the side)

6 ways to place it on top now – then rotate it 4 times with a different outcome possible – so 24 total waysSimilarly 24 for the 3rd

and 4th argumentsTotal Number: 3(24)(24)(24) = 41,472 possibilitiesSlide14

Instant Insanity and Graph Theory

We are only concerned with the sides – and the opposite colors. We can start by focusing on the front and back of the cubes, then move to the sidesWe want to represent the cube in terms of a graph:4 colors will represent the vertices

Edge will represent if 2 colors are on opposite faces of the cubeDo this for all 4 cubes – you can either put them all on one graph or separate it into 4 separate graphs (each graph representing a cube)Label the edges by denoting which cube they come fromSlide15

One Instant Insanity Game

R

G

G

G

G

B

B

B

B

Y

Y

Y

Y

Y

Y

R

R

R

R

G

B

B

Y

R

1

2

3

4Slide16

Solving Instant Insanity

With the 4 cubes stacked in a column, examine two opposite sides of the column. This gives us 4 edges in the graph with each label appearing once.Each color appears once on each side. So each color must appear twice as an endpoint.

Do the same thing with the other sides.Note: These aren’t always possible.You’re looking for 2 disjoint subgraphs:Each subgraph contains all 4 vertices and four edges (one for each cube)

Each subgraph, each vertex is incident with exactly two edges

No (labeled) edge of the labeled graph appears twice in both

subgraphsSlide17

Cubes as GraphsSlide18

A Solution

Here is a possible solution to this puzzle. There is another solution, too.Slide19

SolutionHere is a solution to this particular Instant Insanity game. There is another solution to this same game.Slide20

Other Instant Insanity GamesThere are 3 more games on the tables. Can you solve them? Note: not all of them have solutions. These are

labelled as b-b, meaning blue is opposite of blue.

GAME

CUBE 1

CUBE 2

CUBE 3

CUBE 4

1

Y-Y, Y-R, B-G

B-Y, B-G, R-R

B-G, B-Y, R-R

Y-B, G-R, G-Y

2

G-B, B-R, Y-R

Y-R, G-Y, B-B

R-G R-B, G-Y

B-Y, B-B, G-Y

3

G-R, B-B, R-Y

G-Y, R-R, B-G

G-Y, R-R, G-B

R-B,

G-G, R-Y