SUNY Geneseo Department of Computer Science
CSci 242, Spring 2013
Prof. Doug Baldwin
Due Wednesday, March 27Solve each of the following problems.
The State University of New West Dakota has begun a tuition policy whereby students pay separately for each course they take. Generally, different courses have different prices, and carry different amounts of credit. The ith course in the catalog has price pi, and is worth ci credits. There are a total of K courses in the catalog. Stacey Student has an amount M of money to spend on her education this semester. Give a dynamic programming algorithm she could use to calculate the maximum number of credits she can get for this amount of money. Assume that M is an integer and that all courses cost an integer amount of money; Stacey picks courses without regard to their subject area or how many courses she is taking.
Problem 15-2 in our textbook.
Problem 15-10, part C, in our textbook. You may assume that in each year you place all your money in a single investment fund (i.e., you may assume the result of part A without actually proving it).
For up to 3 points extra credit, code one or more of your algorithms in an actual programming language and demonstrate them working.
I will grade this exercise in a face-to-face meeting with you. Please bring a written solution to your meeting. During the meeting, I will look over your solution, give you my reactions to it, answer any questions you have about it, etc.
Schedule your meeting to last 15 minutes. Please sign up for your meeting on the schedule outside my office or via Google calendar. If you work in a group, the entire group can schedule a single meeting with me. Be sure your meeting ends by the end of the day on the due date above.