3 ms·
The face value of each coin is multiplied by the count of the coin type to total to the purse. Or rather, the sum of the nth powers of k multiplied by each pos
by techbio 8y ago
The face value of each coin is multiplied by the count of the coin type to total to the purse.
Or rather, the sum of the nth powers of k multiplied by each positive coefficient equals the value of the function at k.
Edit: Source in sibling.
- ColinWright 8y agoWow, what an interesting approach! Thank you ... I've copied that out to a file and I'll study it more later. Cheers!
- techbio 8y agoCheers to you. Let me know how close it was to what you were looking for. https://github.com/techbio/CoinCounting https://github.com/techbio/CoinCounting
- ColinWright 8y agoWhat you've done is not at all close to the solutions I already have, so it's exactly what I was looking for. On the one hand it's very much more complex, but on the other hand it's a more generic and general solution. The solutions I have are elsewhere in this thread, sometimes in disguise, and I'm gestating a blog post which I'll eventually submit. If you want to know more feel free to email me - address is in my profile. Added in edit: I would add that your code gives no hint as to why the solution should be unique.
- techbio 8y agoIt is not going to handle a vast range of inputs, including for example, p(k) = 665, for the basic reason that my code is a direct response to your request for an explanation and not proposed as a complete solution for the request of your original submission. Corrections requested, please. I would like to explore this paradigm to accurately address the problem in an exact way.
- ColinWright 8y agoI'll reply to your email ... thanks.