MathGroup Archive 2008

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

Search the Archive

Re: Re: Computing nCr how?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94942] Re: [mg94918] Re: Computing nCr how?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Wed, 31 Dec 2008 06:08:50 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200812301055.FAA13167@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Why the obscure abbreviations "Combin" and "Permut".  Why not at least 
"Combine" and "Permute", or even the more readable "Combinations" and 
"Permutations"?

Dana DeLouis wrote:
>> ... I cant find the function ...to compute nCr
> 
> I remember my very first question with Mathematica was "Where is Permut nPr ?"
> I was a little dismayed (and still am a little) that the program didn't have
> the same function as found in Spreadsheets.  I remember thinking that this
> program must not have very many functions. (till I bought the book!)  :>)
> 
> Switching from a Spreadsheet to Mathematica, my very first two programs were:
> 
> Combin[n_, k_] := Binomial[n, k]
> Permut[n_, k_] := n!/(n - k)!
> 
> However, for speed, I now use this:
> Permut[a_, b_] := Pochhammer[1 + a - b, b]
> 
> The second version is faster, but the first version will reduce here...
> Permut[a, b]/a!
> 1/(a - b)!
> 
> Dana
> 
> Affan wrote:
>> Hi,
>> I know this sounds simple but I cant find the function in mathematica
>> to compute nCr (i.e. number of combination for n obj chosen in groups
>> of r). Can anyone help?
>>
>> Thanks
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Non-deterministic numerical inaccuracies in
  • Next by Date: Re: Speeding-up FindInstance
  • Previous by thread: Re: Computing nCr how?
  • Next by thread: Re: making 0^0=1 and not indet