Define worst-case order-of-magnitude expression

Assignment Help Mathematics
Reference no: EM131636750

Question: Our existing binary search algorithm (Chapter 3, Example 13) contains the pseudocode instruction find the index k midway between i and j after which the target x is compared to the list item at index k, the "midpoint item." Suppose that this instruction is replaced by

if i = j then

   k = j

else

   k = i + 1

end if

a. Draw the decision tree that results from using the modified algorithm on a sorted list with n = 8.

b. Give the exact number of comparisons required in the worst case for n = 8.

c. Give a worst-case order-of-magnitude expression for the number of comparisons required as a function of n, and justify your expression. Comment on the use of this algorithm as opposed to the original binary search algorithm, which is Θ(log n).

Reference no: EM131636750

Questions Cloud

Draw the associated directed graph : Let r be a binary relation defined on the set 50, ±1, ±2, ±4, ±166 by p y ? y = x2 . Draw the associated directed graph.
Why does the president have limited control : Why does the president have limited control over the Federal Reserve when compared to executive de-partments like the Department of Treasury?
The intention of the framers of our constitution : What are the dangers and inefficiencies when party unity and partisanship cause Congress to become deadlocked and unable to agree upon action?
Whatever medium of advertisement you choose to examine : In a writing of one thousand-thirteen hundred words, perform that analysis. Whatever medium of advertisement you choose to examine
Define worst-case order-of-magnitude expression : Give a worst-case order-of-magnitude expression for the number of comparisons required as a function of n, and justify your expression.
Game changer for marketing research : Banks say they are cautious about adopting gamification techniques because of concerns about keeping the collected data secure.
Discuss promote appropriate classroom behavior : How do you create learning environment that enhances academic achievement and promote appropriate classroom behavior
Find the huffman codes for given integers and occurences : The integers could represent the results of the "quantization" step in a JPEG image compression, and the number of occurrences of each in the image.
Analyse the capital structure and important financial ratio : FNRE315 Financial Reporting Assessment. Analyse the capital structure, and important financial ratios. Describe in details of the company's financing sources

Reviews

Write a Review

Mathematics Questions & Answers

  Try out different constraints and initial guesses

Experiment with the Example function in the Lesson Commentary using the Solver. Try out different constraints and initial guesses, modify the settings, and so on.

  Normalize the vectors to produce an orthonormal set

Determine which sets of vectors are orthonormal.

  Find variance of the sum of n independent random variables

What is the variance of the number of successes when n independent Bernoulli trials, each with probability p of success, are carried out?

  Discuss the law of total expectation

Use the law of total expectation to find the average weight of a breeding elephant seal, given that 12% of the breeding elephant seals are male and the rest.

  How many total pies did the bakers bake

Back at the bakery, there has been a disaster. A contingent of crazy criminal clowns arrived and stole a bunch of the pies, taking some with them to eat.

  Product and quotient rules differentiate

The product and quotient rules Differentiate

  Have you ever had the experience when your mood changed

1. the way we feel emotionally and the way we feel physically are increasingly seen as single parts of a whole.nbsp

  Yield an annual effective rate

A 1000 par value 20-year bond with annual coupons is redeemable at maturity for 1050. The bond is purchased for P to yield an annual effective rate of 8.25%. • The first coupon is 75. • Each subsequent coupon is 3% greater than the preceding coupo..

  Explain the concept of a strong correlation begin

If +.75 represents a "strong" positive correlation, where does the concept of a "strong" correlation begin?

  What is the speed of a plane traveling

what is the speed of a plane traveling 490 mph with the wind and 390 mph against the wind.

  How fast is the distance between the cyclists decreasing

How fast is the distance between the cyclists decreasing at the moment when cyclist A is 4 miles from the intersection, and cyclist B is 3 miles from the intersection?

  Find the slope and an equation of the tangent line

Find the slope and an equation of the tangent line to the graph of the function f at the specified point.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd