11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

532 Chap. 16 P<strong>at</strong>terns of <strong>Algorithm</strong>sThus, the full process for multiplying polynomials A <strong>and</strong> B using the Fouriertransform is as follows.1. Represent an n − 1-degree polynomial as 2n − 1 coefficients:[a 0 , a 1 , ..., a n−1 , 0, ..., 0]2. Perform Fourier Transform on the represent<strong>at</strong>ions for A <strong>and</strong> B3. Pairwise multiply the results to get 2n − 1 values.4. Perform the inverse Fourier Transform to get the 2n − 1 degree polynomialAB.16.4 Further ReadingFor further inform<strong>at</strong>ion on Skip Lists, see “Skip Lists: A Probabilistic Altern<strong>at</strong>iveto Balanced Trees” by William Pugh [Pug90].16.5 Exercises16.1 Solve Towers of Hanoi using a dynamic programming algorithm.16.2 There are six possible permut<strong>at</strong>ions of the linesfor (int k=0; k

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!