I need computer science help to make an algorithm

Nov 16th, 2015
RockCafe
Category:
Computer Science
Price: $60 USD

Question description

You live in City 0 and you want to go to City 1 then City 2 and so on until you reach City n, which is just another name for City 0. There are m different airlines that service those cities and you have created an n by n table A with airfare info. The entry A[i, j] corresponds to the airfare required to fly from City i-1 to City i on airline j. Unfortunately there are penalties for switching airlines. You create an n-1 by m by m table P containing penalty information. The entry P[i, j, k] corresponds to the penalty incurred when switching from airline j to airline k in City i. Fly as cheaply as possible .Devise an algorithm to solve this problem. It should output the total cost of the trip and display the airlines that you took to get to each city. 

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Duke University
PREMIUM TUTOR

Studypool has helped 1,244,100 students

3 Reviews


Summary
Quality
Communication
On Time
Value
BlueOcean
Nov 18th, 2016
" Awesome! Exactly what I wanted. "
ashleyisgod
Oct 27th, 2016
" Top quality work from this guy! I'll be back! "
Molly_Moon
Oct 4th, 2016
" AMAZING as always! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1825 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors