subject

Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 11 U. S. dollar buys 4949 Indian rupees, 11 Indian rupee buys 22 Japanese yen, and 11 Japanese yen buys 0.01070.0107 U. S. dollars. Then, by converting currencies, a trader can start with 11 U. S. dollar and buy 49 \times 2 \times 0.0107 = 1.048649×2×0.0107=1.0486 U. S. dollars, thus turning a profit of 4.864.86 percent.

Suppose that we are given nn currencies c_1, c_2, \ldots, c_nc
1

,c
2

,…,c
n

and an n \times nn×n table RR of exchange rates, such that one unit of currency c_ic
i

buys R[i, j]R[i, j] units of currency c_jc
j

.

a. Give an efficient algorithm to determine whether or not there exists a sequence of currencies \langle c_{i_1}, c_{i_2}, \ldots, c_{i_k} \rangle⟨c
i
1



,c
i
2



,…,c
i
k



⟩ such that

R[i_1, i_2] \cdot R[i_2, i_3] \cdots R[i_{k - 1}, i_k] \cdot R[i_k, i_1] > 1.
R[i
1

,i
2

]⋅R[i
2

,i
3

]⋯R[i
k−1

,i
k

]⋅R[i
k

,i
1

]>1.
Analyze the running time of your algorithm.

b. Give an efficient algorithm to print out such a sequence if one exists. Analyze the running time of your algorithm.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:00, chuchi24
Robots with telescoping arms are sometimes used to perform tasks (e. g., welding or placing screws) where access may be difficult for other robotic types. during a test run, a robot arm is programmed to extend according to the relationship r = 3 + 0.5cos(4θ) and the arm rotates according to the relationship θ=−π4t2+πt , where r is in feet, θ is in radians, and t is in seconds. use a computer program to plot the path of tip a in x and y coordinates for 0 ≤ t ≤ 4s.
Answers: 2
image
Computers and Technology, 22.06.2019 22:00, robert7248
Competent nonverbal communication involves interacting with others in a manner that is appropriate for which of the following? select all that apply. situation task individuals
Answers: 3
image
Computers and Technology, 23.06.2019 14:30, soapai
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, aalyssag606
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. â–ş print out all positive integers from 1 to 100, inclusive and in order. â–ş print messages to standard output, matching the sample output below. â–ş in the output, state whether the each integer is 'odd' or 'even' in the output. â–ş if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. â–ş if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. â–ş design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
You know the right answer?
Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency...

Questions in other subjects:

Konu
Biology, 28.01.2021 18:00
Konu
Mathematics, 28.01.2021 18:00
Konu
French, 28.01.2021 18:00