# Equilibrium of differences

There is a subtraction equation written on the board, with three digits minus three digits, and the first digits both fixed. Alice and Bob need to fill in the remaining 4 digits (A~D below) using 4 turns to complete the equation. On each turn, Alice chooses a number from 0~9 given to Bob, then Bob chooses a digit space to put in the number given.

Alice's goal is to make the final difference as large as possible, and Bob's goal is to make the final difference as small as possible. If both use the optimal strategy and the four numbers Alice chooses are non-repeatable (Disambiguation edit: Alice cannot choose the same integer more than once from [0, 9], credit to Bass),

What is the final difference?

    2 A B
- 1 C D
————————————


This puzzle is not formidable, though a bit easy to give a wrong answer. To maximize the fun you get, no computers and giving your attempted answer first (don't have to post it) before checking others', is recommended.
source

• Feel free to adjust the wording if my English doesn't phrase the puzzle well enough. The source contains answers, so will be added after the green check appears. Mar 5 at 13:00
• @Nautilus : Your answer is welcome not be deleted, as it's a good one, answer to a (maybe harder) variation of this puzzle. was going to comment under that answer: Deep apologize, my English failed to phrase this puzzle unambiguously. In the intended puzzle, Alice is allowed to choose 1 and 2 (so green checked another answer based on this interpretation). However, if Alice is not allowed to choose 1 and 2, this IS the correct answer. Apologize again, I'll try harder to avoid such ambiguity in future. Mar 6 at 11:08

(NB: I've chosen to interpret "the four numbers Alice chooses must be non-repeatable" as "Alice cannot choose the same digit more than once". There are other possible interpretations, which may change the final result, but the general approach will still be exactly the same.)

Let's start by noticing that the setup is highly symmetrical: Alice has 10 digits, each having a pair that adds up to 9 with it. Bob has 4 multipliers he must assign to the digits given to him: +1, -1, +10 and -10. (In order, those correspond to the placements B,D,A, and C.) This symmetry means that there's always going to be more than one strategy that leads to the optimal score: if Alice's best start is X, and the multiplier Y is Bob's best response, then "9-X" will also work for Alice, with -Y being Bob's best response.

With that out of the way, let's min-max.

Alice's strategy must surely be "give out middle digits until Bob commits one of the x10s, then force an extreme digit as the other x10 to maximise the difference."

As for Bob's strategy, committing a x10 early is, perhaps surprisingly, a good idea: the later Bob commits, the fewer digits Alice must offer afterwards, allowing Alice to make the digit at the other x10 multiplier even more extreme.

So let's start with Alice offering a 5. It's above average, but only very little, so Bob will want to use it as either C or one of the less significant digits. Let's work through both options.

Bob puts the 5 at C: (2AB-15D) Now Alice can force a 7 as A (she has to give out only three digits, which can be 7,8, and 9), and if she hands out the 7 immediately, she gets to use the "middle, then extreme" strategy again with B and D for a small extra gain. The best-for-both calculation becomes 274 - 150 = 124.

Bob puts the 5 at D: (2AB-1C5) Now Alice can offer a 4. It's below average, so if Bob commits a x10, it will be A.

• In this case,(24B-1C5) Alice can then dictate the rest of the game by offering a 1, for a result of 249-115 = 134
• If Bob instead saves both the x10s for last (2A4-1C5), Alice will next offer either a 3 or 6, resulting in either 234-105 or 294-165, both worth 129 points.

If Bob puts the 5 at B (2A5-1CD), Alice again hands out a 4, and the strategy works exactly like in the previous point, only the result is slightly worse for Bob.

This means that if Alice offers a 5 (or by symmetry, a 4) as the first digit, the optimal-for-both score will be 124.

We'll still want to check Alice's other options too. 7,8 and 9 are straight out (Bob will immediately place such a number as C for a score under a hundred), and by symmetry this also applies to 0,1 and 2.

So the final option to check is "Alice starts with a 6" (or by symmetry, 3).

Since this is even bigger than what Bob gets as C in the other sequence, Bob will immediately commit this as C. (2AB-16D). Again, Alice can force a 7 at best as A, so the final score will be less than 120. This means Alice shouldn't choose this strategy, so 124 is best for both.

For completeness' sake, let's confirm that the symmetric strategy promised in the first paragraph also exists:

• Alice starts with a 4 (in order to use the first-middle-then-extreme strategy)
• Bob places the 4 at A, known to be best by testing all the options (24B-1CD)
• Alice continues with a 2 (She cannot avoid giving a 2 for C, and doing it right away leaves her room for further tactics)
• This is the best Bob is ever going to get for C. (24B-12D)
• Alice offers a 5 (using the middle-then-extreme approach a second time)
• Bob puts the 5 at D (24B-125)
• Alice finishes with a 9

The final calculation is 249-125, again with a best-for-both score of 124, as expected.