Five people - Alice, Bob, Carlos, Diana, and Elena - must cross a river in a small boat. The boat can only hold three people at a time. The following conditions apply:
* Alice refuses to be in the boat with Carlos
* Bob and Diana must travel together if either one is in the boat
* Elena can only operate the boat when Carlos is not present
* At least one person in each crossing must know how to operate the boat
* Only Bob, Carlos, and Elena know how to operate the boat
Infer an efficient plan.
五個人 - Alice、Bob、Carlos、Diana和Elena - 必須搭乘一艘小船過河。這艘船一次最多只能載三人。以下是限制條件:
- Alice拒絕與Carlos同船
- Bob和Diana如果其中一人坐船,兩人必須一起坐
- 只有當Carlos不在船上時,Elena才能操作船
- 每次過河時船上至少要有一個會操作船的人
- 只有Bob、Carlos和Elena會操作船
讓我們來分析一下並找出有效的過河方案。
No comments:
Post a Comment