CS 206: Data Structures
Assignment#8
Due in class by 10:10a on Tuesday, May 2
NO LATE SUBMISSIONS ALLOWED
Carefully study the files puzzle.py, Graph.py, and Node.py
Together they implement the Graph data type and two blind searches Breadth-first and Depth-First (file: Graph.py). The class Node (file: Node.py) implements a graph search node that is used by the search algorithms. The file: puzzle.py contains a program that inputs a data file of the entire map of the USA (states and their neighbors) and constructs a graph (using the Graph class provided in Graph.py). The data file can be downloaded from here: Map.data. puzzle.py also shows how to use the search algorithms: Given a start state and a destination state, the algorithms will output a path, if it exists.
The search algorithm also uses the Stack class (file: Stack.py) and the Queue class (file:myQueue.py): Both of which have the functions insert and remove defined for adding and removing items from the structure).
Do:
What to Hand-in: