Nick’s Weblog

Application Development Environments

Hamiltonian Cycles Program

In my Developing and Deploying Large systems subject we wrote a program in Java to take in a graph (a mathematical one, not the statistics one) and produce a set of all its Hamiltonian Cycles.

A Hamiltonian cycle is a path from a node to itself, passing through each node in the graph exactly once. This program makes use of worklist processing in order to produce all the Hamiltonian Cycles of a graph.

Additional rules from a standard worklist process are:
- Do not propagate paths longer than number of nodes.
- Do not add path to solution if will introduce cycle of length less than number of nodes.

Here is a link to the program source (couldn’t upload the file itself due to security restrictions…).

November 30, 2008 - Posted by nwebb215 | Own Choice Blog | | No Comments Yet

No comments yet.

Leave a comment