subject
Mathematics, 13.12.2019 20:31 jocelynkissinge

Consider the following game. a dealer produces a sequence s1 sn of cards, face up, whereeach card si has a value vi. then two players take turns picking a card from the sequence, butcan only pick the first or the last card of the (remaining) sequence. the goal is to collect cards oflargest 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 pickingup the available card of larger value. that is, the natural greedy strategy is suboptimal.
(b) give an o(n2) algorithm to compute an optimal strategy for the first player. given theinitial sequence, your algorithm should precompute in o(n2) time some information, andthen the first player should be able to make each move optimally in o(1) time by lookingup the precomputed information.

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 13:50
Given the function f(x) = 3x + 1, evaluate f(a + 1). a. 3a + 1 b. a + 2 c. 3a + 4
Answers: 1
question
Mathematics, 21.06.2019 16:30
Asequence {an} is defined recursively, with a1 = 1, a2 = 2 and, for n > 2, an = an-1 an-2 . find the term a241
Answers: 2
question
Mathematics, 21.06.2019 19:30
Complete the solution of the equation. find the value of y when x equals to 6 4x+y=20
Answers: 2
question
Mathematics, 21.06.2019 21:00
Which of the following parabolas opens down?
Answers: 1
You know the right answer?
Consider the following game. a dealer produces a sequence s1 sn of cards, face up, whereeach card si...
Questions
question
English, 26.02.2021 19:10
question
Mathematics, 26.02.2021 19:10
question
Arts, 26.02.2021 19:10
Questions on the website: 13722361