CS 460, Spring, 2010

Lab 4: Greedy Graph Algorithms

 

Introduction

The purpose of this lab is to investigate applications of the greedy method for algorithm design for spanning tree problems. You will do one of a pair of problems; you may do the other as a bonus.

 

In addition to developing an algorithm for each problem, you will need to prove that the algorithm solves the problem and give a complexity analysis in terms of the problem size.

Algorithm

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.

Test Cases

You should provide test cases to demonstrate how your algorithms work. The test case for each algorithm should be small, but without making the application of the algorithm trivial. 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.

 

Problems

The problems for this lab are taken from the exercises for chapter 4 in K&T.

 

1. Problem 19

2. Problem 20