Question: ( 2 0 pts . ) Shortest Path in Currency Trading. Shortest path algorithms can be applied in currency trading. Let c 1 , c
pts Shortest Path in Currency Trading. Shortest path algorithms can be applied in currency trading.
Let dots, be various currencies; for instance, might be dollars, pounds, and lire. For any two
currencies and there is an exchange rate ; this means that you can purchase units of currency
in exchange for one unit of These exchange rates satisfy the condition that so that if you
start with a unit of currency change it into currency and then convert back to currency you end up
with less than one unit of currency the difference is the cost of the transaction
a Give an efficient algorithm for the following problem: Given a set of exchange rates and two
currencies and find the most advantageous sequence of currency exchanges for converting currency
into currency Toward this goal, you should represent the currencies and rates by a graph whose
edge weights are real numbers.
b The exchange rates are updated frequently, reflecting the demand and supply of the various curren
cies. Occasionally the exchange rates satisfy the following property: there is a sequence of currencies
dots, such that This means that by starting with a unit of currency
and then successively converting it to currencies dots, and finally back to you would
end up with more than one unit of currency Such anomalies last only a fraction of a minute on the
currency exchange, but they provide an opportunity for riskfree profits. Give an efficient algorithm
for detecting the presence of such an anomaly. Use the graph representation you found above.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
