• subscribe
February 23, 2007 12:00 AM

The Logical Puzzle

SQL Server Pro
InstantDoc ID #94817

February's Puzzle: Getting Out of a Cave
While hiking a mountain, you enter a cave. Suddenly, rocks fall and block the cave's entrance. You turn on your flashlight and start walking deeper into the cave. After a while, you find another opening. Unfortunately, however, the opening gives way to a sheer rock wall 60 feet above a hikeable surface. You figure that 10 feet is the most distance you could jump down without sustaining serious injuries (also taking your own height into consideration). You look around the cave and find that the ceiling is very high—40 feet above the floor. After a while, you find a 40-foot rope hanging from ceiling to floor. A few minutes later, you find another 40-foot rope hanging from ceiling to floor. You have your hiking knife with you. Can you think of a plan that will let you get out of the cave and down the hikeable surface without jumping down more than 10 feet?

First, climb one of the ropes, and cut it at the halfway point. You now have 20 feet of rope in your hand, you're hanging on to the 20-foot rope anchored to the ceiling, and you're 20 feet above the floor. Make a knot at the edge of the hanging rope to form a small loop. (For the purpose of simplification, we'll assume that knots don't affect the length of the rope.) Slide the 20-foot rope through the loop to its middle point (the 10-foot mark). Now, you have a 20-foot rope hanging from the ceiling, plus another 10-foot segment (20 feet, doubled up), amounting to 30 feet in total. You can now shimmy down the rope, and when you reach the end of the doubled-up segment, let go of one end of it and let it slide through the loop as you jump down. You now have a 20-foot rope in hand.

Next, carrying this 20-foot rope, climb the second rope and cut it when you're 10 feet from the ceiling (or 30 feet above the floor). Tie the resulting 30-foot rope to the end of your 20-foot rope to form a 50-foot rope. Again, make a loop at the end of the hanging 10-foot rope, and slide the 50-foot rope through the loop to its middle point. In total, you have 35 feet of rope made by the two segments (10 feet of hanging rope, plus 25 feet made by the doubled-up 50foot rope). You can now shimmy down the rope, and when you get to the end of the rope (5 feet above the floor), hold one of its ends and jump down. You now have a rope that's 50 feet in length, and you can use it to get down from the cave to the hike-able surface.

March's Puzzle: Free Tuna
You go to the grocery store and grab eight cans of tuna from the shelf. You go to the cash register to pay. In a good mood, the store owner hands you three plastic bags and says, "If you can arrange the eight cans in these three plastic bags such that each bag contains an odd number of cans, you can have them for free." Can you think of a way to get that free tuna?



ARTICLE TOOLS

Comments
  • appsupport
    5 years ago
    Mar 12, 2007

    Let me get this straight. You have already climbed twenty feet up a rope, no mean feat unless you are used to doing that sort of thing for a living, you are then expected to hold on with one hand which would be pretty difficult for most people to do for more than a few seconds. You then have to first cut through the hanging rope and then tie a knot in the remainder WITH ONE HAND! Not only this but you then have to repeat the feat climbing 30feet up the second rope, cutting it and tying another ONE HANDED knot that won't give way. This is a good example of a solution that works on paper but that would not work in the real world, not for the majority of people in any case.

  • JAMES
    5 years ago
    Mar 03, 2007

    Is zero an odd number?

    [Itzik: No]

  • Dennis
    5 years ago
    Mar 01, 2007

    Place 1 can in the first bag
    Place that bag inside the second bag and put two additional cans into the second bag
    Place the rest of the cans into the third bag

    First bag = 1 can
    Second bag = 3 cans
    Third bag = 5 cans

    [Itzik: Right you are :-)]

You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...