For currency exchange, we say that there is an arbitrage opportunity if it is possible to make a sequence of currency exchanges so that the amount of money you end up with is larger than that you started with. Assume for instance that you identify that 1 US dollar ($) buys 110 Japanese yen (¥), that 1 yen buys 0.009 euros (€), and that 1 euro buys 1.05 US dollars. Then running one dollar through this sequence of transactions would yield $1 x 110 x 0.009 x 1.05 = $1.0395. In other words, you could get a return of approximately 4¢ by engaging one dollar in these currency exchanges. In such a situation, the cycle of currencies $ - € - $ is referred to as an arbitrage cycle.
Consider now a situation with five currencies (B, $, €, P, ¥). We record exchange rates between these currencies in a matrix R = [r_ij] where the (i,j) entry of the matrix represents that one unit of currency i can be traded for r_ij units of currency j. This matrix is presented next, where we observe that we do not always have that r_ij x r_ji = 1.
From To Baht (B) Dollar ($) Euro (€) Peso (P) Yen (¥)
Baht (B) 20 25 25.5 20.5 21.75
Dollar ($) 2-5 20 20.25 2-4.75 2-6.75
Euro (€) 2-5.5 2-0.25 20 2-4.75 2-7
Peso (P) 2-0.5 24.5 24.75 20 22.25
Yen (Â¥) 21.75 26.75 27 22.25 20
Table 1: Exchange rates between currencies
Let N = (V, A) be a directed graph where V = {1,...,n} and A is the set of all pairs (i, j) with i ≠j.
1. Explain why the problem of deciding whether there is an arbitrage opportunity can be formulated as the problem of detecting a negative cost cycle in N. In particular, what arc weights should be used? (Hint: you might find it useful to remember that abc > 1 is equivalent to log2(abc) = log2 a + log2 b + log2 c > 0.)
2. Run Bellman-Ford's algorithm for |V| - 1 rounds on the network you defined in Part 1 for the data presented in Table 1.
3. By performing one more round of Bellman-Ford's algorithm, determine whether or not there is an arbitrage opportunity. If so, describe how you could use the information gained in this extra step of the algorithm to obtain an arbitrage cycle.