PROGRAMMING

PROJECT 4

CS510

due Wednesdy, May 13, 1998
Your program must be in my office by 5 pm on this day to receive full credit.


Write a program that implements the backtracking algorithm to construct all paths in a graph. You will need to determine the values possible in the set Sk and an appropriate data structure to use. The input for the program should be a graph and a starting vertex. The program should output the search tree enumerating all simple paths from the given vertex.

Run your program on the graph given on page 119 of the book and the graph given in the following example:

			a	  b
			o ------- o
			|	  |
	G:		|	  |
			o ------- o -------- o
			c	  d	     e
yields the following path generation from the node a:
		
			a
		       / \
		      b   c
		     /     \
		    d       d
	           / \     / \
	          e   c	  b   e

Print out (or email) a text copy of your code and the output. If you are using Code Warrior you may need to write your output to a file so you can send the entire run to me. I don't know any other way to print the output from Code Warrior.

Remember the Programming and Documentation Style requirements!