[Philadelphia-pm] 378,000 milkshakes
Mark Jason Dominus
mjd at plover.com
Thu Sep 15 16:01:08 PDT 2011
> We attempted to figure out how they had arrived at that number.
That is a funny synchronicity. Just last night I was trying to think
of a good algorithm for solving the following problem: given a
positive integer M, find n > 0 and k > 1 such that M = n choose k =
n!/k!(n-k)!, or determine that no such n and k exist.
The obvious brute-force search algorithm is O(sqrt(M)), which is not
efficient; it should be O(p(log M)) for some polynomial p.
More information about the Philadelphia-pm
mailing list