Monday, February 16, 2009

Missionaries and Cannibals /传教士和野人问题

3 missionaries & 3 cannibals are on one side of a river, along with a boat that can hold one or two people. Find out a way to get everyone to the other side, without ever leaving a group of missionaries in one place outnumbered by the cannibals in that place.

传教士和野人问题是一个经典的智力游戏问题。 有3个传教士和3个野人来到河边准备渡河,河岸有一条船,每次至多可供2人乘渡。问传教士为了安全起见,应如何规划摆渡方案,使得任何时刻,在河的两岸以及船上的野人数目总是不超过传教士的数目。即求解传教士和野人从左岸全部摆渡到右岸的过程中,任何时刻满足M(传教士数)≥C(野人数)和M+C≤2的摆渡方案。



L/R : Left/Right side of the river. M = missionaries, c=cannibal,b = boat
****************************************************************************************************************************************

No comments:

Post a Comment

人生,只是一个过程。
Life Is a process.

相爱,是接受。接受,是爱的其一表现。
To love,is to accept. Acceptance is a form of love.
生活;就是将生与死,连接的一条线
Between live and death, there is a line connecting them both, which is call Life
思想决定行动,行动决定习惯,习惯决定品德,品德决定命运。
sow a thought, reap an action;sow an action, reap a habit;sow a habit, reap a character; sow a character, reap a destiny.
相信,就会还有。
不相信, 就连有得都变没有。.
希望。。在人间!
"事情是这样,就不会是别样“。。
很多事情,因为某些障碍,我表达和反应不来,但我真得很用心去想和做。。。

Thanks for visiting!