Mathematics
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.

answer
Answers: 1

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 15:50, Pbaer3087
Agreeting card company can produce a box of cards for $7.50. if the initial investment by the company was $50,000, how many boxes of cards must be produced before the average cost per box falls to $10.50?
Answers: 1
image
Mathematics, 21.06.2019 19:30, emopandabogard8712
Find the coordinates of point x that lies along the directed line segment from y(-8, 8) to t(-15, -13) and partitions the segment in the ratio of 5: 2.
Answers: 1
image
Mathematics, 21.06.2019 19:30, jessnolonger
Zoey made 5 1/2 cups of trail mix for a camping trip. she wants to divide the trail mix into 3/4 cup servings. a. ten people are going on the trip. can zoey make enough 3/4 cup servings so that each person gets one serving? b. what size would the servings need to be for everyone to have a serving?
Answers: 1
image
Mathematics, 21.06.2019 21:00, xojade
The measure of angle 0 is 600 degrees
Answers: 1
Do you know the correct answer?
Consider the following game. a "dealer" produces a sequence s1 · · · sn of "cards," face-up, where e...

Questions in other subjects: