|
CSE Home | About Us | Search | Contact Info |
[10 points] Prof. Flashbulb proposed the following greedy algorithm for solving the all-interval scheduling problem (aka interval coloring, section 4.1): apply the greedy algorithm for interval scheduling from the earlier part of section 4.1; give all of those intervals one color, remove them from consideration, and recursively apply the same method to the resulting reduced set of intervals. Does this method does give an optimal solution to the problem? Either prove it or give a simple counterexample and explain why your counter example is a counter example.
[10 points] A quick look at the algorithm on page 124 for the all-intervals scheduling problem suggests an O(n2) time bound: an outer loop for j = 1, ..., n, and an implicit inner loop "for each interval Ii" that also seems to need order n time.
[10 points] Chapter 4, Page 190, Problem 5.
[10 points] Chapter 4, Page 191, Problem 6.
[10 points] Chapter 4, Page 194, Problem 13.
[10 points] Chapter 4, Page 198, Problem 19.
[10 points]
[10 points] Suppose you break a file into 8 bit characters and find that all 256 combinations are present, with the most frequent occuring less that twice as often as the least frequent. Prove that the Huffman code for this data will not result in a shorter file.
Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX |