Docsity

CS 332: Algorithms Homework #3 - Prof. David Luebke, Assignments of Computer Science

Toggle sidebar
bg1
CS 332: Algorithms
Homework #3
Assigned: Thursday, October 5
Due: Thursday, October 12 at 5 PM (not midnight as previously)
Please turn in the assignments to Ginny or Brenda at the Computer Science front desk.
A clarification on the late policy: assignments 1 day late (i.e., turned in by 5 PM Friday)
automatically lose 1 point (out of a possible 10). Assignments 2 days late (i.e., turned in
by 5 PM Saturday) lose 3 points. To turn in a late assignment, hand it to me or shove it
under my office door.
1. Exercise 10.3-1. You must prove your answer for the 7-element case, but you can
argue it informally in the 3-element case (since a rigorous proof is a bit difficult).
2. Problem 10-1.
3. Exercise 9.1-3. Hint: Consider the height of the decision tree, and use the same
argument as the proof of theorem 9.1.
4. In a binary search tree, an inorder tree walk can print the nodes in sorted order
WDNLQJ QWLPH$UJXHLQIRUPDOO\WKDWWKHKHDSSURSHUW\LVQRWVWURQJHQRXJKWR
SULQWWKHQRGHVLQVRUWHGRUGHULQ QWLPH
5. Problem 13-2.
6. [For 1 point extra credit] Exercise 9.1-4.

Partial preview of the text

Download CS 332: Algorithms Homework #3 - Prof. David Luebke and more Assignments Computer Science in PDF only on Docsity!

CS 332: Algorithms Homework #

Assigned: Thursday, October 5

Due: Thursday, October 12 at 5 PM (not midnight as previously)

Please turn in the assignments to Ginny or Brenda at the Computer Science front desk.

A clarification on the late policy: assignments 1 day late (i.e., turned in by 5 PM Friday) automatically lose 1 point (out of a possible 10). Assignments 2 days late (i.e., turned in by 5 PM Saturday) lose 3 points. To turn in a late assignment, hand it to me or shove it under my office door.

  1. Exercise 10.3-1. You must prove your answer for the 7-element case, but you can argue it informally in the 3-element case (since a rigorous proof is a bit difficult).
  2. Problem 10-1.
  3. Exercise 9.1-3. Hint: Consider the height of the decision tree, and use the same argument as the proof of theorem 9.1.
  4. In a binary search tree, an inorder tree walk can print the nodes in sorted order WDNLQJ Q WLPH$UJXHLQIRUPDOO\WKDWWKHKHDSSURSHUW\LVQRWVWURQJHQRXJKWR SULQWWKHQRGHVLQVRUWHGRUGHULQ Q WLPH
  5. Problem 13-2.
  6. [For 1 point extra credit] Exercise 9.1-4.