All combination of certain min size
1 view (last 30 days)
Show older comments
Hi, I need to compute all possible combination out of 70 assets that include at least 20 of them.
A binary 0/1 index output would be ideal.
Thanks
1 Comment
the cyclist
on 17 Jan 2012
I estimate that there are 2.6e17 ways to do that. What exactly is it that you want?
Accepted Answer
Walter Roberson
on 17 Jan 2012
Because of the "at least 20 of them", there will be 1180493606926365010344 of them. It would be a lot shorter to calculate the asset combinations that are not included; there are only 98013791046293080 of those.
0 Comments
More Answers (2)
Sean de Wolski
on 17 Jan 2012
nchoosek(70,20)
Warning: Result may not be exact. Coefficient is greater than 1.000000e+015 and is only accurate to 15 digits > In nchoosek at 64
ans =
1.6188e+017
So it's going to take a really long time and use most of the computer memory in the world to do this:
0 Comments
See Also
Categories
Find more on Waveform Generation 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!