4 ms·
If you can go negative, it seems you've turned the problem into a Diophantine equation, the order of trades doesn't matter, you're just asking if we can get fro
by not2b 3y ago
If you can go negative, it seems you've turned the problem into a Diophantine equation, the order of trades doesn't matter, you're just asking if we can get from the start state to the end state by using each possible trade an integer number of times.
- strken 3y agoIf you can go negative but there's a floor on how negative you can go, is it meaningfully different from not being allowed to drop below zero in terms of worst case complexity? The order of trades still matters in that case, right?
- not2b 3y agoYes, if there's no restriction the problem becomes a system of linear equations. If there's a limit, it's not linear and order matters.