   Chapter 11.5, Problem 11ES ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

#### Solutions

Chapter
Section ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193
Textbook Problem
1 views

# Exercises 8—11 refer to the following algorithm segment. For each positive integer n, let a n be the number of iterations of the while loop. while   ( n > 0 ) n : = n   d i v   2 end while 11. Find an order for this algorithm segment.

To determine

Find an order for this algorithm segment.

Explanation

Given information:

For each positive integer n, let an be the number of iterations of the while loop. while ( n > 0)

n := n div 2

end whileCalculation:

an= number of iterations of the while-loop

Result previous exercise:

an=1+log2n for all integers n1

The number of iterations of the algorithm is the number of iterations of the while-loop as the algorithm only contains the while-loop

### Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

#### The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started 