Jump to content

Fishtanks and Highrises


Ăɍȼẗîȼ

Recommended Posts

I have a riddle:

 

I have a 101 floor high rise, 2 plastic fish tanks, and an elevator that takes me to any floor on the building instantly.

 

Due to safety regulations of my country, I have to determine a floor X, where all floors above X (including X), where I dropped a fish tank out of, it will break. At all floors below X, if I dropped a fish tank out of that floor, the fish tank won't break.

 

What is the most efficient way of determining X?

 

Answer to my riddle gets 3 REPS from me.

 

Best Answer so far: Blue Thunder: 20 tries in the worst case.

 

(MODS: I'm not sure if this should be in this section, if not, please move.)

Link to comment
Share on other sites

Go to floor 51' date=' and if it breaks, go down until you find a floor that doesn't break. If it doesn't break at floor 51, go up until it does.

[/quote']

 

Nice job, it does it in 51 tries. Which I've said isn't the most efficient.

 

 

 

Go to the floor in the middle of the building (vertically) and drop it out the window. If it survives' date=' go to the floor directly in the middle between that floor and the Floor 101. If it breaks, go to the floor directly in the middle between that floor and Floor 1. Repeat this process until Floor X is found.

[/quote']

 

Drop at 51, it breaks.

 

Drop at 25, it breaks again.

 

Now you have no fishtanks, and you don't know X.

Link to comment
Share on other sites

Start on Floor 1, and go up to Floor 4, where you drop a tank. If it survives, go up 3 floors and drop it again. If it breaks, drop the other tank from the floor directly below. If it breaks there, Floor X is the floor directly beneath that floor, if it survives, Floor X is the floor directly above that floor. (I.E. Tank survives Floor 4, goto Floor 7. Breaks Floor 7, goto Floor 6. Breaks Floor 6, Floor X is Floor 5.

Link to comment
Share on other sites

Start on Floor 1' date=' and go up to Floor 4, where you drop a tank. If it survives, go up 3 floors and drop it again. If it breaks, drop the other tank from the floor directly below. If it breaks there, Floor X is the floor directly beneath that floor, if it survives, Floor X is the floor directly above that floor. (I.E. Tank survives Floor 4, goto Floor 7. Breaks Floor 7, goto Floor 6. Breaks Floor 6, Floor X is Floor 5.

[/quote']

 

Well...

 

That gets it done in 35 tries. You go up until floor 99, where it breaks, and you go to floor 97, and 98 to find X.

 

Not most efficient solution.

 

@ Raelen: A glass fish tank will break too easily for the problem to be realistic.

Link to comment
Share on other sites

What about asking Ăɍȼẗîȼ for the answer? that will let me know the first time I try

 

hmmmm drop it from floor 42

 

So it breaks' date=' you do it in 42 tries. what if it doesn't break?

[/quote']

 

I meant the one after that one the skipping every other floor. that would could it in half

 

 

I know

 

drop from 11, 22, 33,44 and so on until it breaks. Then between the 10 floor interval keep dropping the other one. that means at max 20 tries

 

 

EDIT: Post number 1234. I win

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...