a farmer must get a mouse, a cat and a block of cheese across the river. He will make three trips. He can not leave the cat and mouse together on either side and he can not leave the mouse and cheese together on either side. How will he get them across the river?

To get the mouse, cat, and block of cheese across the river safely, the farmer needs to plan his trips strategically, ensuring that the cat and mouse are never left alone together, and the mouse and cheese are not left alone together. Let's break it down step by step:

1. The farmer takes the mouse across the river and leaves it on the opposite side. This ensures the mouse is safely transported.

2. The farmer goes back alone without the mouse to the original side and takes the cat across the river. However, before leaving the cat, the farmer takes the mouse back with him to the original side. This ensures that the cat and mouse are not left alone together on any side.

3. The farmer leaves the mouse on the original side and takes the block of cheese across the river. Once on the opposite side, the farmer leaves the cheese and goes back alone to the original side.

4. Finally, the farmer takes the mouse across the river one last time. Now, all three companions are safely on the opposite side of the river: the mouse, the cat, and the block of cheese.

By carefully planning three separate trips and adhering to the conditions mentioned, the farmer successfully gets the mouse, cat, and block of cheese across the river without any issues.