yl91
yl91

Reputation: 31

Creating permutations of all possible non-repeated combinations within N elements

I was wondering if i) there is a name for the following combinatorics problem; ii) is there a way to code it within Matlab?

I have N elements, and would like to generate all possible permutations of non-repeated combinations with varying bracket sizes. For instance, for N = 5 elements, we have the following possible permutations:

Note that, within the brackets, order does not matter i.e. they are just combinations. But beyond the brackets, permutation must occur, for instance, (AB) (CDE) and (CDE) (AB) are two possible permutations.

Upvotes: 2

Views: 277

Answers (2)

yl91
yl91

Reputation: 31

Many thanks for all your responses. They are greatly appreciated. Someone from the Mathworks forum was able to answer it.

In short, the problem is a "Partition Problem", followed by the permutation of the solution generated.

http://www.mathworks.com/matlabcentral/answers/265601-creating-permutations-of-all-possible-non-repeated-combinations-within-n-elements#answer_207742

Upvotes: 1

John
John

Reputation: 5915

This is a partial answer to (i). You need to be aware of The Twelvefold Way. Almost certainly your question is an example of one of these, but from your description it is unclear to me which way it is.

Upvotes: 1

Related Questions