About Lesson
We’ll use the following abbreviations:
- R: Robot
- F: Fox
- C: Chicken
- CF: Chicken-feed
The starting state is NNNN (robot, fox, chicken, and chicken-feed all on the near side), and the goal state is FFFF (all on the far side).
Now, let’s analyze the forbidden states:
- NFFN: In this state, the fox and chicken are on the far side together. The fox would eat the chicken.
- NFFF: Here, the fox, chicken, and chicken-feed are all on the far side. Again, the fox would eat the chicken.
- FNNF: In this state, the robot and chicken-feed are on the near side, while the fox and chicken are on the far side. The fox would eat the chicken.
- FNNN: The robot is on the near side, while the others are on the far side. The chicken would be left alone with the fox.
- NNFF: The robot and chicken-feed are on the near side, and the fox and chicken are on the far side. The chicken would be left alone with the fox.
- FFNN: The robot is on the far side, while the others are on the near side. The chicken would be left alone with the fox.
After eliminating these forbidden states, we’re left with the following ten valid states:
- NNNN
- NNNF
- NNCF
- NNCN
- NCCN
- NCCF
- FNNN
- FNNF
- FFNN
- FFCF
Here’s a concise summary of the fox, chicken, and grain puzzle solution:
-
State Representation: We assign short names (NNNN, FFFF, etc.) to states for simplicity.
-
Forbidden States: Eliminate states with conflicts (e.g., fox eating chicken).
-
Transition Diagram: Symmetric transitions (NNNN to FNFN, FNFF, FFNF, or FFFN).
-
Solution Path: Robot moves fox, chicken, and grain to FFFF.
Join the conversation