CSC 343
Homework 1

Assigned Aug 28, due Sept 23

Some of these problems can be done in varying levels of detail. The more work you do, and the more aspects of the problem you explore, the more impressed I'll be and the more credit you'll get.

In order to save time, I won't grade every single problem; the rest should be considered as "for practice".

There are 17 problems and a program to do. You have 26 days, so try to do at least one problem a day; that way even if you get delayed, you have some safety cushion.

Problems from the CLRS textbook
Problems from the Shaffer textbook
Problems from other textbooks:
Programming:

Write a program in your favorite programming language -- C, C++, Java, Pascal, perl, Prolog, Python, Ruby, Scheme, etc. -- to manipulate polynomials. A polynomial is (usually) represented as a list of coefficients: for example, the list 3, -4, 2 could represent the polynomial

3x2 -4x + 2

You need to write the following functions/methods:

For each function/method, be sure to provide well-chosen test cases with correct answers (preferably written before you write the function/method itself), so it's easy to test the program.

I'm not really interested in your ability to write I/O and driver code, so I recommend doing this problem in a system that allows you to call functions directly and interactively, such as BlueJ, DrJava, SWI-Prolog, or DrRacket.


Last modified: Mon Sep 3 21:05:39 EDT 2012
Stephen Bloch / sbloch@adelphi.edu