Shai Simonson

CS 202

Discrete Math for Computer Scientists II

Assignment 2


Due:  Right After Spring Break

Pettofrezzo text:  1.1 - 2, 4, 6, 7.    1.2 - 2, 3, 4, 7, 8, 10, 12.    1.3 - 2, 4.
Rosen text:        3.8 - 2a, 4a,c, 5, 10, 18, 20, 21, 23, 24.

My problem:

You are asked to find out how many rectangles there are in an nxn grid of rectangles, and how many squares.  These two problems can be solved with methods from discrete math I, and you did them for homework last semester.  Now let's solve them with linear algebra, assuming the closed form for the answers are polynomials (this assumption happens to work, but we would normally have to justify it somehow).

For each problem:
a.  Using data you gather by hand, find out the answers for n = 1 to 5.
b.  Using finite differences, calculate what degree polynomial r the answer should be.
c.  Using the polynomial Arxr+ Ar-1xr-1+ ... +  A0, and r+1 data points, constuct a set of r+1 equations.
d.  Solve the system of equations, to calculate the two closed form polynomial answers.  Check them against your direct solutions from last semester.

The point of this problem is to show that 2 points determine a line, 3 points determine a parabola, and r points determine an r-1 degree polynomial.  The exact calculations use basic linear algebra to solve a system of r equations.
 

     
     

    back
     


    shai@stonehill.edu

    http://www.stonehill.edu/compsci/shai.htm