This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: The conversion rate from Ci to Cj is fij (one unit of ci becomes fij units of cj) what is the best way to convert C1 to Cn $ yen pounds asdf $ 1 0.51 0.77 121 Yen 1.96 1 1.51 237 Pounds 1.3 0.66 1 157 Asdf 0.008 0.004 0.006 1 b. Build a directed graph G = V, E) with nodes V = {c1, c2, cn} and edges E = {(c1, c2), I != j} we will find a path from Ci to Cn, each edge along the path is a currency conversion $ > pounds = log(0.51) > yen = log(237). Put a negative sign to find the longest path Edge length l(ci, cj) = log(r ij ) Length of a path $>f>pounds>yen is log(r(all combinations) = log(r(all combos from one to another, $>ye, yen>pounds, pounds>asdf) and multiply 3. General shortest paths algorithm a. Basic principle of Dijkstra: the shortest path...
View
Full
Document
This note was uploaded on 01/09/2012 for the course CSE 101 taught by Professor Staff during the Spring '08 term at UCSD.
 Spring '08
 staff
 Algorithms

Click to edit the document details