Homework # 5 Polynomial Multiplication Solution

$30.00

Description

In this homework, you will contrast di erent methods of multiplying two polynomials with

  • coe cients where n = 2k.

    1. Write a program that uses the classical iterative method for multiplying two polyno-mials.

    1. Write a program that uses the divide and conquer algorithm (which reduces the problem to three half{size multiplications) for multiplying polynomials.

    1. Write a program that uses the Fast Fourier Transform technique for multiplying poly-nomials.

    1. Compute to order the run{times for the these methods. (You can cite the book or notes for this). Which one do you expect to be the fastest for large degree polynomials?

    1. Choose several pairs of polynomials, P and Q, for various reasonable values of n (poly-

nomial degree = 2k 1) and compute the products P Q of the polynomials using your programs. Show that your programs all give the same results, or explain why your programs give di ering results.

  1. Plot the running times of your programs as a function of the number of coe cients. (Pick a reasonable plotting format to help display the di erences between the methods.)

  1. Which program runs faster for a small number of coe cients? Use your runtime plots to predict when the other programs might become faster (i.e. the crossover points).


error: Content is protected !!