Post
Topic
Board Development & Technical Discussion
Re: SelectCoins algorithm
by
bitcoinandroid
on 19/10/2011, 03:54:17 UTC
Great info, thanks guys!

Yep I remember the knapsack problem from back in the day.  Looks like there are some implementations here:
http://rosettacode.org/wiki/Knapsack_problem/0-1

Gavin, your naive implementation seems like a great start.  I was a little confused why you used num confirmations * amount as the priority, but after reading this (technical info at the bottom) it makes more sense: https://en.bitcoin.it/wiki/Transaction_fees

And yes, at this point I'm optimizing for ease of implementation.

I'm slowly understanding more of it, thanks guys!