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

  What will be the long run per capita income in the economy

Application exercise. Suppose that a piece of land gives a perpetual cash flow of $1 000 every year and that the discount rate is 6 percent.

  Explain detailed explanation to separation of variables

The problem that I'm having is that there is a nonconstant factor of (x^2+y^2+z^2)^(-1/2) appearing on the RHS of this equation, making it non-trivial to solve.

  Calculate the total sales impact for period 5

If the sales effect for period 5 is $125 million and the carryover effect is 0.25, calculate the total sales impact for period 5.

  Write a matrix equation that determines the loop currents

write a matrix equation that determines the loop currents. [M] If MATLAB or another matrix program is available, solve the system for the loop currents.

  Determining geometric structures

Using the polynomial f(x) = x4 - x3 -x2 - x - 2 , we can also view f as an element of Z[x] , let F be an algebraically closed field containing Z3, how many distinct zeros does f have in F?

  How should the string be cut so the sum of the areas

A 42 inch piece of string is cut into two pieces. One piece is used to form a circle and the other to form a square. The two peices of string are not equal in length. How should the string be cut so the sum of the areas is a minimum?

  Estimate future costs to complete the project

BE18-7 Turner, Inc. began work on a $7,000,000 contract in 2014 to construct an office building. During 2014, Turner, Inc. incurred costs of $1,700,000.

  Maximal and minimal by derivatives

A homeowner wants to enclose a 5,800 square feet rectangular garden by a fence in his backyard. If three sides of the fence cost $6.25 per foot and 4th side costs $10.25 per foot,

  Predictable storm of news activity

Apple Computer's announcement introducing the iPhone 3G created a predictable storm of news activity and reaction. What PR activities did Apple itself undertake as part of the launch? Review some of the news media coverage of the Apple announcemen..

  The minimum value of the sum of real numbers

1. The minimum value of the sum of real numbers a-5 , a-4 , 3a-3 ,1 , a8 , a10 with a > 0 is .............

  Encrypt the message lemon drops using a caesar cipher

Decrypt the message bdpja lxxtrnb, which was encrypted using a shift of 9.

  There are no single cell referenced formulas

The NOW function can be used to display the current date, time, or a combination of the two in several different formats.

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