I have a group of N
entities.
Is there any way for me to get all subgroups satisfy that the number of entities in each subgroup equals to M
(N>M
)?
I will give an example to clarify:
I have N = 5
integer (e.g: 1,3,4,6,8
).
Is there any way to get all subgroups which contains L = 3
entities?
Those subgroups are {1,3,4}
, {1,3,6}
, {1,3,8}
, {1,4,6}
, {1,4,8}
, {1,6,8}
, {3,4,6}
, ...
Seems that it must be a brute-force algorithm.
Thanks & regards