Discrete Mathematics with Graph Theory (3rd Edition) 229

Discrete Mathematics with Graph Theory (3rd Edition) 229 -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Section 8.2 227 also involves the multiplication of a number with perhaps n + 2 digits by 2, requires at most 3n + [3(n + 2) - 2] = 6n + 4 operations. The next step requires at most 6n + 7 operations, and so on. Assuming k steps, the number of multiplications and divisions by 2 is at most (6n - 2) + (6n + 1) + (6n + 4) + (6n + 7) + ... + (6n + 3k - 5) = k(6n) + [-2 + 1 + 4 + ... + (3k - 5)] = k(6n) + ~[2( -2) + (k - 1)3] = 6kn + ~(3k - 7) = ~k2 - ~k + 6kn ~ ~k2 + 6kn, using the fact that the sum of the first k terms of the arithmetic sequence a, a + d, a + 2d, ... is ~[2a + (k - l)d]-see (7) on p. 234. By part (a), k < 1 + nlog21O, so the number of multiplications and divisions by 2 is at most (c) We must add at most k integers, each with at most n + k digits. Using Problem 16, we see that this requires at most k[2(n + k) + k] ~ (1 + nlog21O)((2n + 3 + 3nlog2 1O) = 0(n 2 ) basic operations. (d) We use the result of Exercise 9. Since the number of operations required by each of the two stages
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/08/2010 for the course MATH discrete m taught by Professor Any during the Summer '10 term at FSU.

Ask a homework question - tutors are online