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 17:30
X-intercept=-5 y-intercept=2 the equation of the line is
Answers: 2
question
Mathematics, 21.06.2019 22:00
Which two transformations are applied to pentagon abcde to create a'b'c'd'e'? (4 points) translated according to the rule (x, y) ? (x + 8, y + 2) and reflected across the x-axis translated according to the rule (x, y) ? (x + 2, y + 8) and reflected across the y-axis translated according to the rule (x, y) ? (x + 8, y + 2) and reflected across the y-axis translated according to the rule (x, y) ? (x + 2, y + 8) and reflected across the x-axis
Answers: 1
question
Mathematics, 21.06.2019 22:00
What is the length of the segment, endpoints of which are intersections of parabolas y=x^2βˆ’ 11/4 xβˆ’ 7/4 and y=βˆ’ 7 /8 x^2+x+ 31/8 ?
Answers: 1
question
Mathematics, 21.06.2019 23:30
Sally deposited money into a savings account paying 4% simple interest per year.the first year,she earned $75 in interest.how much interest will she earn during the following year?
Answers: 2
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, 06.07.2019 09:30
Questions on the website: 13722362