Find combinations without repetitions from a given set
Show older comments
Hi All,
I have a matrix b of size 119x42, I'm trying to find the combinations without repetitions, that results in a vector of the same number of columns (42). For each column only the values in the rows for that column can be used for the combinations. Some of the values in the rows are NaN, as for each column there are different number of possible values to use.
I have attached my exact file with the variable b, as the matrix is too big to post here. Any ideas of how to find these combinations without repetitions will be much appreciated.
Best, Martha
3 Comments
Image Analyst
on 4 Aug 2018
So is a combination one element picked from the rows in each of the 42 columns to produce a row vector 42 elements long? So you'd have 119 raised to the power of 42 different possible combinations. That's 1.5 times ten to the 87th power. Why do you think you want/need these?
Walter Roberson
on 4 Aug 2018
It isn't that bad. There are a lot of nan in some of the columns. There are only 4548722599534245782518243022870582858110732708610581264993179244953600000 possibilities.
Furthermore, the values are all small, all integers between 1 and 124, so they fit within uint8, so each row would only take 42 bytes, less than 2^247 bytes in total.
At 1 million values generated per second, it would take less than 1.5 x 10^59 years to generate.
Martha
on 4 Aug 2018
Accepted Answer
More Answers (0)
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!