subject

You and your friends are driving to Tijuana for springbreak. You are saving your money for the trip and so you want to minimize the cost of gas on the way. In order to minimize your gas costs you and your friends have compiled the following information.
First your car can reliably travel m miles on a tank of gas (but no further). One of your friends has mined gas-station data off the web and has plotted every gas station along your route along with the price of gas at that gas station. Specifically they have created a list of n+1 gas station prices from closest to furthest and a list of n distances between two adjacent gas stations. Tacoma is gas station number 0 and Tijuana is gas station number n. For convenience they have converted the cost of gas into price per mile traveled in your car. In addition the distance in miles between two adjacent gas-stations has also been calculated. You will begin your journey with a full tank of gas and when you get to Tijuana you will fill up for the return trip.
You need to determine which gas stations to stop at to minimize the cost of gas on your trip.
1. Express this problem formally with input and output conditions.
2. State a self-reduction for your problem.
3. State a dynamic programming algorithm based off your seld reduction that computes the minimum gas cost.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:50
What are the advantages of google cloud ?
Answers: 2
question
Computers and Technology, 22.06.2019 10:30
You have a large, late-model pick-up truck with a rear seat. the pick-up truck weighs 6,500 pounds. the florida seat belt law
Answers: 1
question
Computers and Technology, 22.06.2019 11:40
Design a pos circuit that displays the letters a through j on a seven-segment indicator. the circuit has four inputs w, x, y, and z which represent the last 4 bits of the uppercase ascii code for the letter to be displayed. thus, if wxyz = 0001 then "a" will be displayed. (any answer with 22 or fewer gates and inverters, not counting any for the inputs, is acceptable)
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
You know the right answer?
You and your friends are driving to Tijuana for springbreak. You are saving your money for the trip...
Questions
question
Mathematics, 18.03.2021 17:40
Questions on the website: 13722360