Use an argument similar to that given in Section 7.9 to prove that log n is a
Question:
Use an argument similar to that given in Section 7.9 to prove that log n is a worst-case lower bound for the problem of searching for a given value in a sorted array containing n elements.
Transcribed Image Text:
7.9 Lower Bounds for Sorting This book contains many analyses for algorithms. These analyses generally define the upper and lower bounds for algorithms in their worst and average cases. For most of the algorithms presented so far, analysis is easy. This section considers a more difficult task an analysis for the cost of a problem as opposed to an algorithm. The upper bound for a problem can be defined as the asymptotic cost of the fastest known algorithm. The lower bound defines the best possible efficiency for any algorithm that solves the problem, including algorithms not yet invented. Once the upper and lower bounds for the problem meet, we know that no future algorithm can possibly be (asymptotically) more efficient. A simple estimate for a problem's lower bound can be obtained by measuring the size of the input that must be read and the output that must be written. Certainly no algorithm can be more efficient than the problem's I/O time. From this we see that the sorting problem cannot be solved by any algorithm in less than 2(n) time because it takes at least n steps to read and write the n values to be sorted. Based on our current knowledge of sorting algorithms and the size of the input, we know that the problem of sorting is bounded by f(n) and O(n log n).
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (1 review)
Consider the problem of searching for a given value in a sorted array In the worst case the value ma...View the full answer
Answered By
GERALD KAMAU
non-plagiarism work, timely work and A++ work
4.40+
6+ Reviews
11+ Question Solved
Related Book For
Practical Introduction To Data Structures And Algorithm Analysis Java Edition
ISBN: 9780136609117
1st Edition
Authors: Clifford A. Shaffer
Question Posted:
Students also viewed these Computer science questions
-
Prove that the first test in Theorem 11.3.4 does indeed have level 0. Hint: Use an argument similar to that used to prove part (ii) of Theorem 9.5.1.
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
In Corollary 10.2 we were concerned with finding the appropriate "big-Oh" form for a function f: Z+ R+ U {0} where f(1) ¤ c, for c Z+ f(n) ¤ af (n / b) + c, for a, b Z+ with b ¥ 2,...
-
Refer to the table for Moola at the bottom of this page to answer the following questions. What is the equilibrium interest rate in Moola? What is the level of investment at the equilibrium interest...
-
A mass m is attached to the end of a spring with spring constant k on a frictionless horizontal surface. The mass moves in circular motion of radius R and period T. Due to the centrifugal force, the...
-
Independent of your responses to prior questions, assume that you direct tested customer balances greater than tolerable misstatement and randomly selected a sample of 40 additional customer balances...
-
Describe how you can motivate yourself and others.(p. 93)
-
Statement of retained earnings Hayes Enterprises began 2015 with a retained earnings balance of $928,000. During 2015, the firm earned $377,000 after taxes. From this amount, preferred stockholders...
-
Future Value.Sandra wants to deposit $100 each year for her son. If she places it in an investment account that averages a 33% annual return, what amount will be in the account in 18 years? How much...
-
One possible improvement for Bubble Sort would be to add a flag variable and a test that determines if an exchange was made during the current iteration. If no exchange was made, then the list is...
-
Counting sort (assuming the input key values are integers in the range 0 to m - 1) works by counting the number of records with each key value in the first pass, and then uses this information to...
-
Distinguish between absolute and relative difference. Give an example that illustrates how we calculate a relative difference.
-
Systems thinking is all about solving problemsin organizations, world situations, and even our personal lives. But it is not just a procedure; it is a different way of approaching problems. Our...
-
How would I display the following 3 principles in an entertaining infographic? Be very specific . Principle 1: Employee Engagement and Motivation Drawing from the Human Relations Movement theory and...
-
Shown below is a cross section of tubular member which is subjected to a torque T= 5.5 kN-m. It has a length L-3.0-m and the material shear modulus G=27 GPa. Dimensions: b=150 mm, h= 100 mm and t= 8...
-
The hip roof shown in the below Figure 2 is constructed of 2x10 rafters spaced 16 inches on center. The hip rafters are 1 -inch-wide by 12-inch-high GLBs. The roof has a slope of 4:12. Prepare a list...
-
2. Estimate the populations of Fargo, ND and Bismarck, ND in years of 2040 and 2050. Select a single value of population that you would use for design purposes in each year. You need to specify and...
-
Calculate the exergy destruction for each process of Stirling cycle of Prob. 9-74, in kJ/kg.
-
Revol Industries manufactures plastic bottles for the food industry. On average, Revol pays $76 per ton for its plastics. Revol's waste-disposal company has increased its waste-disposal charge to $57...
-
Implement the containKey(k) method, as described in Exercise R-10.3, for the SortedTableClass.
-
Consider lines 3133 of Code Fragment 10.8 in our implementation of the class ChainHashMap. We use the difference in the size of a secondary bucket before and after a call to bucket.remove(k) to...
-
Modify the Pair class from Code Fragment 2.17 on page 92 so that it provides a natural definition for both the equals( ) and hashCode( ) methods.
-
The payroll register of Ruggerio Co. indicates $13,800 of social security withheld and $3,450 of Medicare tax withheld on total salaries of $230,000 for the period. Federal withholding for the period...
-
All of the following are included on Form 1040, page 1, EXCEPT: The determination of filing status. The Presidential Election Campaign check box. The income section. The paid preparer signature line.
-
Question One: (25 marks) (X) Inc. purchased 80% of the outstanding voting shares of (Y) for $360,000 on July 1, 2017. On that date, (Y) had common shares and retained earnings worth $180,000 and...
Study smarter with the SolutionInn App