Chapter 2: Q26E (page 88)
Professor F. Lake tells his class that it is asymptotically faster to square an -bit integer than to multiply two n-bit integers. Should they believe him?
Short Answer
No, the statement of Professor F. Lake is wrong.
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 2: Q26E (page 88)
Professor F. Lake tells his class that it is asymptotically faster to square an -bit integer than to multiply two n-bit integers. Should they believe him?
No, the statement of Professor F. Lake is wrong.
All the tools & learning materials you need for study success - in one app.
Get started for free
Question: Solve the following recurrence relations and give a bound for each of them.
Given a sorted array of distinct integers , you want to find out whether there is an index for which . Give a divide-and-conquer algorithm that runs in time .
In this problem we will develop a divide-and-conquer algorithm for the following geometric task.
CLOSEST PAIRInput: A set of points in the plane,
Output: The closest pair of points: that is, the pair for which the distance between and , that is,
,
is minimized.
For simplicity, assume that n is a power of two, and that all the x-coordinates role="math" localid="1659237354869" are distinct, as are the y-coordinates.
Here鈥檚 a high-level overview of the algorithm:
.Find a value for which exactly half the points have , and half have . On this basis, split the points into two groups, L and R.
鈥 Recursively find the closest pair in L and in R. Say these pairs are and with distances and respectively. Let d be the smaller of these two distances.
鈥 It remains to be seen whether there is a point in Land a point in R that are less than distance dapart from each other. To this end, discard all points with or and sort the remaining points by y-coordinate.
鈥 Now, go through this sorted list, and for each point, compute its distance to the seven subsequent points in the list. Let be the closest pair found in this way.
鈥 The answer is one of the three pairs role="math" localid="1659237951608" , whichever is closest.
(a) In order to prove the correctness of this algorithm, start by showing the following property: any square of size in the plane contains at most four points of L.
(b) Now show that the algorithm is correct. The only case which needs careful consideration is when the closest pair is split between L and R.
(c) Write down the pseudocode for the algorithm, and show that its running time is given by the recurrence:
Show that the solution to this recurrence is .
(d) Can you bring the running time down to ?
A linear, time-invariant system has the following impulse response:

(a) Describe in words the effect of this system.
(b) What is the corresponding polynomial
Question: On page 66 there is a high-level description of the quicksort algorithm.
(a) Write down the pseudocode for quicksort.
(b) Show that its worst - case running time on an array of size n is .
(c) Show that its expected running time satisfies the recurrence relation.
Then, show that the solution to this recurrence is .
What do you think about this solution?
We value your feedback to improve our textbook solutions.