# CS410/510SPS Homework

## Homework 1

In addition to a pointer to the
*Dr. Dobb's Journal* article
containing the data for the problem, you can also get
the data as a
text file.
- [Due 4/15] Search for solutions
to the DDJ problem (handed out last time) using
blind depth-first search of no more than 100,000 (1e5) nodes.
In a comment in the source, describe the search space you are using.
You will turn in the code as well as a sample run, so please
code cleanly. Those experimenting with departmental computers must
follow the ``safety guidelines''.
- [Due 4/19] Is the DDJ problem tractable? Does the
question even make sense? If not, how can this be fixed? I
will give hints and help in class, but try to solve as much
as you can on your own now.

## Homework 2

[Due 5/3] Make the following modifications to your
DDJ code from HW1. In each case search no more than
100,000 (1e5) nodes.
- Modify your code to
use one of the ``intelligent blind search techniques''
discussed in class.
- Modify your code by concocting a
*heuristic* and using it with one of the heuristic
search algorithms discussed in class.

How do the results of these experiments compare? Do
not turn in your code on this: I'd like to see an explanation
of the algorithms and heuristic you used, and a table of
results showing search speed (nodes/sec) and quality of
best solution found for all three implementations.
## Homework 3

[Due 5/17] Implement local search for the DDJ problem.
Perform no more than 100,000 (1e5) exchanges per run.
- Write code which initially assigns tents to campers
in a random fashion consistent with the tent size
constraints, and then repeatedly selects randomly from
among the best pairs of campers to exchange. Restart
every 10,000 (1e4) swaps. Perform 10 runs of 100,000
exchanges (i.e. 10 restarts per run), and record the
best value observed during each run.
- Vary the number of exchanges before restart. What
restart value appears to work the best. (Optional: write
code that will restart when little improvement is observed
over a long period. How does this compare with a good
fixed restart strategy?)
- Alter the code so that on each swap it chooses
randomly between swapping a best pair and swapping a
random pair. What percentage of "noise" swaps gives the
best results? Does adding noise affect the optimal
restart time?

Turn in your code, plus a reasonable experimental writeup
showing the experiments you performed and their outcomes.