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...
-
A standard Schedule 40 steel pipe is to be selected to carry 10 gal/min of water with a maximum velocity of 1.0 ft/s. What size pipe should be used?
-
This appeal involves the validity of a will executed in contravention of an earlier contract to make mutual wills. A husband and wife signed a contract to make mutual wills and then executed those...
-
1. Irad Liu, of Commerce, Texas, is in the 25 percent marginal tax bracket and is considering the tax consequences of investing $2000 at the end of each year for 30 years in a tax-sheltered...
-
Analyses at least two considerations that would be required to ensure effective transaction transparency of centralized database management systems and distributed database management systems....
-
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...
-
A fiber-spinning process currently produces a fiber whose strength is normally distributed with a mean of 75 N/m2. The minimum acceptable strength is 65 N/m2. a. Ten percent of the fiber produced by...
-
9. Question 9 Which accounting principle dictates using accounting rules that will result in less revenues/assets, or higher liability when choosing among acceptable accounting rules? 1 point Going...
-
Question content area top Part 1 Of the following statements regarding the entries See or Use when they appear in parentheses in the CPT Index, which is incorrect? A. These entries point to other...
-
ntegrated log files ________. tend to have problems with format incompatibilities tend to have time synchronization problems Both tend to have problems with format incompatibilities and tend to have...
-
In the diagram, PQR is an equilateral triangle of side 18 cm. M is the midpoint of QR. An are of a circle with centre P touches QR at M and meets PQ at A and PR at B. Calculate, correct to two...
-
What is the rationale for excluding Subpart F income from the definition of net tested income? Group of answer choices Subpart F is only earned by CFCs and net tested income excludes all income...
-
King City Specialty Bikes (KCSB) produces high-end bicycles. The costs to manufacture and market the bicycles at the companys volume of 2,000 units per month are shown in the following table: The...
-
The relationship described in question 7 does not always appear to hold. What factors, besides the number of firms in the market, might affect margins?
-
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.
-
jorge commutes both to his job and to school, driving a total of about 250 miles per week. His current car is fully paid off, but it's getting old. He spends about $1800 per year on repairs, and the...
-
Company x wants to sell 1,000 ounces of copper next month. The current copper price is 100 per ounce. Copper price is forecasted for the next month as below: Scenarios Probability Copper price ( /...
-
A Surprising Case of Shrinkage by Keith K. Schillo Biology Department SUNY College at Oneonta history. In order the spring. Afer graduation, Frank attended State University to study American gym...
Study smarter with the SolutionInn App