Wednesday, September 17, 2008

Riddle 7 - Glass balls

ball

Here we go again - audience participation time! Yes, it's time for a new riddle. As usual, we will first review the solution to the riddle before. The solution is very basic - you just need to count the numbers from left to right... Each time we simply write down the number of appearances of the digit and the digit itself. For example, let's take the one before last row:

4 2 1 3 1 1

The first digit is 4, how many appearances? 1. Therefore we write 1 4
Now 2 which appears once, therefore 1 2
Now 1 which appears 3 times, 3 1 and last 1 3. So the result is:

1 4 1 2 3 1 1 3

The next row will be:
4 1 1 4 1 2 2 3, which is almost what Alex has wrote...


Riddle 7 - glass balls

glass_ball

Imagine you have a single glass ball and a 100 stories high building. You want to know what is the highest story from which you can throw the ball and still it will not shatter. Since you have only one ball, you must start from the first floor and go up one by one, or else you might find yourself with a shattered ball and no idea of the exact floor from which you can throw balls (if you had any...) and still admire the view...


So if I ask you how many trials you need in the worst case, the answer is 100. You can't do better.

But what if you had 2 balls? What is the minimal number of trials, worst case, that you need to do to find the exact spot?

What about 3 balls? 4 balls? Is there a pattern here?

No comments: