Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

The New Coffee Room

  1. TNCR
  2. General Discussion
  3. Puzzle time - Coconuts and a monkey

Puzzle time - Coconuts and a monkey

Scheduled Pinned Locked Moved General Discussion
33 Posts 8 Posters 286 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jon-nycJ Online
    jon-nycJ Online
    jon-nyc
    wrote on last edited by
    #1

    Five men and a monkey, marooned on an island, collect a pile of coconuts to be divided equally the next morning. During the night, however, one of the men decides he'd rather take his share now. He tosses one coconut to the monkey and removes exactly 1/5 of the remaining coconuts for himself. After he leaves, a second man, reasoning similarly, gets up, tosses one coconut to the monkey, and takes 1/5 of the remaining coconuts. A third, fourth, and fifth man follow, each unaware of the others.

    In the morning, one more coconut goes to the monkey and the rest are split equally among the five men. What's the smallest original number of coconuts needed to make this whole scenario possible?

    "You never know what worse luck your bad luck has saved you from."
    -Cormac McCarthy

    1 Reply Last reply
    • LuFins DadL Offline
      LuFins DadL Offline
      LuFins Dad
      wrote on last edited by
      #2

      Are you allowing fractions of coconuts?

      The Brad

      1 Reply Last reply
      • jon-nycJ Online
        jon-nycJ Online
        jon-nyc
        wrote on last edited by jon-nyc
        #3

        Nope.

        "You never know what worse luck your bad luck has saved you from."
        -Cormac McCarthy

        1 Reply Last reply
        • LuFins DadL Offline
          LuFins DadL Offline
          LuFins Dad
          wrote on last edited by
          #4

          Ugh, I want to sit down and work this one out (seems a bit more straightforward than some of the others), but no time. I have an aqua load of work to do before driving to Cincinnati this afternoon.

          The Brad

          1 Reply Last reply
          • KlausK Offline
            KlausK Offline
            Klaus
            wrote on last edited by
            #5

            About half of your puzzles seem to boil down to Diophantine equations.

            1 Reply Last reply
            • jon-nycJ Online
              jon-nycJ Online
              jon-nyc
              wrote on last edited by
              #6

              Then solve it, bitch.

              It’ll keep you away from the piano.

              "You never know what worse luck your bad luck has saved you from."
              -Cormac McCarthy

              George KG 1 Reply Last reply
              • jon-nycJ jon-nyc

                Then solve it, bitch.

                It’ll keep you away from the piano.

                George KG Offline
                George KG Offline
                George K
                wrote on last edited by
                #7

                @jon-nyc said in Puzzle time - Coconuts and a monkey:

                Then solve it, bitch.

                It’ll keep you away from the piano.

                😁

                "Now look here, you Baltic gas passer... " - Mik, 6/14/08

                The saying, "Lite is just one damn thing after another," is a gross understatement. The damn things overlap.

                1 Reply Last reply
                • kluursK Online
                  kluursK Online
                  kluurs
                  wrote on last edited by
                  #8

                  The slacker still hasn't given us a performance of a concerto for piano and kazoo orchestra.

                  1 Reply Last reply
                  • KlausK Offline
                    KlausK Offline
                    Klaus
                    wrote on last edited by
                    #9
                    This post is deleted!
                    1 Reply Last reply
                    • jon-nycJ Online
                      jon-nycJ Online
                      jon-nyc
                      wrote on last edited by jon-nyc
                      #10

                      Nope. But close.

                      "You never know what worse luck your bad luck has saved you from."
                      -Cormac McCarthy

                      1 Reply Last reply
                      • jon-nycJ Online
                        jon-nycJ Online
                        jon-nyc
                        wrote on last edited by
                        #11

                        Oh, and show your reasoning rather than code it up.

                        "You never know what worse luck your bad luck has saved you from."
                        -Cormac McCarthy

                        1 Reply Last reply
                        • KlausK Offline
                          KlausK Offline
                          Klaus
                          wrote on last edited by Klaus
                          #12

                          ||15621||

                          The solution materialized magically in my brain. I tried it and it works. It must be because I have such a huge brain.

                          1 Reply Last reply
                          • KlausK Offline
                            KlausK Offline
                            Klaus
                            wrote on last edited by Klaus
                            #13

                            On a completely unrelated note, the solver for Diophantine equations from Wolfram Alpha really sucks.

                            1 Reply Last reply
                            • jon-nycJ Online
                              jon-nycJ Online
                              jon-nyc
                              wrote on last edited by
                              #14

                              Seriously try your hand at it for real. But yes that’s the right number.

                              "You never know what worse luck your bad luck has saved you from."
                              -Cormac McCarthy

                              KlausK AxtremusA 2 Replies Last reply
                              • taiwan_girlT Online
                                taiwan_girlT Online
                                taiwan_girl
                                wrote on last edited by taiwan_girl
                                #15

                                I will have to think this, but looking at it quickly, each time the number of coconuts would have to be divided by 5. It couldn’t because each time you throw to monkey, it makes an non five number.

                                Hmmmmm. 🤔 🧐

                                Interesting to think

                                1 Reply Last reply
                                • kluursK Online
                                  kluursK Online
                                  kluurs
                                  wrote on last edited by
                                  #16

                                  You know he just assigned the problem to his strudents and then went back to struggling with performing the Fröhlicher Landmann with both hands.

                                  KlausK 1 Reply Last reply
                                  • kluursK kluurs

                                    You know he just assigned the problem to his strudents and then went back to struggling with performing the Fröhlicher Landmann with both hands.

                                    KlausK Offline
                                    KlausK Offline
                                    Klaus
                                    wrote on last edited by
                                    #17

                                    @kluurs said in Puzzle time - Coconuts and a monkey:

                                    You know he just assigned the problem to his strudents and then went back to struggling with performing the Fröhlicher Landmann with both hands.

                                    LOL

                                    Actually, I performed it as "Angry Farmer who comes home drunk and beats his wife and kids".

                                    1 Reply Last reply
                                    • jon-nycJ jon-nyc

                                      Seriously try your hand at it for real. But yes that’s the right number.

                                      KlausK Offline
                                      KlausK Offline
                                      Klaus
                                      wrote on last edited by Klaus
                                      #18

                                      @jon-nyc said in Puzzle time - Coconuts and a monkey:

                                      Seriously try your hand at it for real. But yes that’s the right number.

                                      So you want me to actually think?

                                      I'd say the key idea here is the observation that it is sufficient to consider "the rest are split equally among the five men". It is sufficient to demand that this number is integer. If it is, everything else will be integer, too, because it's all multiplication with 5 and addition of integers only (which preserves integer-ness).

                                      Based on that idea, one can combine all the information given in the puzzle into a huge equation which however only has a single variable, namely the number of coconuts x. The result is the number of coconuts from the sentence quoted above, y.

                                      When doing it in the most straightforward way, the equation gets very long and quite repetitive. It looks like this:

                                      y = 0.2(x - 0.2(x-1) - 0.2(x-0.2(x-1)-2) - 0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-4)-0.2(x - 0.2(x-1) - 0.2(x-0.2(x-1)-2) - 0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-4)-5)-6)

                                      This can be simplified (multiplying everything out) to:

                                      y = 0.2(0.32768x-3.68928)

                                      To turn this into a true linear Diophantine equation (with integer coefficients), this can be rewritten as:

                                      32768x - 500000y = 368928

                                      According to Bézout's identity, this equation has an integer solution if the greatest common divisor of 32768 and 500000 (which is 32) divides 368928. This is true hence a solution exists.

                                      Such a linear Diophantine equation can be solved using a variant of the Euclid algorithm for greatest common divisor described here. Applying that method to the equation above yields the solution space

                                      x = -55062504 + k*15625
                                      y = -3608577 + k * 1024

                                      The smallest x that is positive is for k = 3525:
                                      -55062504 + 3525 * 15625 = 15621.

                                      This is the result I already posted above.

                                      Add or subtract 15625 ad libitum for other solutions.

                                      Any questions? 😉

                                      (Presumably there's a way simpler solution that I don't see, but I think at least it is a solution)

                                      Doctor PhibesD 1 Reply Last reply
                                      • KlausK Klaus

                                        @jon-nyc said in Puzzle time - Coconuts and a monkey:

                                        Seriously try your hand at it for real. But yes that’s the right number.

                                        So you want me to actually think?

                                        I'd say the key idea here is the observation that it is sufficient to consider "the rest are split equally among the five men". It is sufficient to demand that this number is integer. If it is, everything else will be integer, too, because it's all multiplication with 5 and addition of integers only (which preserves integer-ness).

                                        Based on that idea, one can combine all the information given in the puzzle into a huge equation which however only has a single variable, namely the number of coconuts x. The result is the number of coconuts from the sentence quoted above, y.

                                        When doing it in the most straightforward way, the equation gets very long and quite repetitive. It looks like this:

                                        y = 0.2(x - 0.2(x-1) - 0.2(x-0.2(x-1)-2) - 0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-4)-0.2(x - 0.2(x-1) - 0.2(x-0.2(x-1)-2) - 0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-0.2(x-0.2(x-1)-0.2(x-0.2(x-1)-2)-3)-4)-5)-6)

                                        This can be simplified (multiplying everything out) to:

                                        y = 0.2(0.32768x-3.68928)

                                        To turn this into a true linear Diophantine equation (with integer coefficients), this can be rewritten as:

                                        32768x - 500000y = 368928

                                        According to Bézout's identity, this equation has an integer solution if the greatest common divisor of 32768 and 500000 (which is 32) divides 368928. This is true hence a solution exists.

                                        Such a linear Diophantine equation can be solved using a variant of the Euclid algorithm for greatest common divisor described here. Applying that method to the equation above yields the solution space

                                        x = -55062504 + k*15625
                                        y = -3608577 + k * 1024

                                        The smallest x that is positive is for k = 3525:
                                        -55062504 + 3525 * 15625 = 15621.

                                        This is the result I already posted above.

                                        Add or subtract 15625 ad libitum for other solutions.

                                        Any questions? 😉

                                        (Presumably there's a way simpler solution that I don't see, but I think at least it is a solution)

                                        Doctor PhibesD Offline
                                        Doctor PhibesD Offline
                                        Doctor Phibes
                                        wrote on last edited by
                                        #19

                                        @Klaus said in Puzzle time - Coconuts and a monkey:

                                        Any questions? 😉

                                        What is the airspeed velocity of an unladen swallow?

                                        I was only joking

                                        1 Reply Last reply
                                        • jon-nycJ jon-nyc

                                          Seriously try your hand at it for real. But yes that’s the right number.

                                          AxtremusA Offline
                                          AxtremusA Offline
                                          Axtremus
                                          wrote on last edited by
                                          #20

                                          @jon-nyc said in Puzzle time - Coconuts and a monkey:

                                          Seriously try your hand at it for real. But yes that’s the right number.

                                          Don't see how Klaus' numerical answer can be correct.
                                          Actually I don't think there is a solution at all.
                                          It seems the problem is over-constraint.
                                          Maybe there is some ambiguity in the problem that I don't understand.

                                          "Five men and a monkey, marooned on an island, collect a pile of coconuts to be divided equally the next morning." ==> assuming they intend to divide the pile equally among the five men, then the number of coconuts in the initial pile would need to be a multiple of five. (Klaus' answer does not satisfy this criterion.)

                                          "During the night, however, one of the men decides he'd rather take his share now. He tosses one coconut to the monkey and removes exactly 1/5 of the remaining coconuts for himself." ==> this means, from the initial number of coconuts in the initial pile, after subtracting one from that number, the remaining pile is still divisible by five. This does not seem possible, as there is no "multiple of five" that is still divisible by five after subtracting one.

                                          taiwan_girlT KlausK 2 Replies Last reply
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups