Computers and Technology

(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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:00, Riddledjam44623
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, soapai
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, shonnybenskin8
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
image
Computers and Technology, 24.06.2019 04:30, littledudefromacross
Write and test a python program to find and print the largest number in a set of real (floating point) numbers. the program should first read a single positive integer number from the user, which will be how many numbers to read and search through. after reading in all of the numbers, the largest of the numbers input (not considering the count input) should be printed.
Answers: 1
Do you know the correct 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: