You have 2 identical glass bulbs with you. Bulb
manufacturer has mentioned that each bulb might withstand a
drop of 200 Feet at maximum. Your task is to find the
height at which the bulb breaks ofcourse with minimum
number of iterations.
Assume that you have 200 blocks of 1 foot each which can be
stacked one by one to create a 200 Feet structure to carry
out the test.
Answer Posted / chris uzdavinis
Minor typo in previous answer (#7): it should say ... we
solve n*(n+1) = 200
To help get the mindset of the answer, think of the question
differently at first. Rather than solve for the fewest
number of drops to cover a range, think about a twisted
version of that question: "given a fixed number of drops,
what range can be completely covered?"
Our constraints are we have two bulbs, and we're done once
the 2nd breaks, but if it doesn't break we can use it again.
Given only 1 drop, we can only cover a range of 1. Either
it breaks or it doesn't. (If we go higher than the first
level, we don't know if it would have broken at a lower level.)
Given 2 drops, we can cover a range of 3: first drop on 2,
if it breaks, try 1, if not, try 3.
Given 3 drops, we cover a range 1..6: First drop on 3, if
it breaks, try 1, then 2. If it doesn't break, drop #2 is
on 5. If breaks, try 4. If not, try 6.
Given 4 drops, we cover a range of 1..10:
Start on 4, if breaks, try 1,2,3. If not, try 7. If
breaks, try 5,6. If not, try 9. If breaks, try 8. If not
try 10.
And so on. Thus, for N drops, we start on level N. If it
breaks, start a linear search using the remaining bulb, from
1..N-1. Thus, it took a max of 20 drops. But if it doesn't
break, we try level N+(N-1). If it breaks, start a linear
search from N+1. Otherwise try N+(N-1)+(N-2). etc.
This series is clearly the sum from 1 to N drops.
So now that we know how big of a range we can cover given a
fixed number of drops. But the original question asks us to
cover a range of 200, and find the number of drops required.
We just find the smallest integral value for N such that
sum of 1..N >= 200, which is 20.
I gave the sequence of tests in the previous post.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
sir i need catholic syrian bank previous question papers fully. it will be helpful for me to greater extend .please do the needful to me.
P pages read in d mins after day p+1 pages read in d+1 mins last day 379 pages done in 317 mins find p+4
What is the syllabus for numerical aptitude exam to be held by the United bank of India. Plz inform me through email. Thanking You!
plz send me aptitude test questions on my email id bpraichur@gmail.com
At 6o'clock ,a watch strokes 6 times.The time between first and last is 30secs.At midnight 12o' clock how much time for all strokes?
IDear sir, I have had a data containing of 4 numbers on daily basis for which I would like to know what is the next comming 4 numbers. Based on that data I would like to find out the next comming numbers. Support needed. regards chandramohan gudivada 09849974512 cm116_99@yahoo.com Example : 4513, 4132, 1465, 2941, 1762, 1432, 3412, 5283, 7261, 2643, 4751, 2581, 6513 .... and what is the next number in the sequence?
4 cards are placed on a table, each card has two colors. U don't know the color of the back side of eachcard.4 persons A B C and D are sitting on the table before the cards. They can see Red, Green Red and blue.Out of the 4 poeple 2 always lie. They see the color on the reverse side and give the following comment A: Yello/green B: Neither Blue/nor Green c: Blue/Yello D: Blue/ Yello find out the color on the other side of the 4 cards. No. of animals is 11 more than the no. of birds. If the no. of birds were the no. of animals and no. of animals were the no. of birds( ie., interchanging no.s of animals and birds.), the total no. of legs get reduced by one fifth (1/5). How many no. of birds and animals were there?
sir i need generalKnowledge previous questions for rrb secunderabad goods guard exam
foot is related to man in the same way hoof is related to...........
how soon can you travel down to start your new job?
Wo kay chej hi jo saal may 1 baar aata hai months may 2 baar aata hai weeks may 4 baar aata hai or din may 6 baar
Three neighbours are there. 1st one lends 2nd and 3rd that many no.of tractors that then already each had.After few months , 2nd lends to 1st and 3rd that many tractors then they had. After a few months 3rd lends to 1st and 2nd that many tractors then they had.Now each of them got 24. Find howmany they had initially?
what three specific job positions do you target from qatar airways group u.k?
why should we hire the others waiting to be interviewed?
In a soap company a soap is manufactured with 11 parts. For making one soap you will get 1 part as crap. At the end of the day u have 251 such scraps. From that how many soaps can be manufactured?