Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 4 (20 Marks) Assume we have a row of n coins of respective values v1, v2Un. The number of coins n is an even

image text in transcribed

QUESTION 4 (20 Marks) Assume we have a row of n coins of respective values v1, v2"Un. The number of coins n is an even number larger than or equal to 2. Two players, Player 1 and Player 2., play a game by alternating turns. In each turn, one player can remove the leftmost (first) or righmost (last) coin from the row. The objective is to get the maximum amount of money at the end of the game. We assume that Player 1 plays first and we want to determine a strategy for Player 1 to collect the maximum amount of money We assume that Player 2 is always going to play the best move she can (she wants to minimise the amount of money Player 1 is going to collect) a. (3 marks) Write a formal Problem Statement for the previous optimisation problem. b. (5 marks) Professor Zundap points out that for the case where we have 2 coins, picking the larger one gives the maximum amount for Player 1. He thus concludes that a greedy strategy for Player 1, that is, picking the larger of the two end coins, will enable him to always collect the maximum amount of money even with more than 2 coins. Provide a counter-example to show that this greedy choice does not always maximise the amount Player 1 can collect. A strategy for Player 1, is a sequence of removal choices such as fright, left, left. An optimal strategy for Player 1 is one that maximises Player 1's amount at the end of the game. (**c. (8 marks) Propose an algorithm to compute an optimal strategy for Player 1 d. (4 marks) What is the optimal strategy for Player 1 if we start with the following row of coins: 2, 8,15, 3,7,10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions