How to calculate all the possible combinations of grouping n unique elements in groups with minimum 2 elements and maximum n elements.

-Each combination can be made of groups of different sizes.

-Not all the elements must be contained in a group.

Example of groups can be :

- (n) -> P(n,n)=1 permutation

- (2) (n-2) -> P(n,2) * P(n-2,n-2)

- (2) (2) (n-4) -> P(n,2) *P(n,2)* P(n-4,n-4)

- (2) (2) (2) (n-6) ->

- (2) (2) (3) (n-7) ->

....

with (2) (3) (2) (n-7) == (3) (2) (2) (n-7)

Many thanks in advance.

More Francesco Demetrio Minuto's questions See All
Similar questions and discussions