Trolls ( marked "T") and elves (marked "E") live on the bridge as shown.
A troll always eats any goat that crosses his path.
An elf transforms any goat into a cow or any cow into a goat.
A troll turns a bear into a cow, while an elf leaves a bear unchanged.
A cow, a bear, and a goat leave the dry desert and head for the lush pasture across the water. No animal can pass an elf or troll more than once. Each animal wants to get to the pasture in the same shape as he or she left the desert if possible, and prefers life over death. Each animal will take the shortest route possible, given those goals.
What route should the cow, the goat and the bear take?
See the solution