mbmelgo/CMSC141_MP2
Binibining Comsci Problems (Deterministic Finite Automata) Intro: Once upon a time, Binibining Comsci was taking her pet lion, her pet rabbit, and a carrot back to her farm. She came to a river, and had to get all three possessions (lion, rabbit, carrot) across the east bank. Because of the nature of the river, she could only carry one possession across at a time. This means that she had to leave the other two possessions on the shore while she carried the one across. The problem is that, the lion would eat the rabbit if unattended, and the rabbit would eat the carrot if unattended. The lion could be left with the carrot safely, of course. What sequence would the man need to take his possessions across, in order not to have any of them eaten?
Java