Brain Teasers | Tiger and Sheep

Question: 



One hundred tigers and one sheep arc are put on a magic island that only has grass. Tigers can eat grass, but they would rather eat sheep

Assume:  

A. Each time only one tiger can eat one sheep, and that tiger itself will become a sheep after it cats the sheep.  

B. All tigers are smart and perfectly rational and they want to survive. So will the sheep be eaten?  

 

Solution: 

 

Let no of tigers = n 

 

Let's start with 1 tiger(n=1). 

Since there is only one tiger it will definitely eat the sheep as there will be no more tigers to eat him once he becomes a sheep. 

  

With n=2 tigers, 

If any of the tigers eat the sheep, it will become a sheep itself so the other tiger who is left will definitely eat him. So none of the tigers will eat the sheep. 

 

With n=3 tigers, 

The sheep will be eaten since each tiger realizes that once it becomes a sheep there will be two tigers left and none of the two tigers will eat the sheep. So the first tiger to realize this will eat the sheep. 

 

With n=4 tigers, 

Each tiger realizes that once it becomes a sheep it will be eaten as three tigers will be left. So none of the tigers will eat the sheep. 

 

 

In general: 

 

When n = odd, the sheep will be eaten 

When n = even, the sheep will not be eaten. 

 

For the given question where n= 100, the sheep will not be eaten. 


https://medium.com/@priyankadalmia2009/brain-teasers-tiger-and-sheep-51897da28c8e


Comments

  1. That sheep will be eaten is true only for n = 3. For n > 3, it will not be eaten. How could you generalize it for even and odd ?

    ReplyDelete

Post a Comment

Popular posts from this blog

Brain Teasers | Screwy Pirates

Determine Weight of Counterfeit coins [Asked in GS Interview]