pyGraphADT Sample code
======================
by Danver Braganza
February 2010

These samples exist to give you an example of how to use pyGraphADT to complete assignments.

These samples are based on CS220 Assignment 3 in 2009 (see attached pdf)

Task 1. A Paths Optimisation problem for Weighted Trees
-------------------------------------------------------

The solution program for this assignment is maxpath.py 
The input file available is maxpathE.in
The output file expected is maxpathE.out

You can run it with:
$ python maxpath.py < maxpathE.in > maxpathTest.out

This will run the program, and pipe the data in the input file to it.  All the output will 
be collected in maxpathTest.out.

You may time a run of this algorithm using "time" in Linux.
$ time python maxpath.py < maxpathE.in

real   0m9.321s
user   0m9.193s
sys    0m0.128

You may check the output you get and the output expected using 'diff'
$ diff maxpathTest.out maxpathE.out
$



Task 1. A Paths Optimisation problem for Weighted Trees
-------------------------------------------------------

The solution program for this assignment is maxpath.py 
The input file available is maxpathE.in
The output file expected is maxpathE.out

You can run it with:
$ python maxpath.py < maxpathE.in > maxpathTest.out

This will run the program, and pipe the data in the input file to it.  All the output will 
be collected in maxpathTest.out.

You may time a run of this algorithm using "time" in Linux.
$ time python maxpath.py < maxpathE.in

real   0m9.321s
user   0m9.193s
sys    0m0.128

You may check the output you get and the output expected using 'diff'
$ diff maxpathTest.out maxpathE.out
$

Task 2. Snakes in a Graph
-------------------------------------------------------

The solution program for this assignment is snake.py 
The input file available is snakeH.in
The output expected is snakeH.out

You can run it with:
$ python snake.py < snakeH.in > snakeTest.out

This will run the program, and pipe the data in the input file to it.  All the output will 
be collected in maxpathTest.out.

You may check the output you get and the output expected using 'diff'
$ diff snakeTest.out snakeH.out
$

