MathGroup Archive 2010

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

Search the Archive

Re: Just some thousands of combinations...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109958] Re: Just some thousands of combinations...
  • From: dh <dh at metrohm.com>
  • Date: Wed, 26 May 2010 07:10:01 -0400 (EDT)
  • References: <htakq5$509$1@smc.vnet.net>

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...