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. Speciļ¬cally 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 ļ¬ll 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, 22.06.2019 14:00
What are procedures that keep a data base current
Answers: 1
question
Computers and Technology, 23.06.2019 00:20
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 24.06.2019 18:50
Which style did jack use on the vocabulary words in reports?
Answers: 2
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, 07.05.2021 19:10
question
Mathematics, 07.05.2021 19:10
question
Chemistry, 07.05.2021 19:10
question
Mathematics, 07.05.2021 19:10