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 09:00
Howard is designing a chair swing ride. the swing ropes are 5 meters long, and in full swing they tilt in an angle of 29Β° outside chairs to be 2.75 m above the ground in full swing.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
Which of the following examples has four beats in each measure?
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
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, 12.08.2020 08:01
question
Mathematics, 12.08.2020 08:01
Questions on the website: 13722363