There are N boxes placed in a straight line. Adjacent boxes are separated by 1 unit.
The Babies which are a total of M in number decide to play in this arena of boxes by moving from one box to another. The rules that they follow while moving are as follows:
- At the onset of the play, all babies occupy the first M boxes, one baby per box.
- For the same baby the distance between two consecutive craters where baby stops is at most D units.
- Baby can move from only left to right. (assume that box number one is the leftmost one).
- In each box atmost one baby can reside.
- At the end of the game play all the babies must occupy the last M craters.
Calculate the number of ways the game can be played.
The sum of their positions goes from $M(M+1)/2$ to $M(M+1)/2+M(N-M)$.
So there are between M(N-M) and M(N-M)/D moves.
The number of different moves at any time is at most $MD$.
So there is less than $(MD)^{M(N-M)}$ games.