
CMSC 451: Summer 2005
Homework 1
Due Friday 07/22/05 (beginning of class)
Homework Instructions
1. These problems require thought. Start early.
2. Many problems require you to do three things: understand the high-level english description
of the problem and rephrase it as a clean and precise algorithmic problem, design an algorithm
to solve the problem, and prove that the algorithm is correct and runs efficiently. Full points
will be given only for complete solutions which have all the required components.
3. Unless you are told otherwise, you can assume (and are not required to prove) any proposition
which is stated in the book: for e.g, you can assume BFS and DFS run in time O(m + n) –
these are propositions 3.11 and 3.13 respectively.
4. Present your algorithms in the ‘pseudocode style’ as used in the book. Do not use C/C++/Java
style code.
5. Proofs can be in ‘English’ (without too much mathematical notation), but they must be
precise: you can follow the clear and easy style used in the book.
6. If you can not solve the problem completely, put down all your ideas in a clear and simple
manner. You could receive partial credit.
7. Problems 1 and 3 require material from Section 6 of Chapter 3, which will be covered in class
soon.
Solve the following exercises from Chapter 3
•Exercise 1 (5 points)
•Exercise 3 (15 points)
•Exercise 5 (10 points)
•Exercise 7 (15 points)
•Exercise 9 (15 points)
•Exercise 10 (20 points)
•Exercise 11 (20 points)
1