matlab - Creating permutations of all possible non-repeated combinations within N elements -
i wondering if i) there name following combinatorics problem; ii) there way code within matlab?
i have n elements, , generate possible permutations of non-repeated combinations varying bracket sizes. instance, n = 5 elements, have following possible permutations:
- max group combination size of 5: (abcde)
- max group combination size of 4: (a) (bcde); (bcde) (a); (b) (acde); (acde) (b); (c) (abde); (d) (abce); (e)(abcd) etc.
- max group combination size of 3: (ab) (cde); (a) (b) (cde); (ac) (bcd); (a) (c) (bcd) etc.
- max group combination size of 2: (ab) (cd) (e); (ab) (c) (d) (e); (ab) (ce) (d) etc.
- max group combination size of 1: (a) (b) (c) (d) (e); (b) (c) (d) (e) (a); etc.
note that, within brackets, order not matter i.e. combinations. beyond brackets, permutation must occur, instance, (ab) (cde) , (cde) (ab) 2 possible permutations.
this partial answer (i). need aware of the twelvefold way. question example of 1 of these, description unclear me way is.
Comments
Post a Comment