I need computer science help to make an algorithm

User Generated

tfavqre

Computer Science

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. 

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags