Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, isalita
Pthe price of tickets in a group when a purchased in bulk can be found with the equation c=px+24 were c is the cost, p is the number of people, and x is the price per ticket. what is price of of each ticket if it costs $189 to buy tickets for 15 people ? a $8 b $24c $9d $11 show work
Answers: 1
image
Computers and Technology, 22.06.2019 11:50, nicoleskertich
You have written, as part of a school assignment, a research paper on the solar system. you want to share this paper on your school website. on which type of server will you upload it?
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, eguzmandpandoracom
How do we use the sumif formula (when dealing with different formats) ?
Answers: 1
image
Computers and Technology, 23.06.2019 14:00, LuvIsRage2
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
Do you know the correct answer?
You and your friends are driving to Tijuana for springbreak. You are saving your money for the trip...

Questions in other subjects:

Konu
History, 16.12.2020 20:00