Re: Just some thousands of combinations...
- To: mathgroup at smc.vnet.net
- Subject: [mg109936] Re: Just some thousands of combinations...
- From: Scott Hemphill <hemphill at hemphills.net>
- Date: Tue, 25 May 2010 06:31:53 -0400 (EDT)
- References: <201005230717.DAA05139@smc.vnet.net> <htb32c$aai$1@smc.vnet.net>
- Reply-to: hemphill at alumni.caltech.edu
Patrick Scheibe <pscheibe at trm.uni-leipzig.de> writes:
> Hi,
>
> data = RandomSample[Subsets[Range[90], {5}], 3000];
>
> works fine here: "7.0 for Linux x86 (64-bit) (February 18, 2009)"
Yes, I have the same version. After execution, MathKernel was using
3505MB of virtual memory.
Scott
> On Sun, 2010-05-23 at 03:17 -0400, Dr. Bruno Campanini wrote:
>> 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
>>
>
>
--
Scott Hemphill hemphill at alumni.caltech.edu
"This isn't flying. This is falling, with style." -- Buzz Lightyear