Katkat

Find an Optimal Strategy for an Even-Row Coin Game

TekionSoftware Engineer · Technical Screen

Last updated

Analyze optimal play in an even-row coin game, using position parity and game values to distinguish a guaranteed tie from a strict first-player win.

A and B play a game with an even number of coins arranged in a row. They alternate turns, with A moving first. On each turn, the player takes one coin from either the left end or the right end of the remaining row. After all coins have been taken, the player with the greater total face value wins.

Explain an optimal strategy for A. State what information about the coin values your reasoning requires and how you interpret optimal play. Distinguish a strategy that guarantees a lower bound on A's score from a strategy that achieves the best score against an optimal opponent. Address whether an even number of coins alone guarantees a strict win; the rules do not exclude tied totals.

This is a strategy explanation. No particular list of coin values or executable return format is supplied.

Follow-up questions

  • What conclusion follows when the sums of the two original position parities are unequal? What remains unresolved when they are equal?