This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 222 Solutions to Exercises Exercises 8.2 1. [BB] Let addition be the basic operation. We need n subtractions, n squarings (each equivalent to two basic operations), n  1 additions, and one square root (the equivalent of 20 basic operations). Hence, f(n) = n + 2n + n 1 + 20 = 4n + 19. 2. The multiplication of a = (anIan2 ... alao)lO by the single digit b requires initially the multiplica tion of band ao, one operation. Then we multiply b and al and perhaps add a carry from the first step. Since two singledigit additions may be needed in this carry (e.g. 89 x 7), at most three operations are required in the multiplication of band al and, similarly, in the multiplication of b and each ai, i ;:::: 1. An upper bound for the total number of operations required is 1 + 3(n  1) = 3n  2. 3. [BB] Consider the division of a number a, which has at most two digits, by a singledigit number b, where a < lOb. Since the quotient q has just one digit, the division counts as one operation, the product...
View Full
Document
 Summer '10
 any
 Graph Theory, Addition, Subtraction

Click to edit the document details