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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:50
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
question
Computers and Technology, 23.06.2019 12:50
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
Johnson enterprises uses a computer to handle its sales invoices. lately, business has been so good that it takes an extra 3 hours per night, plus every third saturday, to keep up with the volume of sales invoices. management is considering updating its computer with a faster model that would eliminate all of the overtime processing.
Answers: 2
question
Computers and Technology, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
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
question
Spanish, 31.07.2019 07:00
question
Computers and Technology, 31.07.2019 07:00
Questions on the website: 13722363