MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Just some thousands of combinations...


Hi Bruno,
try e.g.:
Table[ Subsets[
   Range[90], {5}, {RandomInteger[{1, 43949268}]}], {3000}]

cheers, Daniel

Am 23.05.2010 09:17, schrieb Dr. Bruno Campanini:
> Subsets[Range[90],{5}]  should print all the
> Binomial[90,5] = 43 949 268 combinations.
>
> On my PC (4gb RAM) Mathematica 7.0 claims
> "Not enough memory".
>
> By the way, I only need to print some thousands
> of these combinations, then Subsets[Range[90],{5}, 3000]
> works fine.
> But it prints the first 3000 combination in lexicographic
> order. How to get 3000 random out of 43 949 268, not
> ordered?
>
> Bruno
>


-- 

Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh at metrohm.com>
Internet:<http://www.metrohm.com>



  • Prev by Date: Re: Dot product confusion
  • Next by Date: Re: Dot product confusion
  • Previous by thread: Re: Just some thousands of combinations...
  • Next by thread: Re: Just some thousands of combinations...