subject

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 rst or the last card of the (remaining) sequence. The goal is to collect cards of
largest total value. (For example, you can think of the cards as bills of different denominations.)
Assume n is even.

Give an O(n^2) algorithm to compute an optimal strategy for the rst player. Given the
initial sequence, your algorithm should precompute in O(n^2) time some information, and
then the rst player should be able to make each move optimally in O(1) time by looking
up the precomputed information.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Digital information is stored using a series of ones and zeros. computers are digital machines because they can only read information as on or off –1 or 0. this method of computation is known as the system
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What is the biggest difference between section breaks and regular page breaks
Answers: 1
You know the right answer?
Consider the following game. A dealer produces a sequence s1 sn of cards, face up, where each card s...
Questions
Questions on the website: 13722367