CS98-1/CS198-1 Assignment #5

Fall, 2003

Due: Thursday, 2 Oct 2003 at noon.

Read the attached three contest problems carefully. After doing so, decide with your partner on which of them you will do; both partners should produce their own versions of each problem. Make an estimate for each of how long it would take you to write a working program to solve them. The constraints on your solution are that you want to write a program quickly that is good enough to produce results for the expected sorts of input in, say, 15-30 seconds.

In conjunction with each problem, develop a set of test data and a set of results. Your partner and you should test each other's program on each other's test data. Please check this page from time to time for further instructions on turning in your test data.

Select at least two of the problems and develop solutions (in Java, C/C++, or Python), keeping track (be honest!) of how long it takes you. Compare these times with your estimates. What took more (or less) time than you expected, and why?

Hand in your solutions electronically. Here's how. Hand in your test data as follows:

Problems

  1. 1991 Berkeley Programming Contest, Prime Numbers (modified).
  2. 1986 Berkeley Programming Contest, Chemical Equations (modified).
  3. 1999 ACM Programming Contest Finals, Problem E (Trade on Verweggistan)

[Course Home Page]

Page was last modified on Sat Sep 27 14:56:32 2003.
Address comments and questions to hilfinger@cs.berkeley.edu