subject

(DPV 6.2) You are going on a long trip. You start on the road at mile post 0. Along the way there are n hotels, at mile posts a1 < a2 < · · · < an, where each ai is measured from the starting point. The only places you are allowed to stop are at these hotels, but you can choose which of the hotels you stop at. You must stop at the final hotel (at distance an), which is your destination. You'd really like to travel 200 miles a day, but this may not be possible (depending on the spacing of the hotels). If you travel x miles during a day, the penalty for that day is (200−x) 2 . You want to plan your trip so as to minimize the total penalty – that is, the sum, over all travel days, of the daily penalties. Give an efficient algorithm that determines the optimal sequence of hotels at which to stop.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, lailahussain99
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
image
Computers and Technology, 23.06.2019 06:00, 573589
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
image
Computers and Technology, 24.06.2019 17:50, jones03riley
You work in the accounting department and have been using a network drive to post excel workbook files to your file server as you complete them. when you attempt to save a workbook file to the drive, you see the error message: “you do not have access to the folder ‘j: \’. see your administrator for access to this folder.” what should you do first
Answers: 2
image
Computers and Technology, 24.06.2019 20:30, lowwlifelivv
Where is permanent data in the computer stored whenever gym starts his laptop he sees some commands in numbers appearing on the screen these instructions are being preceded by the control unit in
Answers: 1
You know the right answer?
(DPV 6.2) You are going on a long trip. You start on the road at mile post 0. Along the way there ar...

Questions in other subjects: