Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: Walter Roberson <roberson@hushmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: NchooseK
Date: Tue, 09 Mar 2010 18:40:30 -0600
Organization: Canada Eat The Cookie Foundation
Lines: 9
Message-ID: <hn6qam$sv7$1@canopus.cc.umanitoba.ca>
References: <hn6mt9$9kb$1@fred.mathworks.com>
NNTP-Posting-Host: ibd-nat.ibd.nrc.ca
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: canopus.cc.umanitoba.ca 1268182166 29671 192.70.172.18 (10 Mar 2010 00:49:26 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Wed, 10 Mar 2010 00:49:26 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
In-Reply-To: <hn6mt9$9kb$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:615463

Frank Sabouri wrote:
> Hello -
> 
> I have problem of memory when I run: NK=nchoosek (1:N,K), in which N is 
>  >40. I need to generate a "NK", wherein "N" is 140. Does anyone know 
> how I could deal with this problem?!

What is your K? With N = 140, K = 4 requires about 116 Mb, and K = 5 requires 
over 3 Gb. K = 10 requires about 4 petabytes (that's the unit above terabytes).