Algorithms to Solve Mazes An Application of Graph Theory

Slides:



Advertisements
Similar presentations
Every edge is in a red ellipse (the bags). The bags are connected in a tree. The bags an original vertex is part of are connected.
Advertisements

Graphs COP Graphs  Train Lines Gainesville OcalaDeltona Daytona Melbourne Lakeland Tampa Orlando.
Depth-First Search1 Part-H2 Depth-First Search DB A C E.
Jessica Pearlman, Melissa Ackley, and Kate Stansfield
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
Graphs By JJ Shepherd. Introduction Graphs are simply trees with looser restrictions – You can have cycles Historically hard to deal with in computers.
New Mexico Computer Science For All More Algorithms Maureen Psaila-Dombrowski.
CS 206 Introduction to Computer Science II 11 / 05 / 2008 Instructor: Michael Eckmann.
Robot Maze Solving EGR106 Project Overview Spring 2004.
CISC220 Fall 2009 James Atlas Nov 13: Graphs, Line Intersections.
Design and Analysis of Algorithms Minimum Spanning trees
Graphs Chapter 28 Copyright ©2012 by Pearson Education, Inc. All rights reserved.
MATH 310, FALL 2003 (Combinatorial Problem Solving) Lecture 10, Monday, September 22.
Discrete Math Round, Round, Get Around… I Get Around Mathematics of Getting Around.
COSC 2007 Data Structures II Chapter 14 Graphs III.
Representing and Using Graphs
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
Aim: Graph Theory - Trees Course: Math Literacy Do Now: Aim: What’s a tree?
Fundamental Data Structures and Algorithms (Spring ’05) Recitation Notes: Graphs Slides prepared by Uri Dekel, Based on recitation.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Depth-First Search Lecture 21: Graph Traversals
M Clements Formal Network Theory. Introduction Practical problem – The Seven Bridges of Königsberg Network graphs Nodes & edges Degrees Rules/ axioms.
Prims Algorithm for finding a minimum spanning tree
Tree Diagrams A tree is a connected graph in which every edge is a bridge. There can NEVER be a circuit in a tree diagram!
CHAPTER 13 GRAPH ALGORITHMS ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN C++, GOODRICH, TAMASSIA.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
CSC 213 – Large Scale Programming Lecture 31: Graph Traversals.
CSC 172 DATA STRUCTURES.
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Single-Source Shortest Paths
Minimum Spanning Tree Chapter 13.6.
CSC317 Graph algorithms Why bother?
Discrete Math 2 Weighted Graph Search Tree
Lecture 12 Graph Algorithms
Solving Mazes Troy Mahon.
CC 215 Data Structures Graph Searching
Maze Implementation, Analysis and Design to find Shortest Paths
I206: Lecture 15: Graphs Marti Hearst Spring 2012.
Unweighted Shortest Path Neil Tang 3/11/2010
Algorithms for Exploration
Greedy Method     Greedy Matching     Coin Changing     Minimum Spanning Tree     Fractional Knapsack     Dijkstra's Single-Source Shortest-Path.
CSE 421: Introduction to Algorithms
Graphs A graph G = (V, E) V = set of vertices, E = set of edges
Minimum Spanning Tree Neil Tang 3/25/2010
“Enter Group Name” Tyler Atkinson and Dylan Menchetti
4-4 Graph Theory Trees.
Graphs Part 2 Adjacency Matrix
CSE 373 Data Structures Lecture 16
Subgraphs, Connected Components, Spanning Trees
Minimum Spanning Tree Neil Tang 4/3/2008
Lecture 8: Synchronous Network Algorithms
Algorithms Lecture # 29 Dr. Sohail Aslam.
Algorithms: Design and Analysis
Weighted Graphs & Shortest Paths
Lecture 6 Graph Traversal
Lecture 11 CSE 331 Sep 21, 2017.
Graph Implementation.
EMIS 8374 Search Algorithms Updated 9 February 2004
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Graphs.
Graphs.
Warm Up – Tuesday Find the critical times for each vertex.
Graphs.
Spanning Trees Lecture 20 CS2110 – Spring 2015.
Graphs.
Lecture 11 Graph Algorithms
EMIS 8374 Search Algorithms Updated 12 February 2008
For Friday Read chapter 9, sections 2-3 No homework
More Graphs Lecture 19 CS2110 – Fall 2009.
Presentation transcript:

Algorithms to Solve Mazes An Application of Graph Theory Jonathan Garofalo May 4, 2017 Mount Saint Mary College Coordinating Seminar

Representing a Maze Graphically Vertex at Junction of 3 or More Paths Vertex at Each Dead End Vertex at Start Vertex at End Edges Between Each Vertex as Connecting Paths

Maze Solving Algorithms Wall Follower (Left/Right Hand Rule) Trémaux's Algorithm Dead End Filling Shortest Path Breadth First “Greed”

Wall Follower Follow the Right or Left Wall Works if Simply Connected Entrance/Exit are on the outer boundary Works in 3D if: Maze can be projected to a 2D plane “Up” is “northwest” “Down” is “southeast”

How Does This Work? Side Preference Ability to “Turn Around” Undirected Graph Edge Properties

Trémaux's Algorithm Mark a Path Once When You Follow it Never Enter a Path with Two Marks Junction with No Marks Arbitrarily choose an unmarked path Dead End Turn around and mark the path again Junction with Marks Arbitrarily choose a path with the least marks

Mazes With More Than 1 Exit Wall Following And Trémaux's Algorithm Will Still Work May Not Find the Shortest Path

Shortest Path Breadth First Start at Tree Root Explore Neighbors Moves onto Next Level

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

Original Algorithm

3D Mazes

Weighted Paths Greed is Good Algorithm Find the Pieces Breadth First

Other Applications of the Algorithms Reducing Costs of Networks Delivery routes Shipping routes Game Design and Testing

Works Cited "The Breadth-first Search algorithm." Khan Academy. N.p., n.d. Web. 02 May 2017. <https://www.khanacademy.org/computing/computer-science/algorithms/breadth-first-search/a/the-breadth-first-search- algorithm>. "Graph." Graph -- from Wolfram MathWorld. N.p., n.d. Web. 01 May 2017. <http://mathworld.wolfram.com/Graph.html>. "Solving a Maze." Building Robots with LEGO Mindstorms NXT (2007): 327-48. Stanford.edu. Web. 1 May 2017. <http://web.stanford.edu/~yinoue93/docs/Maze%20Solving.pdf>. "Threading Models." Pro .NET 1.1 Remoting, Reflection, and Threading (n.d.): 519-33. Pro .Net. Web. 2 May 2017. <http://www.cems.uvm.edu/~rsnapp/teaching/cs32/lectures/tremaux.pdf>. Vol. 2, No. 2, July-December 2011, Pp. 445-449. A NEW SHORTEST PATH FINDING ALGORITHM FOR A MAZE SOLVING ROBOT WITH SIMULATOR (n.d.): n. pag. CSJournals. CSJournals. Web. 2 May 2017. <http://csjournals.com/IJCSC/PDF2-2/Article_31.pdf>.

Images http://www.b2b-im.com/wp-content/uploads/2014/12/question-mark-in-maze- shows-confusion_fkWJuMvu.jpg https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Tremaux_Maze_Solv ing_Algorithm.gif/220px-Tremaux_Maze_Solving_Algorithm.gif http://www.cems.uvm.edu/~rsnapp/teaching/cs32/lectures/tremaux.pdf