MathGroup Archive 1997

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

Search the Archive

Re: Binomial Coefficients


H. Thompson wrote:
> 
> I understand about k-permutations and 'n choose k', and while i can
> mathematically determine the max possible combinations of say a 5 character
> string
> 
>                         n! / [k! (n-k)!]
> I have yet to successfully debug my algorithm so it produces all of the
> calculated permutations.
> 
> Any help would be greatly appreciated.
> 
> hrt

While Binomial[n,k] gives the number of combinations,
KSubsets[a,k] (where a is an n element set) will give you a list of
all the combinations.  It's located in the standard package: 
DiscreteMath`Combinatorica` 


Dave Snead
dsnead at pacbell.net


  • Prev by Date: Anti-Chop Function
  • Next by Date: Re: bug in Interpolation[] of Mma 3.0
  • Previous by thread: Re: Binomial Coefficients
  • Next by thread: bug in Interpolation[] of Mma 3.0