See the assignment turn-in page (last modified on 16 July 2003) for instructions on turning in your assignment.
A single node is a node that is not paired. The graph itself is said to be paired when it does not contain two single nodes directly connected by an edge (that is, the graph does not contain any single nodes that could be paired).
/export/home/class/cs-598/a10/NodeRunnable.java
is an initial attempt at writing code that
takes an unpaired graph and turns it into a paired graph. Your job is to
finish writing the code.
The following files and code are also of interest, although they are part of the problem and not part of the solution:
/export/home/class/cs-598/a10/NodePairing.java
- The test harness. It creates a random graph,
invokes your Node Runnables in threads to pair the graph, and checks
the answer for correctness. Note that run()
doesn't check the
answer until all node thread have exited.
/export/home/class/cs-598/a10/Graph.java
- A random-problem generator and checker.
Because NodePairing.java
and Graph.java
are part of the problem and
not part of the solution, they should not be turned in along with your
solution. You may change these files to help you implement and test your
solution, but your solution should not depend on the changes you make because
you have no way to turn-in those changes along with your solution.
As long as you don't change what already exists, you may change
NodeRunnable.java
as you see fit; you may implement whatever classes and
files you feel are appropriate to pairing graphs.
This page last modified on 22 July 2003.