08-15-2022, 03:07 PM
|
#136
|
|
Franchise Player
Join Date: Jul 2003
Location: In my office, at the Ministry of Awesome!
|
Quote:
Originally Posted by psyang
I had another good number theory type problem, but I'll do that later. People seem to enjoy the more "practical" ones. So try this one.
You have two balls made of some new substance, and you want to determine the highest floor of a 100 storey building from which you can drop a ball and have it not break. Once a ball breaks, it can't be used again.
The brute force method would be to start at the first floor, and keep dropping a ball until it breaks. Then the previous floor would be the answer. This could take up to 100 drops, however (assuming the first floor starts above the main floor).
What's the minimum number of drops you must make to figure this out?
|
Comment on your last one
To the new one
Spoiler!
I can get it as low as 19
Drop on 10, 20, 30 etc till one breaks, then start at 11, 21, 31 ect and drop each floor till it breaks, highest would be 19 drops:
10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 91, 92, 93, 94, 95, 96, 97, 98, 99
Using just straight multiples you get a max number of drops of
Interval = x (ie, if you're going to drop every 3rd floor, the interval (x) = 3
Max Drops for an interval = 100/x (rounded to the nearest whole number) + x-1
so for X = 2
Max Drops = 100/2 + 1 = 51
For x = 10
Max drops = 100/10 + 9 = 19
You get the same number of drops for 11 or 12
X = 11 = 100/11 + 10 = 9+10=19
x = 12 = 100/12 + 11 = 8 + 11 = 19
I can't remember the notation for truncating/rounding
Anyway, it's a minimum at an interval of 10-12
That being said, there is maybe another way to do it, but that's my quick crack at it.
__________________
THE SHANTZ WILL RISE AGAIN.
 <-----Check the Badge bitches. You want some Awesome, you come to me!
|
|
|