Thread: Brain teaser #2

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    890

    Brain teaser #2

    Again, don't spoil it if you've seen this before. It's from the same book as the other.

    Five people are in a room with no windows, no furniture, etc. The floor is a cement slab. Embedded in the middle of the floor standing vertically is a foot long metal pipe. At the bottom of the pipe is a ping pong ball, with roughly 1mm of clearance all the way around.

    Problem: Get the ball out of the pipe without damaging the ball, pipe, or floor. You have the following at your disposal: One carpenter's hammer, a 12" wood ruler, a 6" piece of string, a paper clip, and a refrigerator magnet.

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Ummm... would one of my fellow occupants happen to be MacGyver?

    I guess I have several questions (which clearly have nothing to do with the actual solution, because you would have mentioned them). Can the ruler fit in the pipe? can the hammer head fit in the pipe? is the magnet powerful enough to be pulled by the hammer head if the ball was in between? Is the string edible if I get bored?
    Last edited by SlyMaelstrom; 04-23-2008 at 05:53 PM.
    Sent from my iPadŽ

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    hmm...

    Ideally the clip should somehow be put under the ball. Then the magnet would do the rest slowly pushing the paper clip up and, with it, the ball.

    ... I guess
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Recount the inventory of everything in the room besides the pipe and ball.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    yes, yes. just thinking out loud here
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Well it's easy if MacGyver was there, just get him to build a death-ray, problem solved.


    Seriously, I'd just suck the ball out of the pipe with my mouth

  7. #7
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Quote Originally Posted by SlyMaelstrom View Post
    Ummm... would one of my fellow occupants happen to be MacGyver?
    You rang, sir?

  8. #8
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    1) Leave the room
    2) Go to a game store
    3) Buy a new ping pong ball
    4) Realize that paying the 50 cents for a new ball is much more time and cost efficient then trying to get the ball out of the pipe.

    KISS baby

  9. #9
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by zacs7 View Post
    Seriously, I'd just suck the ball out of the pipe with my mouth
    That's not it, but realizing that none of the items I listed are of any help is the first step to the real solution.

    Also, are you married?

  10. #10
    verbose cat
    Join Date
    Jun 2003
    Posts
    209
    I'll go the clean route, though I can imagine what is intended with 5 people...

    Pour, uh, water into the pipe until the ball floats to the top. If we use anything else, I don't think I want the ping-pong ball that badly.
    abachler: "A great programmer never stops optimizing a piece of code until it consists of nothing but preprocessor directives and comments "

  11. #11
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by jEssYcAt View Post
    I'll go the clean route, though I can imagine what is intended with 5 people...

    Pour, uh, water into the pipe until the ball floats to the top. If we use anything else, I don't think I want the ping-pong ball that badly.
    Ding, ding!

    You got it - float it out.

  12. #12
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  13. #13
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by Dave_Sinkula View Post
    If that chimp is so smart, how come he hasn't evolved yet? Dumb chimp.

  14. #14
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by medievalelks View Post
    Ding, ding!

    You got it - float it out.
    Wow. A brain teaser in which the solution is not part of the problem. I've had better readings in my dentist waiting room.

    EDIT: By the way, how does the book propose you fill the tube if there's no "windows, etc" - I presume this also means doors - spit my guts out into a 40mm diameter 1 foot tall pipe? Maybe cut myself with the paper clip and bleed to death into it...
    Last edited by Mario F.; 04-23-2008 at 07:51 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  15. #15
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by Mario F. View Post
    Wow. A brain teaser in which the solution is not part of the problem. I've had better readings in my dentist waiting room.

    EDIT: By the way, how does the book propose you fill the tube if there's no "windows, etc" - I presume this also means doors - spit my guts out into a 40mm diameter 1 foot tall pipe? Maybe cut myself with the paper clip and bleed to death into it...
    Think outside of the bladder.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Brain teaser
    By medievalelks in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 04-24-2008, 06:23 PM
  2. Found a Brain Teaser
    By golfinguy4 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 04-26-2004, 10:37 PM
  3. Re: Girlfriend Post
    By PsychoBrat in forum A Brief History of Cprogramming.com
    Replies: 57
    Last Post: 05-13-2002, 06:11 AM
  4. Brain Teaser...
    By Paro in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 04-01-2002, 12:30 PM
  5. brain teaser
    By dbaryl in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 11-07-2001, 11:35 AM