Grieve (grieve) wrote,
Grieve
grieve

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: math
Subscribe

  • Trip to London

    My sister sent me this. http://tinyurl.com/3xc3uc these are the direction from New York to London on Google Maps. Note step 24.

  • Whoops!

    I forgot renew my domain name this year, and lost it for a few days. Fortunately I was able to regain it before it was permanently released.

  • Physics and Photons

    A long time ago some co-workers and I were discussing a sphere (of any size really) made of a perfect one-way mirror, such that light (photons)…

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments