subject
Physics, 15.02.2022 04:20 ilovecupcakes8459

You’re doing some stress-testing on various models of glass jars to determine the height from which they can be dropped and still not break. The setup for this experiment, on a particular type of jar, is as follows. You have a ladder with n rungs, and you want to find the highest rung from which you can drop a copy of the jar and not have it break. We call this the highest safe rung. It might be natural to try binary search: drop a jar from the middle rung, see if it breaks, and then recursively try from rung n/4 or 3n/4 depending on the outcome. But this has the drawback that you could break a lot of jars in finding the answer. If your primary goal were to conserve jars, on the other hand, you could try the following strategy. Start by dropping a jar from the first rung, then the second rung, and so forth, climbing one higher each time until the jar breaks. In this way, you only need a single jar—at the moment it breaks, you have the correct answer—but you may have to drop it n times (rather than log n as in the binary search solution). So here is the trade-off: it seems you can perform fewer drops if you’re willing to break more jars. To understand better how this tradeoff works at a quantitative level, let’s consider how to run this experiment given a fixed "budget" of k ≥ 1 jars. In other words, you have to determine the correct answer—the highest safe rung—and can use at most k jars in doing so. Required:
Suppose you are given a budget of k = 2 jars. Describe a strategy for finding the highest safe rung that requires you to drop a jar at most f(n) times, for some function f(n) that grows slower than linearly.

ansver
Answers: 1

Another question on Physics

question
Physics, 20.06.2019 18:04
Plzz worth 22 ! which statement about energy transformations is not true? a all forms of energy can be transformed into thermal b energy is never destroyed or created during transformations c potential chemical energy always transforms into kinetic d some thermal energy is always released during a transformation
Answers: 1
question
Physics, 21.06.2019 17:00
These models show the electron structures of two different nonmetal elements. which element is likely more reactive, and why? element 1 is more reactive because it has fewer electron shells and is toward the top of its group on the periodic table. element 1 is more reactive because it has more electrons in its valence shell and is farther to the right on the periodic table. element 2 is more reactive because it does not have a valence shell close to the nucleus, so it will attract electrons. element 2 is more reactive because it does not have a full valence shell, so it will attract electrons.
Answers: 2
question
Physics, 22.06.2019 00:20
Zeros that follow non-zeros numbers and are also to the right of a decimal point are significant
Answers: 2
question
Physics, 22.06.2019 16:00
Why does lightning travel from clouds to the ground?
Answers: 2
You know the right answer?
You’re doing some stress-testing on various models of glass jars to determine the height from which...
Questions
question
English, 04.10.2021 16:50
question
Mathematics, 04.10.2021 16:50
question
Biology, 04.10.2021 17:00
question
Computers and Technology, 04.10.2021 17:00
question
Mathematics, 04.10.2021 17:00
Questions on the website: 13722363