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

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 17:00, reaunnatowns
High schoolmathematics 5 points keith is the leading goal scorer for a team in an ice hockey league. last season, he scored 42 goals in 82 games. assuming he scores goals at a constant rate, what is the slope of the line that represents this relationship if the number of games is along the x-axis and the number of goals is along the y-axis?
Answers: 1
image
Mathematics, 21.06.2019 23:40, asiababbie33
Agrid shows the positions of a subway stop and your house. the subway stop is located at (-5,2) and your house is located at (-9,9). what is the distance, to the nearest unit, between your house and the subway stop?
Answers: 1
image
Mathematics, 22.06.2019 00:10, kadestew21
A50-foot ladder is leaning against a vertical wall. if the base of the ladder is 45 feet from the base of the wall, find the angle the bottling of the ladder makes with the ground.
Answers: 1
image
Mathematics, 22.06.2019 01:00, lolhgb9526
Sanderson is having trouble with his assignment. his shown work is as follows: − 3 7 7 3 = − 3 7 × 7 3 = − 21 21 = −1 however, his answer does not match the answer that his teacher gives him. complete the description of sanderson's mistake. find the correct answer.
Answers: 3
You know the right answer?
Consider the following game. a "dealer" produces a sequence s1 · · · sn of "cards," face-up, where e...

Questions in other subjects:

Konu
Mathematics, 17.10.2019 13:10
Konu
Mathematics, 17.10.2019 13:10