user1151: I'm attempting to use the createrawtransaction to manually create my transactions and I want to (obviously) reduce my fees. The complication I'm having is that I want to send ALL of the bitcoins in my wallet to 2 parties. So I know that I can specify the inputs and outputs, but there's that pesky fee concept which makes it difficult to just spend it all.
So if I have 5 inputs and 2 outputs, how would I go about calculating exactly what the fee will be and reducing it?

user6128: https://en.bitcoin.it/wiki/Transaction_fees
Those are rules about calculating fees.
Considering algorithms, i think you should check all possiblities (brute-force) or it could be also some kind of knapsack problem.

1151: <p>I'm attempting to use the <code>createrawtransaction</code> to manually create my transactions and I want to (obviously) reduce my fees. The complication I'm having is that I want to send <strong>ALL</strong> of the bitcoins in my wallet to 2 parties. So I know that I can specify the inputs and outputs, but there's that pesky fee concept which makes it difficult to just spend it all.</p>

<p>So if I have 5 inputs and 2 outputs, how would I go about calculating exactly what the fee will be and reducing it?</p>
 6128: <p><a href="https://en.bitcoin.it/wiki/Transaction_fees" rel="nofollow">https://en.bitcoin.it/wiki/Transaction_fees</a>
Those are rules about calculating fees.</p>

<p>Considering algorithms, i think you should check all possiblities (brute-force) or it could be also some kind of knapsack problem.</p>
