You just entered a strange town. The town is currently inhabited by M monsters and B bunnies.
The inhabitants interact in the following way: Whenever two bunnies meet, nothing happens.
Whenever a monster meets a bunny, the monster eats the bunny.
Whenever two monsters meet, they start fighting and they both die in the fight.
Whenever you meet a bunny, you can decide whether you kill it or not.
A bunny will never kill you. You can not kill a monster. However, if you meet a monster, it will kill you without
All the town's inhabitants roam the town at random. More precisely, we will make the following assumptions.
- Meetings will occur at different moments in time.
- Each time exactly two beings will meet.
- Those two beings are always chosen uniformly at random from the set of all living beings in town, including you.
You win if at some moment you can not be killed anymore.
You are not allowed to leave the town until you either win or get killed.
Write a method that will calculate the expected probability that you will win.