Maximum possible ways of distribution

57 Views Asked by At

I want to know how can we find the maximum possible ways of distributing 'K' colors marbles among 'N' people of a family in any hierarchy of our choice (hierarchy which can have maximum possible ways is taken) such that no child has same color marble with him as of his parent i.e. immediate ancestor.

The model of the family is as such that there should be a Head of the family who does not have any parent and then there are children, any member of family can have any no of children ranging from 0 to N-1, head can also have rest N-1 members as his children, or any other hierarchy could be made to have maximum no of ways.

P.S. we can assume we have infinite marbles of every color available with us and every person should get a marble.

example: for N=3 and K=3 we can have 12 possible ways such that Hierarchy to maximize the number of possibilities is A is the parent of B, B is the parent of C. And in this hierarchy of family we can have 12 possible ways of distribution.

1

There are 1 best solutions below

1
On

The hierarchy doesn't matter. There are $K(K-1)^{N-1}$ possibilities in any hierarchy, since the head of the family can have any of $K$ colours and each of the $N-1$ others can have any of $K-1$ colours.