Reputation: 31
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
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.
Upvotes: 1
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