This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 U.S dollar buys 0.75 British pounds, 1 British pound buys 2 Australian dollars, and 1 Australian dollar buys 0.70 U.S dollars. Then, a smart trader can trade one U.S dollar and end up with 0.75*2*0.7=1.05 U.S dollars, a proFt of 5Suppose that there are n currencies C 1 ,...C n and an n × n table R of exchange rates, such that one unit of currency C i buys R [ i,j ] units of currency C j . Devise and analyze a dynamic programming algorithm to determine the maximum value of R [ C 1 ,C i (1)] ∗ R [ C i (1) ,C i (2)] ∗ ... ∗ R [ C i ( k ) ,C 1 ] where i (1) ,...,i ( k ) is a subset of { 1 ,...,n } . State and prove time complexity of your algorithm. 2...
View
Full Document
 Fall '08
 UNGOR
 Algorithms, United States dollar, ISO 4217, dynamic programming algorithm, Canadian dollar, 90 mins

Click to edit the document details