subject

(3 points) suppose that we have a sequence a1, a2, . . , an that we wish to memorize. we memorize it by computing partial sums of the forms ai + . . + aj . let us say that the cost of memorizing a particular integer a is |a|. the goal is to use the minimum cost to remember the partial sums so that we can reconstruct the original sequence. for example, if (a1, a2, a3, a4) = (1, −3, 2, 4), one of the possible solution is to memorize: • a1 = 1 • a2 + a3 = −1 • a2 + a3 + a4 = 3 • a3 = 2 the total cost is |1| + | − 1| + |3| + |2| = 7, and a1, a2, a3, a4 can be reconstructed by using gaussian elimination from the information memorized. note that the minimum cost to memorize the sequence above is 6. give an algorithm that computes the minimum cost to memorize a sequence a1, a2, . . , an. the running time of the algorithm should be polynomial in n. (hint:

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Write the html code to make a link out of the text “all about puppies”. it should link to a pdf called “puppies.pdf” inside the “documents” folder. the pdf should open in a new window.
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
In a home that has 120 v service, there is an electric appliance that has a resistance of 12 ohms. how much power will this appliance consume? a. 10 w b. 120 w c 1200 w d. 1440 w
Answers: 1
You know the right answer?
(3 points) suppose that we have a sequence a1, a2, . . , an that we wish to memorize. we memorize i...
Questions
question
Mathematics, 10.10.2019 03:30
Questions on the website: 13722367