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, 22.06.2019 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
Someone plzz me which of these defines a social search? a. asking a search engine a question that is answered by a real person on the other sideb. modifying search results based on popularity of a web pagec.modifying search results based on a ranking of a web page
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
What is the most important for you to choose before you build a network?
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
Questions on the website: 13722362