We can use $A$ to represent the side of the river where the farmer is at the beginning, and use $B$ to represent the other side.  The first time, take the cat from $A$ to $B$.  The second time, the farmer go back to $A$.  The third time, take the fish from $A$ to $B$.  The fourth time, take the cat from $B$ to $A$.  The fifth time, take the dog from $A$ to $B$.  The sixth time, the farmer go back to $A$.  The seventh time, take the cat from $A$ to $B$. 
The farmer has a fish, a cat, and a dog. He wants to take them cross the river by boat, and he can only take one animal each time. When the farmer is away, the cat cannot be put with the fish or the dog, or they will fight. The boat makes one trip from one side of the river to the other side, so it takes~\uline{~~~~~~~~~~}~trips in total to carry all the animals and farmers cross the river. 

a. $$3$$ 
b. $$4$$ 
c. $$5$$ 
d. $$6$$ 
e. $$7$$ 