{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 8 - (a Suppose for simplicity that n is a perfect square We...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (a) Suppose for simplicity that n is a perfect square. We drop the ﬁrst jar from heights that are multiples of ﬂ (i.e. from ﬂ, 2\/ﬁ, 3\/ﬁ, . . .) until it breaks. If we drop it from the top rung and it survives, then we’re also done. Otherwise, suppose it breaks from height jﬁ. Then we know the highest safe rung is between (j — 1)\/ﬁ and jﬁ, so we drop the second jar from rung 1 + (j — 1)\/ﬁ on upward, going up by one each time. In this way, we drop each of the two jars at most ﬂ times, for a total of at most 2%. If n is not a perfect square, then we drop the ﬁrst jar from heights that are multiples of h/ﬁj, and then apply the above rule for the second jar. In this way, we drop the ﬁrst jar at most 2% times (quite an overestimate if n is reasonably large) and the second jar at most ﬂ times, still obtaining a bound of O(\/ﬁ). (b) We claim by induction that fk(n) g 2kn1/k. We begin by dropping the ﬁrst jar from heights that are multiples of [Mk—UM]. In this way, we drop the ﬁrst jar at most 2n/n<k—1)/k : 2n1/k times, and thus narrow the set of possible rungs down to an interval of length at most nag—Wk. We then apply the strategy for k — 1 jars recursively. By induction it uses at most 2(k — 1)(n<k—1)/k)1/(k_1) : 2(k — 0nd drops. Adding in the g 2n1/k drops made using the ﬁrst jar, we get a bound of 2kn1/k, completing the induction step. 1ex291.532.145 ...
View Full Document

{[ snackBarMessage ]}