×
Get Full Access to Discrete Mathematics And Its Applications - 7 Edition - Chapter 4.2 - Problem 57e
Get Full Access to Discrete Mathematics And Its Applications - 7 Edition - Chapter 4.2 - Problem 57e

×

# Estimate the complexity of Algorithm 1 for finding the ISBN: 9780073383095 37

## Solution for problem 57E Chapter 4.2

Discrete Mathematics and Its Applications | 7th Edition

• Textbook Solutions
• 2901 Step-by-step solutions solved by professors and subject experts
• Get 24/7 help from StudySoup virtual teaching assistants Discrete Mathematics and Its Applications | 7th Edition

4 5 1 386 Reviews
29
3
Problem 57E

Estimate the complexity of Algorithm 1 for finding the base b expansion of an integer n in terms of the number of divisions used.

Step-by-Step Solution:

Solution In this question we have to estimate the complexity of Algorithm 1 for finding the base b expansion of an integer n in terms of the number of divisions used.Step 1 Complexity of algorithm : Amount of time/space required by an algorithm for an input of a given size.We know that , Algorithm 1 (Constructing Base b Expansions)procedure base b expansion(n,b:positive integers with b>1)k:=nj:=0while kj:= j+1returnThus the number of divisions equals the number of digits in the base b expansion of n, this is just like the example divisions are required.Therefore the complexity of this is

Step 2 of 1

##### ISBN: 9780073383095

Unlock Textbook Solution