This code was written as an answer to a StackOverflow question:

The problem was interesting enough to be worth actually writing some code for.

To use it, run the script in the src directory. Its help message should be enough to get going. Hint: from the root directory of the project, run:

for f in data/ROADS.IN*; do echo "$f $(cat data/ROADS.OU${f#data/ROADS.IN})"; python src/ -c $f; done