Results 1 to 9 of 9

Thread: Another boring question.

  1. #1

    Thread Starter
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    Cool

    A 4 men are stranded on an island.
    During the day the pile up a bunch of bananas to eat.

    The 1st man wakes up in the middle of the night, and not trusting the others, divided the bananas into 4 piles, and gives the left over banana to a nearby money.

    the 2nd man wakes up later in the middle of the night, and not trusting the others, divided the bananas into 4 piles, and gives the left over banana to a nearby monkey too.

    This cycle is repeated for man 3 & 4. And after the man 4 has divided the pile, and given the left over to the money, there are no more bananas left.

    How many bananas were there to start off with.

    Now that I think about it, this is pretty damn simple. Anyway.

    =======================================
    =======================================

    What this has to do with Maths, I have no idea:
    ------------------------------------------------------------

    A rich king, finds that his most loyal friend has betrayed him, so he throws his friend in a room.

    The room has 2 doors. On of them leads to freedom, and the other the a life of slavery and pain. Infront of each door, is a guard. Now, on guard is said to always tell the truth and never lie. And the other guard, is said to always lie, and never tell the truth. Which door leads to what, and which is the honest guard he does not know.

    Which Guard does he ask??
    What question does he ask the guard??
    And which door does he take??

    Sorry, this isn't really a maths question as such.

    You can't answer the last question with "Take the door to freedom!"
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Weird solution: -3

    Wak: You did not state it explicitly, but I assume that after each division, approximately 3/4 of the bananas are left. Each man removes and hides what he considers his share. Correct?

    You say that no bananas are left after the fourth man does his division. This is a typo or some kind of error?

    One hundred or so years ago, a similar problem was proposed with 5 men on an island and lots of coconuts. Several of us started working on the problem, which can be reduced to a linear Diophantine equation in two unknowns. It is a tedious bit of algebra, and there is some method for finding solutions to such equations once you get them.

    One of my friends was/is a genius. He recognized that if you found a solution, another solution could be found by adding 3125.He then realized that -4 fit the conditions in a weird way. Ergo, 3121 was the answer. He did this in a few minutes while the rest of us were no where near finishing the algebra to get an equation in two unknowns.

    I decided to apply my friend's idea to this problem. In this case, solutions should differ by 256, and -3 is a weird solution.
    • Start with negative 3
    • Give one to monkey, leaving negative 4
    • Divide into piles of negative 3 and negative 1
    • Hide pile of negative one and leave pile of negative 3 for next man.
    Above weird solution fits the conditions.

    So: -3 plus 256 = 253, which seems to be the correct answer.

    There are at least two solutions to the second problem, both involving double negatives which cancel each other. One solution would work with a single guard who is either a consistent liar or a consistent truth teller. The other solution requires both guards.

    I leave the construction of the questions to others for the time being.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  3. #3
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Exclamation Guard problem

    Ask either guard:

    "If I asked the other guard which door led to freedom, what would he say?"

    Whatever the answer, do the opposite.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Ask him if can state that he lies
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Only one question.

    Kedaman, Wak fogot to tell you that only one question is allowed.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    yeah and "which guard does he ask" seems relevant?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    One Guard Question

    Kedaman: Check the Post by Simonm. Imagine posing the question to the liar and think about his thought process. Then imagine posing the question to the truth teller.

    Others: You can solve this with only one guard, as long as he is a logically consistent liar or a logically consistent truth teller.
    If I were to ask you which door led to freedom, which would you point to?
    The idea/logic is the same as the two-guard question.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  8. #8
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Lightbulb Interesting variation

    There is an interesting variation on this question with three people; A liar, a truth teller and someone who might tell the truth or lie but you have no way of knowing which.

    The problem is, I can't quite remember the exact nature of the question.

    Anyone?

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I know i know guv, i was just joking
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width