A circus has seven fenced enclosures, numbered 1 through 7, for two animals: a lion and a tiger. Each enclosure is connected to adjacent enclosures by interior gates. There are exactly eight such gates, each connecting one enclosure to exactly one other enclosure: enclosure 1 is connected to enclosures 2, 3 and 4; enclosure 3 to enclosures 1, 2, 4, and 5; and enclosure 5 to enclosures 3, 6, and 7. These gates provide the only connections between enclosures. Occasionally a trainer moves the animals. Taking either animals from one enclosure to an adjacent enclosure through a gate is called a "transfer."
The following conditions are strictly observed:
The two animals cannot be together in any enclosure or gate.
Transfers cannot occur simultaneously In moving either one animal or both to a specified enclosure or enclosures, the minimum number of trans- fers needed to achieve the specified result are used.