The purpose of this lab is to investigate the use of graph theory to solve problems for different applications. You will develop and analyze algorithms for three problems.
One type of solution may be determining an appropriate mapping of the problem to a graph or digraph representation, followed by the application of a standard algorithm. If you develop this type of solution, be sure to precisely describe the mapping and describe how the time-complexity analysis of the algorithm applies in terms of the original problem statement.
A second solution will be finding a mapping of the problem to a graph or digraph description, followed by the development of an algorithm for this particular problem. In this case the algorithms may be expressed in written form or you may code the algorithms in a programming language of your choice. You will then do an analysis of the time-complexity of the problem in terms of an appropriate measure of the problem size.
Your description of the algorithm must be completely precise and should include a description of the data representation used, so that operations accessing the data can be included in the analysis. A precise English description, precise pseudo-code, or a complete program in a language of your choice is acceptable.
You should provide test cases to demonstrate how your algorithm works. One of these test cases should be small, but without making the application of the algorithm trivial. For this test case, you should show how the step-by-step application of your algorithm works. You might want to do two such test cases to show differing outcomes of the algorithm when appropriate.
Another test case should be a more realistic size. For this test case, you provide the data, show the corresponding graph representation and indicate the solution obtained.
The problems for this lab are taken from the exercises for chapter 3 in K&T.
A. Exercise 4.
B. Exercise 9.
C. Either exercise 11 or exercise 12. (I have no idea of which might be easier – CN)