There are three cannibals and three missionaries--all distinguishable (looking different)--on one side of the river.
They have only 1 boat, which needs one person to operate it and can carry up to 2 people including the operator at a time. If, on either side of the river, the number of cannibals exceeds that of missionaries, the cannibals will eat them up.
In order for all of the cannibals and missionaries to successfully cross the river, the boat needs to make at least k trips, and there are n ways of doing so ( with k trips ) .
Find the value of k n .
This problem is a part of <Christmas Streak 2017> series .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Why ( 1 , 2 ) is not shown after ( 2 , 3 ) point above picture? I think it's also a possible way.
Log in to reply
(1,2) is not an acceptable state. There are more cannibals than missionaries on the other bank!
Log in to reply
Then how (0,3) is possible? because then their remains 3 cannibals in other bank where no any missionaries.
Log in to reply
@Md Mehedi Hasan – They have nobody to eat...
Log in to reply
@Mark Hennings – I see. The cannibals don't eat themselves. They only eat the missionaries when missionaries is fewer than the cannibals. Am I right now?
Consider the grid above. C represents the cannibals, and M represents the missionaries.
The grid shows how many cannibals and missionaries are on the starting riverside.
Since there shouldn't be more cannibals than missionaries, ( 2 , 1 ) , ( 3 , 1 ) , and ( 3 , 2 ) should be removed.
And since there shouldn't be more cannibals than missionaries on the other side too, ( 1 , 2 ) , ( 1 , 3 ) , and ( 2 , 3 ) should be removed.
When the boat is going away from the starting riverside, only the moves depicted above is possible.
And when the boat is returning to the starting riverside, only the moves depicted above is possible.
When crossing to the other side, we can easily find out that the dotted line and the normal line should be used alternatively.
Knowing that, and after trying some moves, we notice that the above moves are compulsory to move from the right area to the left area.
Let's draw this to calculate the number of cases.
C C M M M M M M C M M M C M C C M M C C C C C C ∣ C ∣ C C C ∣ C C ∣ C C M M ∣ C M ∣ C M M M ∣ M M M ∣ C C M M M 3 ways to select one C 3 ways to select two M’s 4 ways to select one C and one M 3 ways to select two C’s
So the compulsory path has 3 × 3 × 4 × 3 = 1 0 8 cases.
Then all we have to do is start from ( 3 , 3 ) and arrive to ( 2 , 3 ) using dotted line in the end.
Then we see that there are two possible cases.
C C C M M M C C M M C C M M M ∣ ∣ C M ∣ C 9 ways to select one C and one M
9 cases possible.
C C C M M M C M M M C C M M M ∣ ∣ C C ∣ C 3 ways to select two C’s 2 ways to select one C
6 cases possible.
So there are 15 ways to go from ( 3 , 3 ) to ( 2 , 3 ) .
Using the same method, there are 5 ways to go from ( 1 , 0 ) to ( 0 , 0 ) . (Note that it's not symmetrical!)
Therefore, there are a total of 5 × 1 0 8 × 1 5 = 8 1 0 0 ways to cross the river, and it takes 1 1 moves.
∴ n k = 1 1 × 8 1 0 0 = 8 9 1 0 0 .
Problem Loading...
Note Loading...
Set Loading...
That k = 1 1 is a well-known result. If ( c , m ) represents the state where there are c cannibals and m missionaries on the starting bank, we need to move from state ( 3 , 3 ) to state ( 0 , 0 ) . If the cannibals and missionaries are indistinguishable (except, of course, as being cannibals or not), there are exactly 4 ways of making the trip in k = 1 1 moves, shown in the diagram below:
Since the cannibals and missionaries are distinguishable, each leg of the journey can be achieved in a number of ways, and these are indicated by the red weights on each leg. For example, to move from ( 3 , 3 ) to ( 2 , 2 ) , one cannibal and one missionary need to be chosen out of a choice of three of each, and this can be done in 9 ways. Thus n = ( 9 × 1 + 3 × 2 ) × 1 × 3 × 3 × 4 × 1 × 1 × 3 × ( 3 × 1 + 2 × 1 ) = 8 1 0 0 making the answer 1 1 × 8 1 0 0 = 8 9 1 0 0 .