**From New Scientist #2143, 18th July 1998** [link]

Benjamin and Matthew have a new card game involving 50 cards numbered 1 to 50. They deal out the cards and Matthew finds he has 1 to 16 and 36 to 44. The game consists of 25 rounds. In each round one player places one of his cards face-up on the table and then the other places one of his face-up on the table. The one who has played the higher card wins that round; the two cards on the table are discarded. For the first round the players toss [a coin] to see who goes first, but after that, each round is begun by the winner of the previous round.

Benjamin and Matthew are both experts at the game and each plays so as to win as many rounds as possible.

(1) How many rounds does Benjamin win?

(2) For the next game Matthew has 1 to 7 and 16 to 33. How many rounds does Benjamin win?

(3) For the final game Matthew has 1 to 8 and 30 to 46. How many rounds does Benjamin win?

[enigma988]

### Like this:

Like Loading...

See also:

Enigma 1201,Enigma 1321.This puzzle is very similar to

Enigma 1201(although it was published some 4 years before it).I have refined the program I wrote when I solved that puzzle.

I still separate the cards into 4 categories, which I label category 0, 1, 2, 3, and a card in any category beats all the cards in any lower numbered category, and is beaten by all the cards in any higher numbered category. The players hold cards in distinct categories, so there are no draws. Each round is won by one of the players, so we can consider the number of rounds won by player A as a measure of the game. Player A seeks to maximise this measure, and Player B seeks to minimise it.

The following Python program solves all 3 parts of the puzzle in 174ms.

Run:[ @repl.it ]Solution:In the three games Benjamin wins: (1) 16 rounds; (2) 17 rounds; (3) 12 rounds.