**Unformatted text preview: **COP3530C.01, Spring 2001 Assigned: Jan. 11, 2001 S. Lang Assignment #1 Due: Jan. 23 in class, within 10 minute of the lecture at 11:30 am 1. Exercise 2.2 of the Text, do all parts and provide explanations as precisely as possible. That is, give a proof for each “yes” answer, give a counter example for each “no” answer. 2. Exercise 2.14 of the Text (Horner’s rule for polynomial evaluation). 3. Consider an array implementation of polynomials (of a single variable x ) with integer coefficients, in which only the non-zero terms are stored in the array. Specifically, if the non-zero terms of a polynomial are written in decreasing order of the exponents, , ... 1 1 1 1-- + + + n m n m m x a x a x a where each coefficient a i ≠ 0, and m > m 1 > … > m n –1 , use an array of size 2 n to store the (coefficient, exponent) pairs. (For example, the polynomial, 5 x 11 + 3 x 6 –10 x 3 + 6, is stored in an array A [0..7] = {5, 11, 3, 6, –10, 3, 6, 0}.) Suppose the input contains such an array...

View
Full
Document