The input is a collection of currencies and their exchange rates. Is there a sequence of exchanges

Question:

The input is a collection of currencies and their exchange rates. Is there a sequence of exchanges that makes money instantly? For instance, if the currencies are X, Y, and Z and the exchange rate is 1 X equals 2 Ys, 1 Y equals 2 Zs, and 1 X equals 3 Zs, then 300 Zs will buy 100 Xs, which in turn will buy 200 Ys, which in turn will buy 400 Zs. We have thus made a profit of 33 percent.
Exchange Rate
The value of one currency for the purpose of conversion to another. Exchange Rate means on any day, for purposes of determining the Dollar Equivalent of any currency other than Dollars, the rate at which such currency may be exchanged into Dollars...
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: