ways to make change
|
03-04-2019, 04:31 PM
(This post was last modified: 03-04-2019 08:21 PM by Albert Chan.)
Post: #5
|
|||
|
|||
RE: ways to make change
Found a faster PNDQ change formula: How many ways can you make change, some easy proofs
However, there are many typos on the formula. (see corollary 4.5) (8530M) should be (85 + 30M), + correcton should be - correction. Let N = M+2, and simplified all the (-1)^powers, we get: Code: def PNDQ(x): Correction 3c/24 only contribute at most 6/24 = ΒΌ ways, thus can be eliminated: Code: def PNDQ(x): # revised without correction this optimized version match my PNDQ function (build from PNDH), but at 2.5X speed ! |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
ways to make change - Albert Chan - 03-02-2019, 05:37 PM
RE: ways to make change - Albert Chan - 03-02-2019, 06:58 PM
RE: ways to make change - Albert Chan - 03-02-2019, 10:33 PM
RE: ways to make change - Albert Chan - 03-03-2019, 06:05 PM
RE: ways to make change - Albert Chan - 03-04-2019 04:31 PM
RE: ways to make change - Albert Chan - 03-05-2019, 10:17 PM
|
User(s) browsing this thread: 1 Guest(s)