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 21:40
Drag the tiles to the correct boxes to complete the pairs. label each function. as even , odd, or neither.
Answers: 1
question
Mathematics, 22.06.2019 01:00
Arrange the steps to solve this system of linear equations in the correct sequence. x + y = -2 2x – 3y = -9 tiles subtract 3x + 3y = -6 (obtained in step 1) from 2x – 3y = -9 (given) to solve for x. substitute the value of x in the first equation (x + y = -2) to get y = 1. the solution for the system of equations is (-3, 1). x = -15 the solution for the system of equations is (-15, 13). add 3x + 3y = -6 (obtained in step 1) to 2x – 3y = -9 (given), and solve for x. x = -3 substitute the value of x in the first equation (x + y = -2) to get y = 13. multiply the first equation by 3: 3(x + y) = 3(-2) 3x + 3y = -6.
Answers: 1
question
Mathematics, 22.06.2019 03:00
Anew obstacle course is home to several new types of challenging obstacles. one such obstacle is traversing a 15-stair staircase. to make it more challenging, the stairs are not uniformly spaced. rather, the vertical space between consecutive stairs for the first 10 stairs is 113 feet and the vertical space for the last 5 stairs is 134 feet. what is the total vertical distance traveled ascending and descending the entire 15-stair staircase?
Answers: 3
question
Mathematics, 22.06.2019 03:30
Solve the equation for y. -1 = 1/3y + 11. will give 5 stars if answered correctly!
Answers: 2
You know the right answer?
Consider the following game. a "dealer" produces a sequence s1 · · · sn of "cards," face-up, where e...
Questions
question
History, 28.12.2019 12:31
question
Mathematics, 28.12.2019 12:31
question
Computers and Technology, 28.12.2019 12:31
question
Mathematics, 28.12.2019 12:31
question
Mathematics, 28.12.2019 12:31
Questions on the website: 13722362