+ Graph Theory to the Rescue Using graph theory to solve games and problems Dr. Carrie Wright University of Arizona Teacher’s Circle November 17, 2011.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Chapter 8 Topics in Graph Theory
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
The 7 Bridges of Konigsberg A puzzle in need of solving.
Chapter 7 Graph Theory 7.1 Modeling with graphs and finding Euler circuits. Learning Objectives: Know how to use graphs as models and how to determine.
Graph Theory: Euler Circuits Christina Mende Math 480 April 15, 2013.
Section 14.1 Intro to Graph Theory. Beginnings of Graph Theory Euler’s Konigsberg Bridge Problem (18 th c.)  Can one walk through town and cross all.
AMDM UNIT 7: Networks and Graphs
BY: MIKE BASHAM, Math in Scheduling. The Bridges of Konigsberg.
Euler Circuits and Paths
The Seven Bridges Of Konigsberg.
Koenigsberg bridge problem It is the Pregel River divided Koenigsberg into four distinct sections. Seven bridges connected the four portions of Koenigsberg.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
A Presentation By: Jillian Minuto Troy Norman Alan Leggett Group Advisor: Prof. G. Warrington Graph Theory.
The Instant Insanity Game
Section 2.1 Euler Cycles Vocabulary CYCLE – a sequence of consecutively linked edges (x 1,x2),(x2,x3),…,(x n-1,x n ) whose starting vertex is the ending.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
By Dr. C. B. Alphonce (Room305 Mathematics Building) MT 147: DISCRETE MATHEMATICS (3 Units) CORE for B. SC. In COMPUTER SCIENCE.
Chapter 11 Graphs and Trees This handout: Terminology of Graphs Eulerian Cycles.
INSTANT INSANITY PUZZLE By Patrick K. Asaba. INSTANT INSANITY PUZZLE The Instant Insanity puzzle is played with four cubes. Each face of the cube is colored.
Graphs and Euler cycles Let Maths take you Further…
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
The Bridge Obsession Problem By Vamshi Krishna Vedam.
Copyright © Cengage Learning. All rights reserved.
Can you find a way to cross every bridge only once?
GRAPH Learning Outcomes Students should be able to:
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
7.1 Introduction to Graph Theory
1 Starter of the day 23 x 27 = x 47 = x 87 = x 55 = x 58 = ???? 54 x 56 = ???? Can you spot the trick for this group of.
Structures 7 Decision Maths: Graph Theory, Networks and Algorithms.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
Graphs.  Definition A simple graph G= (V, E) consists of vertices, V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements.
Week 11 - Monday.  What did we talk about last time?  Binomial theorem and Pascal's triangle  Conditional probability  Bayes’ theorem.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
September1999 CMSC 203 / 0201 Fall 2002 Week #13 – 18/20/22 November 2002 Prof. Marie desJardins.
Aim: What is an Euler Path and Circuit?
Lecture 10: Graph-Path-Circuit
Associated Matrices of Vertex Edge Graphs Euler Paths and Circuits Block Days April 30, May 1 and May
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
MAT 2720 Discrete Mathematics Section 8.2 Paths and Cycles
The Seven Bridges of Konigsberg (circa 1735) In Konigsberg, Germany, a river ran through the city such that in its centre was an island, and after passing.
Lecture 52 Section 11.2 Wed, Apr 26, 2006
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.2 Euler Paths, and Euler Circuits.
Chapter 6: Graphs 6.1 Euler Circuits
Konisberg Bridges (One-way street) SOL: DM.2 Classwork Quiz/worksheet Homework (day 62) worksheet.
Graph Theory Two Applications D.N. Seppala-Holtzman St. Joseph ’ s College.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 14.1 Graphs, Paths, and Circuits.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
(CSC 102) Lecture 30 Discrete Structures. Graphs.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Week 10 - Wednesday.  What did we talk about last time?  Counting practice  Pigeonhole principle.
Graphs. Representations of graphs : undirected graph An undirected graph G have five vertices and seven edges An adjacency-list representation of G The.
Data Structures Graphs - Terminology
Euler Paths and Circuits
Graph theory Definitions Trees, cycles, directed graphs.
INSTANT INSANITY PUZZLE
Euler Paths and Circuits
This unit is all about Puzzles Games Strategy.
Konigsberg- in days past.
Graph Theory What is a graph?.
Euler and Hamilton Paths
Section 14.1 Graphs, Paths, and Circuits
Graphs, Paths, and Circuits
Chapter 10 Graphs and Trees
The Instant Insanity Puzzle
5 The Mathematics of Getting Around
Presentation transcript:

+ Graph Theory to the Rescue Using graph theory to solve games and problems Dr. Carrie Wright University of Arizona Teacher’s 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 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.

+ Bridges of Konigsberg Problem Can 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)

+ GRAPHS A 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)}

+ Graph Theory definitions Let 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.

+ 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.

+ 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.

+ Bridges of Konigsberg Problem Can 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)

+ More Problems Jeannie, 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?

+ 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:

+ 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.

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 12 34

+ 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 ways Similarly 24 for the 3 rd and 4 th arguments Total Number: 3(24)(24)(24) = 41,472 possibilities

+ 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 sides We 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 cube Do 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 from

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 12 34

+ 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 subgraphs

+ Cubes as Graphs

+ A Solution Here is a possible solution to this puzzle. There is another solution, too.

+ Solution Here is a solution to this particular Instant Insanity game. There is another solution to this same game.

+ Other Instant Insanity Games There 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. GAMECUBE 1CUBE 2CUBE 3CUBE 4 1Y-Y, Y-R, B-GB-Y, B-G, R-RB-G, B-Y, R-RY-B, G-R, G-Y 2G-B, B-R, Y-RY-R, G-Y, B-BR-G R-B, G-YB-Y, B-B, G-Y 3G-R, B-B, R-YG-Y, R-R, B-GG-Y, R-R, G-BR-B, G-G, R-Y