Jump to content

I do this in nearly every forum I sign up for.


tintytiny

Recommended Posts

You have two eggs (let's pretend they're really, really hard to break, okay). There's a 100 storey building in front of you, and you know there's a certain floor that, if you drop an egg from it, it'll break, but if you go a floor lower and drop the egg, it won't. What's the least number of drops you have to do with the two eggs to be absolutely sure that you can find the designated floor? (You're allowed to break the eggs, as long as you can figure out the floor.)

 

The floor it is, divided by 2, plus 2.

 

Say the floor is level 11.

 

You try these floors:

 

1

3

5

7

9

11

13 <- breaks

 

So you try 12. It breaks. Thus, you know it MUST be level 11.

 

That's 8 tries. 11/2 = 5.5+2 = 7.5 - rounded up, gives you 8.

 

 

Sorta Edit: I didn't post this first, but I was about to post when I thought of a better idea.

 

It's actually like this:

 

You try these floors:

1

4

7

10

13 <- breaks

 

Then you try 11. If it breaks, you know '10' is the answer. If does not break, you try 12. If 12 breaks, the answer is 11. If it does not break, 12 is the answer.

 

Edit Edit: Oh yeah, and 'Footsteps' sounds right :) Dunno if it's the intended answer, but I like it.

Link to comment
Share on other sites

I think it's a bit easier than Tynach said:

 

Start on floor 1 and drop an egg. It won't break. Go up one floor and drop an egg again, see if it breaks. Repeat this until you find the first floor where the egg breaks.

 

Is this correct?

 

That works, but it doesn't do it in the least possible number of steps. If it's floor 11 like my earlier example, it'd take testing 12 floors - instead of 8 (first solution) or 7 (second solution).

Link to comment
Share on other sites

No, there's a shorter method than that, Tynach. ;) And, Chibi, it's the least number of drops you have to do. That wouldn't produce the least amount. xD

 

You could always skip more levels in between and then backtrack those, but then it makes it harder if that level happens to be one that's skipped. For example, if it were, say, the 70'th story, going up by '10' each round would make it much shorter - but if it were the 9th story, skipping floors by 10's would actually make it shorter.

 

I'll think on this one a while more, but short of analyzing the structure of the egg, and in the times it splashes analyzing the extend of the shell's shattering and all that sciencey math stuff, I can't see a good short way that only has a specific number of moves.

Link to comment
Share on other sites

Yay Sweetdang. ^_^ Nyannyannyannyannyannyannyana....

 

Tynach~ It doesn't necessarily mean the shortest... oh, this is confusing. xD

 

Look at it like this. You could get lucky and hit the right floor within a much shorter number of drops than if it was a different floor. But it's not which method could produce the smallest number of drops, because you could get lucky and you could not. It's to find a method that, even in the worst case scenario, you can still find the floor within a certain number of drops. So you have to find the method that produces the smallest maximum number of drops, not the minimum.

 

Make sense? xD I hope it does.

Link to comment
Share on other sites

Hrmm thought I might join in and have a guess, although this sounds complicated :S

 

What if you dropped it from

 

level 50

doesn't break, drop from level 75 (then if it breaks at 75 drop it from 67 or 68 and if it doesn't break drop it from level 87 or 88)

break drop from level 25 (if it breaks then drop it at 37/38 and if it doesn't, from 12/13)

 

And then just keep halving the possibilities.

Although I don't know how the second egg would come in handy :S

 

And I'm not actually sure what the minimum would be then...somewhere around 10?? I can try work it out if that's on the right track...

Link to comment
Share on other sites

The second one?

 

Well, each egg can only break once, right? :P

 

Ahhh I see. So my guess would fail then. Now I understand Tynach's idea a bit better and that sounds pretty good! So if that's not the right answer, @tintytiny is the answer something that has nothing to do with maths and we will all go d'oh when you say it or is the answer some sort of complicated maths? If so, I have no chance :P

Link to comment
Share on other sites

I assume it's commo sensical math that takes a LOT of common sense.

 

Commo-sensical is now my favorite word.

 

Is it dealing with the fact that it's a 100 story building, or 100 an arbitrary number, and it can be any number of total floors?

Link to comment
Share on other sites

xD

I kind of meant COMMON sensical, but whatever floats your boat :D

 

WHAAT? I'm pretty sure, it's a 100 stories.

 

Wait.

If you have four pairs of socks in a drawer, how many socks do you have to draw before you're SURE you have a matching pair?

Five, right?

 

Uh.... yea. I kind of don't know where I'm taking this. :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...