3 ms·
>In finance, for example, there may be situations in currency or options trading where buying and selling in one sequence is more profitable than taking a diffe
by riedel 3y ago
>In finance, for example, there may be situations in currency or options trading where buying and selling in one sequence is more profitable than taking a different path, and these can be modeled using negative weights as long as the search algorithm is fast enough. But those negative weights can throw Dijkstra's shortest-path algorithm for a loop.
- thaumasiotes 3y agoThe obvious model of that to me would involve all positive weights representing the exchange ratio, but a path through a graph like that wouldn't be summing the edge weights. I guess the idea is that you weight the edges with the log of the exchange ratio?