i.
To identify: The rule for the number of items remaining after the nth pass through an ordered list of 1024 items.
A binary search technique used on a computer involves jumping to the middle of an ordered list of data (such as an alphabetical list of names) and deciding whether the item being searched for is there. If not, the computer decides whether the item comes before or after the middle. Half of the list is ignored on the next pass, and the computer jumps to the middle of the remaining list. This is repeated until the item is found.
The required rule is
Given information:
The given terms are
Explanation:
Consider the given sequence.
It is given that
The general formula for a geometric sequence is
After the 1st pass item will be left to be searched
After the
But
After the
But
As you can see after the nth path,
ii.
To calculate: In the worst case, the item to be found is the only one left in the list after n passes through the list. What is the worst-case value of n for a binary search of a list with 1024 items? Explain
The total number games played
Explanation:
Consider the given sequence.
It is that from above calculation
In the worst case, the item to be found is the only one left in the list after
That the worst case value of
Chapter 7 Solutions
Holt Mcdougal Larson Algebra 2: Student Edition 2012
- Algebra and Trigonometry (6th Edition)AlgebraISBN:9780134463216Author:Robert F. BlitzerPublisher:PEARSONContemporary Abstract AlgebraAlgebraISBN:9781305657960Author:Joseph GallianPublisher:Cengage LearningLinear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
- Algebra And Trigonometry (11th Edition)AlgebraISBN:9780135163078Author:Michael SullivanPublisher:PEARSONIntroduction to Linear Algebra, Fifth EditionAlgebraISBN:9780980232776Author:Gilbert StrangPublisher:Wellesley-Cambridge PressCollege Algebra (Collegiate Math)AlgebraISBN:9780077836344Author:Julie Miller, Donna GerkenPublisher:McGraw-Hill Education