登录
首页 » Java Develop » 用谓词表示法表示修道士和野人的问题 在河的左岸有三个修道士,三个野人和一条船,修道士想用这条船把所有的人都运到河对岸,但要受到以下条件限制: (1) 修道士和野...

用谓词表示法表示修道士和野人的问题 在河的左岸有三个修道士,三个野人和一条船,修道士想用这条船把所有的人都运到河对岸,但要受到以下条件限制: (1) 修道士和野...

于 2022-06-17 发布 文件大小:47.07 kB
0 68
下载积分: 2 下载次数: 1

代码说明:

用谓词表示法表示修道士和野人的问题 在河的左岸有三个修道士,三个野人和一条船,修道士想用这条船把所有的人都运到河对岸,但要受到以下条件限制: (1) 修道士和野人都会划船,但船一次只能装运两个人。 (2) 在任何岸边,野人数不能超过修道士,否则修道士会被野人吃掉。 假定野人愿意服从任何一种过河安排,请规划出一种确保修道士安全的过河方案。要求写出所用谓词的定义、功能及变量的个体域。-used predicate said France monks and Savage said the problem in the left bank of the river three monks, and a savage three boats, monks want to use the boat for all the people to go t he other side of the river, but are subject to the following conditions : (a) monks and Savage will be rowed, but only a ship loaded Win two people. (2) In any shore, should not exceed the number of wild monks, the monks would otherwise be eaten Savage. Savage is willing to submit to the assumption that any river, please draw up a security to ensure the monks of the river program. Asked predicate used to write the definition of functions and variables of individual jurisdictions.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696524资源总数
  • 103920会员总数
  • 65今日下载