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 16:10
To describe a sequence of transformations that maps triangle abc onto triangle a"b"c", a student starts with a reflection over the x-axis.how should the student complete the sequence of transformations to map triangle abc onto triangle a"b"c"? plz
Answers: 1
question
Mathematics, 21.06.2019 19:00
What is the equation of the line in point-slope form? y+ 4 = 1/2(x+4) y-4 = 1/2(x + 4) y-0 = 2(x - 4) y-4 = 2(8-0)
Answers: 2
question
Mathematics, 21.06.2019 20:00
You are shooting hoops after school and make 152 out of a total of 200. what percent of shots did you make? what percent did you miss? show proportion(s).
Answers: 1
question
Mathematics, 22.06.2019 01:30
Which of the following statements is a true conclusion that can be made from the scaled bargraph?
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
Mathematics, 22.05.2021 14:00
question
Physics, 22.05.2021 14:00
question
World Languages, 22.05.2021 14:00
question
Arts, 22.05.2021 14:00
Questions on the website: 13722363