Binomial coefficients 
Author Message
 Binomial coefficients

     A simple, but very inefficient, method of calculating binomial
coefficients that avoids problems with factorials of very large
numbers may be illustrated by the following example:
     6 C 4
     (!6) % (!4) * (!2)
     (6*5*4*3*2*1) % (4*3*2*1) *(2*1)
     (6*5*4*3*2*1) % (4*3*2*1*2*1)
     %/ 6 4 5 3 4 2 3 1 2 2 1 1    NB. Alternate items of left %
                                   NB.  left and right arg.
                                   NB.  and find alternating
                                   NB.  product.
     15

     This calculation is given by the verb

where

alternates the items of its left and right arguments, and

gives positive integers. As an example, 20.0": 10000 C 3
is 166616670000  .

Keith Smillie
Department of Computing Science
University of Alberta
Edmonton, Alberta T6G 2H1
(403) 492-5492

http://www.*-*-*.com/ ~smillie/



Mon, 31 Aug 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. binomial coefficient (by hand)

2. Puzzler : Binomial Coefficients

3. Binomial Coefficients

4. Puzzler: Binomial Coefficients

5. Puzzler: Binomial Coefficients

6. puzzler: binomial coefficients

7. Puzzler: Binomial Coefficients

8. binomial tree

9. Help to create a binomial distribution

10. Negative Binomial Approximations

11. ? generating random uniform and binomial random deviates for BIG integers

12. LogoFE and binomial distribution

 

 
Powered by phpBB® Forum Software