subject
Mathematics, 23.11.2019 05:31 Jasten

Consider the following game. a "dealer" produces a sequence s1 · · · sn of "cards," face-up, where each card si has a value vi. then two players take turns picking a card from the sequence, but can only pick the first or the last card of the (remaining) sequence. the goal is to collect cards of the largest total value. (for example, you can think of the cards as bills of different denominations.) assume n is even. a. show a sequence of cards such that it is not optimal for the first player to start by picking up the available card of larger value. that is, the natural greedy strategy is suboptimalb. give an o(n2) algorithm to compute an optimal strategy for the first player. given the initial sequence, your algorithm should precompute in o(n2) time some information, and then the first player should be able to make each move optimally in o(1) time by looking up the precomputed information.

ansver
Answers: 1

Another question on Mathematics

question
Mathematics, 21.06.2019 15:10
What is the area of triangle abc if a = 8, b = 11, and c = 15?
Answers: 1
question
Mathematics, 21.06.2019 17:00
16. you're planning to buy a boat, a motor, and some miscellaneous boating equipment. the boat costs $325, the motor costs $225, and the equipment costs $79. if you've saved $438 toward these purchases, how much more do you need to save? a. $181 b. $281 c. $291 d. $191
Answers: 3
question
Mathematics, 21.06.2019 17:30
During a bike challenge riders have to collect various colored ribbons each 1/2 mile they collect a red ribbon each eighth mile they collect a green ribbon and each quarter mile they collect a blue ribbion wich colors of ribion will be collected at the 3/4 markrer
Answers: 3
question
Mathematics, 21.06.2019 19:00
Angela is buying a dress that is on sale for 20% off. if the original price of the dress is $40.00, how much money is angela saving on the dress? a. $0.80 b. $3.20 c. $32.00 d. $8.00
Answers: 1
You know the right answer?
Consider the following game. a "dealer" produces a sequence s1 · · · sn of "cards," face-up, where e...
Questions
question
Mathematics, 12.08.2020 09:01
question
Chemistry, 12.08.2020 09:01
question
History, 12.08.2020 09:01
question
Mathematics, 12.08.2020 09:01
question
Social Studies, 12.08.2020 09:01
question
English, 12.08.2020 09:01
Questions on the website: 13722367