Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • 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
Code Project
  1. Home
  2. The Lounge
  3. Puzzle help

Puzzle help

Scheduled Pinned Locked Moved The Lounge
csshelp
29 Posts 14 Posters 0 Views 1 Watching
  • 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.
  • D David Crow

    On a moments notice, I presented the following puzzle to a youth group last night. After 15-20 minutes, they had not found a solution. As a matter of fact, they could not make one complete trip across the river and back. As we were out of time, I told them I'd work on it and get back with them on a future Monday.

    Set out three chairs to denote seating in a boat.

    Identify two opposite shorelines—about 5 feet apart. Place the chairs in the center to denote the boat that goes back and forth between the opposite shores. Create two groups of equal count (leader can play to make count even)—one group of “pirates” and the other group of “cannibals.”

    Explain: “Pirates, your objective is to take your captive cannibals safely across this body of water (pointing) to your home island (pointing to other side). Your mode of transportation is this boat (pointing to chairs), which accommodates only three people at a time. You’ll get in and out of the boat to identify who’s on board either going or coming from your home island.

    “Your booty—the cannibals—are very dangerous. If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you. The boat may be manned by one person, but don’t let a cannibal be left alone anywhere as he or she will escape...and maybe take the boat! Given the rising tide, you need to get everyone to the safety of your home island in the next 10 minutes.

    Monitor to make sure cannibals do not outnumber pirates on either shore or in the boat, and that cannibals are not left alone.

    When I got around to looking at it last night, I too could not find a solution. I only found one way to initially get across the river (2 pirates & 1 cannibal), but then could not find a way to make it back across.

    "One man's wage rise is another man's price increase." - Harold Wilson

    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

    "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

    C Offline
    C Offline
    Clifford Nelson
    wrote on last edited by
    #14

    There is obviously no solution. You cannot leave a cannible with only one pirate, and you cannot let the cannibals outnumber the pirates on either bank. First time you cross with a cannibal, you need two pirates, but that means that the pirates that are left on the other bank are outnumbered => eaten. When you get to the other side, you cannot get the boat back accross without leaving the cannibal with only a single pirate. I would go back to the source to discover where you screwed up.

    L D 2 Replies Last reply
    0
    • W wizardzz

      Ohhh, well, man eating booty is much different than cannibals. Probably lost in translation.

      B Offline
      B Offline
      Big Daddy Farang
      wrote on last edited by
      #15

      You see that line there just to the left of you? You know what line that is, right? Yes, the KSS line. Just sayin'.

      BDF I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be. -- BillWoodruff

      1 Reply Last reply
      0
      • C Clifford Nelson

        There is obviously no solution. You cannot leave a cannible with only one pirate, and you cannot let the cannibals outnumber the pirates on either bank. First time you cross with a cannibal, you need two pirates, but that means that the pirates that are left on the other bank are outnumbered => eaten. When you get to the other side, you cannot get the boat back accross without leaving the cannibal with only a single pirate. I would go back to the source to discover where you screwed up.

        L Offline
        L Offline
        lewax00
        wrote on last edited by
        #16

        Browsing the code I have, you're right. In the original problem: a) One pirate and one cannibal is a valid state b) The boat only has 2 seats, not 3 c) Cannibals can be left alone

        C 1 Reply Last reply
        0
        • D David Crow

          On a moments notice, I presented the following puzzle to a youth group last night. After 15-20 minutes, they had not found a solution. As a matter of fact, they could not make one complete trip across the river and back. As we were out of time, I told them I'd work on it and get back with them on a future Monday.

          Set out three chairs to denote seating in a boat.

          Identify two opposite shorelines—about 5 feet apart. Place the chairs in the center to denote the boat that goes back and forth between the opposite shores. Create two groups of equal count (leader can play to make count even)—one group of “pirates” and the other group of “cannibals.”

          Explain: “Pirates, your objective is to take your captive cannibals safely across this body of water (pointing) to your home island (pointing to other side). Your mode of transportation is this boat (pointing to chairs), which accommodates only three people at a time. You’ll get in and out of the boat to identify who’s on board either going or coming from your home island.

          “Your booty—the cannibals—are very dangerous. If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you. The boat may be manned by one person, but don’t let a cannibal be left alone anywhere as he or she will escape...and maybe take the boat! Given the rising tide, you need to get everyone to the safety of your home island in the next 10 minutes.

          Monitor to make sure cannibals do not outnumber pirates on either shore or in the boat, and that cannibals are not left alone.

          When I got around to looking at it last night, I too could not find a solution. I only found one way to initially get across the river (2 pirates & 1 cannibal), but then could not find a way to make it back across.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

          J Offline
          J Offline
          jesarg
          wrote on last edited by
          #17

          You screwed up the problem; there are a number of similar problems with varying restrictions, and it looks like you added restrictions from two different problems. You can either have the no-outnumbering restriction or the no-alone restriction, not both; those are from two different problems.

          D 1 Reply Last reply
          0
          • D David Crow

            On a moments notice, I presented the following puzzle to a youth group last night. After 15-20 minutes, they had not found a solution. As a matter of fact, they could not make one complete trip across the river and back. As we were out of time, I told them I'd work on it and get back with them on a future Monday.

            Set out three chairs to denote seating in a boat.

            Identify two opposite shorelines—about 5 feet apart. Place the chairs in the center to denote the boat that goes back and forth between the opposite shores. Create two groups of equal count (leader can play to make count even)—one group of “pirates” and the other group of “cannibals.”

            Explain: “Pirates, your objective is to take your captive cannibals safely across this body of water (pointing) to your home island (pointing to other side). Your mode of transportation is this boat (pointing to chairs), which accommodates only three people at a time. You’ll get in and out of the boat to identify who’s on board either going or coming from your home island.

            “Your booty—the cannibals—are very dangerous. If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you. The boat may be manned by one person, but don’t let a cannibal be left alone anywhere as he or she will escape...and maybe take the boat! Given the rising tide, you need to get everyone to the safety of your home island in the next 10 minutes.

            Monitor to make sure cannibals do not outnumber pirates on either shore or in the boat, and that cannibals are not left alone.

            When I got around to looking at it last night, I too could not find a solution. I only found one way to initially get across the river (2 pirates & 1 cannibal), but then could not find a way to make it back across.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

            R Offline
            R Offline
            Roger Wright
            wrote on last edited by
            #18

            Cut each cannibal into thirds, then have each pirate carry one third across, two at a time. Re-assembly is left as an exercise for the student.

            Will Rogers never met me.

            B L 2 Replies Last reply
            0
            • R Roger Wright

              Cut each cannibal into thirds, then have each pirate carry one third across, two at a time. Re-assembly is left as an exercise for the student.

              Will Rogers never met me.

              B Offline
              B Offline
              Big Daddy Farang
              wrote on last edited by
              #19

              Good plan. I'd also suggest putting a number on each piece of the same cannibal to make it easier to get the correct pieces back together.

              BDF I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be. -- BillWoodruff

              1 Reply Last reply
              0
              • D David Crow

                On a moments notice, I presented the following puzzle to a youth group last night. After 15-20 minutes, they had not found a solution. As a matter of fact, they could not make one complete trip across the river and back. As we were out of time, I told them I'd work on it and get back with them on a future Monday.

                Set out three chairs to denote seating in a boat.

                Identify two opposite shorelines—about 5 feet apart. Place the chairs in the center to denote the boat that goes back and forth between the opposite shores. Create two groups of equal count (leader can play to make count even)—one group of “pirates” and the other group of “cannibals.”

                Explain: “Pirates, your objective is to take your captive cannibals safely across this body of water (pointing) to your home island (pointing to other side). Your mode of transportation is this boat (pointing to chairs), which accommodates only three people at a time. You’ll get in and out of the boat to identify who’s on board either going or coming from your home island.

                “Your booty—the cannibals—are very dangerous. If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you. The boat may be manned by one person, but don’t let a cannibal be left alone anywhere as he or she will escape...and maybe take the boat! Given the rising tide, you need to get everyone to the safety of your home island in the next 10 minutes.

                Monitor to make sure cannibals do not outnumber pirates on either shore or in the boat, and that cannibals are not left alone.

                When I got around to looking at it last night, I too could not find a solution. I only found one way to initially get across the river (2 pirates & 1 cannibal), but then could not find a way to make it back across.

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                M Offline
                M Offline
                Michael Sernal
                wrote on last edited by
                #20

                Is it possible to tie the cannibals up before you leave? tie them up in a chair and the chair to the boat? Or this might work "kill one and you might save a thousand" - Wanted

                1 Reply Last reply
                0
                • L lewax00

                  Browsing the code I have, you're right. In the original problem: a) One pirate and one cannibal is a valid state b) The boat only has 2 seats, not 3 c) Cannibals can be left alone

                  C Offline
                  C Offline
                  Clifford Nelson
                  wrote on last edited by
                  #21

                  Still have a problem, if you have an even number of pirates and canabales and you are one of the pirates. You take the canibal over, no problem. You take another pirate over => leave more canabals than pirates on original bank => pirates on original bank are eaten.

                  L 1 Reply Last reply
                  0
                  • C Clifford Nelson

                    Still have a problem, if you have an even number of pirates and canabales and you are one of the pirates. You take the canibal over, no problem. You take another pirate over => leave more canabals than pirates on original bank => pirates on original bank are eaten.

                    L Offline
                    L Offline
                    lewax00
                    wrote on last edited by
                    #22

                    Ah right. The cannibals can also operate the boat in the problem I worked with (specifically, this version[^]). In which case the solution looks like this (in terms of the state of the starting side at each crossing): (Pirates Cannibals Boats) (3 3 1) (2 2 0) (3 2 1) (3 0 0) (3 1 1) (1 1 0) (2 2 1) (0 2 0) (0 3 1) (0 1 0) (1 1 1) (0 0 0) (Playing with this code makes me want to do something with a functional language again...Scheme is fun to write, but horrible to try and read again later :laugh: )

                    1 Reply Last reply
                    0
                    • R Roger Wright

                      Cut each cannibal into thirds, then have each pirate carry one third across, two at a time. Re-assembly is left as an exercise for the student.

                      Will Rogers never met me.

                      L Offline
                      L Offline
                      lewax00
                      wrote on last edited by
                      #23

                      Or, the pirates then eat the cut up cannibals (or just one I suppose), becoming cannibals themselves, and then there is no longer a problem, because everyone can get along now that they belong to the same clique.

                      1 Reply Last reply
                      0
                      • C Clifford Nelson

                        There is obviously no solution. You cannot leave a cannible with only one pirate, and you cannot let the cannibals outnumber the pirates on either bank. First time you cross with a cannibal, you need two pirates, but that means that the pirates that are left on the other bank are outnumbered => eaten. When you get to the other side, you cannot get the boat back accross without leaving the cannibal with only a single pirate. I would go back to the source to discover where you screwed up.

                        D Offline
                        D Offline
                        David Crow
                        wrote on last edited by
                        #24

                        Clifford Nelson wrote:

                        ...discover where you screwed up.

                        I'm not the author, just the messenger.

                        "One man's wage rise is another man's price increase." - Harold Wilson

                        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                        1 Reply Last reply
                        0
                        • J jesarg

                          You screwed up the problem; there are a number of similar problems with varying restrictions, and it looks like you added restrictions from two different problems. You can either have the no-outnumbering restriction or the no-alone restriction, not both; those are from two different problems.

                          D Offline
                          D Offline
                          David Crow
                          wrote on last edited by
                          #25

                          jesarg wrote:

                          You screwed up the problem; there are a number of similar problems with varying restrictions, and it looks like you added restrictions from two different problems.

                          I'm not the author, just the messenger. The puzzle is in its original form.

                          "One man's wage rise is another man's price increase." - Harold Wilson

                          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                          "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                          1 Reply Last reply
                          0
                          • D David Crow

                            On a moments notice, I presented the following puzzle to a youth group last night. After 15-20 minutes, they had not found a solution. As a matter of fact, they could not make one complete trip across the river and back. As we were out of time, I told them I'd work on it and get back with them on a future Monday.

                            Set out three chairs to denote seating in a boat.

                            Identify two opposite shorelines—about 5 feet apart. Place the chairs in the center to denote the boat that goes back and forth between the opposite shores. Create two groups of equal count (leader can play to make count even)—one group of “pirates” and the other group of “cannibals.”

                            Explain: “Pirates, your objective is to take your captive cannibals safely across this body of water (pointing) to your home island (pointing to other side). Your mode of transportation is this boat (pointing to chairs), which accommodates only three people at a time. You’ll get in and out of the boat to identify who’s on board either going or coming from your home island.

                            “Your booty—the cannibals—are very dangerous. If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you. The boat may be manned by one person, but don’t let a cannibal be left alone anywhere as he or she will escape...and maybe take the boat! Given the rising tide, you need to get everyone to the safety of your home island in the next 10 minutes.

                            Monitor to make sure cannibals do not outnumber pirates on either shore or in the boat, and that cannibals are not left alone.

                            When I got around to looking at it last night, I too could not find a solution. I only found one way to initially get across the river (2 pirates & 1 cannibal), but then could not find a way to make it back across.

                            "One man's wage rise is another man's price increase." - Harold Wilson

                            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                            "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                            M Offline
                            M Offline
                            Member 2053006
                            wrote on last edited by
                            #26

                            A bit of a cheat really, but here goes (assuming 3 pirates and 3 cannibals: a) 1 pirate and 1 cannibal crosses. Kick the cannibal off of the boat on to the island (the cannibal runs away - but can be caught later - it is on an island). b) 1 pirate rows back. c) 2 pirates and 1 cannibal crosses to the island leaving 1 cannibal and 1 pirate waiting to cross. Kick the second cannibal off the boat on to the island (and, guess what - that cannibal also runs away.) d) 2 pirates row back. e) 2 pirates and 1 cannibal crosses to the island leaving 1 pirate waiting to cross. f) Kick the third cannibal off the boat on to the island. Note: the two pirates are not outnumbered, as they are on the boat and the cannibals are on the island. g) 2 pirates row back. h) All three pirates row across and round up the cannibals.

                            D 1 Reply Last reply
                            0
                            • M Member 2053006

                              A bit of a cheat really, but here goes (assuming 3 pirates and 3 cannibals: a) 1 pirate and 1 cannibal crosses. Kick the cannibal off of the boat on to the island (the cannibal runs away - but can be caught later - it is on an island). b) 1 pirate rows back. c) 2 pirates and 1 cannibal crosses to the island leaving 1 cannibal and 1 pirate waiting to cross. Kick the second cannibal off the boat on to the island (and, guess what - that cannibal also runs away.) d) 2 pirates row back. e) 2 pirates and 1 cannibal crosses to the island leaving 1 pirate waiting to cross. f) Kick the third cannibal off the boat on to the island. Note: the two pirates are not outnumbered, as they are on the boat and the cannibals are on the island. g) 2 pirates row back. h) All three pirates row across and round up the cannibals.

                              D Offline
                              D Offline
                              David Crow
                              wrote on last edited by
                              #27

                              Member 2053006 wrote:

                              a) 1 pirate and 1 cannibal crosses.

                              Can't be left alone in boat.

                              "One man's wage rise is another man's price increase." - Harold Wilson

                              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                              "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                              1 Reply Last reply
                              0
                              • D David Crow

                                On a moments notice, I presented the following puzzle to a youth group last night. After 15-20 minutes, they had not found a solution. As a matter of fact, they could not make one complete trip across the river and back. As we were out of time, I told them I'd work on it and get back with them on a future Monday.

                                Set out three chairs to denote seating in a boat.

                                Identify two opposite shorelines—about 5 feet apart. Place the chairs in the center to denote the boat that goes back and forth between the opposite shores. Create two groups of equal count (leader can play to make count even)—one group of “pirates” and the other group of “cannibals.”

                                Explain: “Pirates, your objective is to take your captive cannibals safely across this body of water (pointing) to your home island (pointing to other side). Your mode of transportation is this boat (pointing to chairs), which accommodates only three people at a time. You’ll get in and out of the boat to identify who’s on board either going or coming from your home island.

                                “Your booty—the cannibals—are very dangerous. If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you. The boat may be manned by one person, but don’t let a cannibal be left alone anywhere as he or she will escape...and maybe take the boat! Given the rising tide, you need to get everyone to the safety of your home island in the next 10 minutes.

                                Monitor to make sure cannibals do not outnumber pirates on either shore or in the boat, and that cannibals are not left alone.

                                When I got around to looking at it last night, I too could not find a solution. I only found one way to initially get across the river (2 pirates & 1 cannibal), but then could not find a way to make it back across.

                                "One man's wage rise is another man's price increase." - Harold Wilson

                                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                                "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                                B Offline
                                B Offline
                                Bassam Abdul Baki
                                wrote on last edited by
                                #28

                                DavidCrow wrote:

                                If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you.

                                I'm taking this to mean the following: 1. 1 pirate on his own with at least one cannibal is dead. 2. 2 or more pirates with the same number of cannibals are fine. 3. 2 or more pirates with a greater amount of cannibals would kill all the pirates. For an equal amount of players, there is no solution since 1P and 1C on the boat is not allowed and 2P and 1C would result in the remainder of pirates being eaten. However, if there was one more pirate than cannibals, then a solution would exist. Edit: Unless of course it is a 2P and 2C problem.

                                Web - BM - RSS - Math - LinkedIn

                                1 Reply Last reply
                                0
                                • D David Crow

                                  On a moments notice, I presented the following puzzle to a youth group last night. After 15-20 minutes, they had not found a solution. As a matter of fact, they could not make one complete trip across the river and back. As we were out of time, I told them I'd work on it and get back with them on a future Monday.

                                  Set out three chairs to denote seating in a boat.

                                  Identify two opposite shorelines—about 5 feet apart. Place the chairs in the center to denote the boat that goes back and forth between the opposite shores. Create two groups of equal count (leader can play to make count even)—one group of “pirates” and the other group of “cannibals.”

                                  Explain: “Pirates, your objective is to take your captive cannibals safely across this body of water (pointing) to your home island (pointing to other side). Your mode of transportation is this boat (pointing to chairs), which accommodates only three people at a time. You’ll get in and out of the boat to identify who’s on board either going or coming from your home island.

                                  “Your booty—the cannibals—are very dangerous. If you are alone with one, the cannibal will eat you. If you are outnumbered by the cannibals, they will eat you. The boat may be manned by one person, but don’t let a cannibal be left alone anywhere as he or she will escape...and maybe take the boat! Given the rising tide, you need to get everyone to the safety of your home island in the next 10 minutes.

                                  Monitor to make sure cannibals do not outnumber pirates on either shore or in the boat, and that cannibals are not left alone.

                                  When I got around to looking at it last night, I too could not find a solution. I only found one way to initially get across the river (2 pirates & 1 cannibal), but then could not find a way to make it back across.

                                  "One man's wage rise is another man's price increase." - Harold Wilson

                                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                                  "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                                  K Offline
                                  K Offline
                                  Kschuler
                                  wrote on last edited by
                                  #29

                                  DavidCrow wrote:

                                  The boat may be manned by one person...

                                  This implies that boat doesn't HAVE to be manned by anyone. Tie a rope to the boat. Take 2 pirates and 1 cannibal across. Pull the boat back to the other side via the rope with no one inside it. Rinse and repeat.

                                  1 Reply Last reply
                                  0
                                  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
                                  • World
                                  • Users
                                  • Groups