?

Log in

Previous Entry | Next Entry

Math


A while ago I posted this. I have since discovered a few things.

1. Determining the number of ways to distribute X things in Y slots is the same formula as finding the binomial coefficients as in pascals triangle.
2. The code given in the comments is not tail recursive but is linearly recursive, which makes it much harder to remove the recursion.

This isn't to say that the recursion cannot be removed, but that it is harder than removing tail recursion.

Tags:

Latest Month

July 2011
S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930
31      
Powered by LiveJournal.com
Designed by yoksel