Thanks,
Markus
> Does anyone know how to do n choose k in mupad? I couldn't find it, not
> even in the combinat package.
>
I don't know mupad, but does it have a binomial function?
--
Joe Riel
Define a "combinations" function
(%i6) c(x,y) := x!/((x-y)! * y!);
(%o6) c(x,y):=x!/((x-y)!*y!)
Use it to calculate the number of ways to select 6 from 49 where the
order is not important (which equates to the odds of winning a
"Canadian style" lottery)
(%i7) c(49,6);
(%o7) 13983816
See
http://en.wikipedia.org/wiki/Permutations_and_combinations#Summary_of_formulae
for other combinatorical formulae.
I think you require (for example)...
combinat::subsets::count(6,3);
This returns 20 as the number of combinations of 3 objects chosen from 6
i.e. 6!/(3!x3!)
Cheers, Brad
> Thanks,
> Markus
>