 |
CS 216 - Data Structures
Homework #1 |
Due: Thursday 9/11 at the beginning of class
NOTE: This work is to be done in groups formed in class by Thursday 9/4.
0. Choose a puzzle from the given selection.
1. Program and document the representation
of a puzzle "state".
2. Write a well-documented program that answers the
following questions.
- What is the solution? The solution should be computed and shown
in some form, e.g. a sequence of states leading from the initial state to
the goal state, a sequence of actions, or a visualization of the solution
path.
- Is there a cycle of length >= 3 in the state space? That
is, is there are sequence of distinct states A B C ... A that form a loop}
- Are all states reachable? That is, are there states that are
representable, but cannot be reached from the initial state? In the
buckets problem, a state where each bucket contains 2 units of liquid is
unreachable from the initial state. Only 2/3 of buckets problem states
are reachable. Half of
15 puzzle states
are unreachable.
3. In your README file, explain your choice of data structure(s) and
algorithm(s). Which came first? Describe your design process,
including what you decided not to do and why.