Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Found a problem floor by minimum steps
Message
From
27/11/2001 09:56:52
 
General information
Forum:
Games
Category:
Puzzles
Miscellaneous
Thread ID:
00585855
Message ID:
00586292
Views:
40
>>>>>>>>Hi everybody,
>>>>>>>>
>>>>>>>>This is a puzzle, which could be asked on a interview. I could not find a best answer.
>>>>>>>>
>>>>>>>>There is a 100 floor building. You have two glass balls. You need to find out the floor number, starting from which these balls will broke by minimal number of steps.
>>>>>>>>
>>>>>>>
>>>>>>>What is definition of a step in this case?
>>>>>>
>>>>>>I think, one dropping of a ball is a step.
>>>>>
>>>>>Are you saying that I need to find out the lowest floor of this building where a glass ball will break when dropped and I need to explain how it could be determined in the least number of actions?
>>>>>
>>>>>Renoir
>>>>
>>>>Yes, exactly. Thanks for translating this problem into proper English for me :)
>>>
>>>Go to floors:
>>>14
>>>27
>>>39
>>>50
>>>60
>>>69
>>>< and so on, going adding 1 less floor each time >
>>>99
>>>
>>>If ball breaks at any floor, go to previous step+1, and go to each floor in ascending order.
>>>
>>>Max steps=14, occurring at at 13, 26, 38, 49, etc. I chose 14 as the starting point because the sum of n + (n - 1) + (n - 2)... series for n=14 is the lowest n that gives a result greater than 100.
>>>
>>>I don't recall how to express this in the proper mathematical terminology...
>>
>>This only works on average though - if you go up the floors in 10s (rather than 14,13,12) you will determine the number of floors in either less than or the same number of steps than your solution around 55% of the time. In some of the remaining 45% of cases, you do determine the number of floors in significantly less drops though.
>
>That's true, but the algorithm should work for the worst case scenario too.

I was just thinking that if I were given 1 go with 2 balls, would I hedge my bets that I have a 55% chance of being better or at least no worse than another person using the more complicated method.
Len Speed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform