To solve this problem, we need to carefully analyze the game dynamics and the optimal strategies for both players, A and B.
Initially, the blackboard contains 2020 copies of the number 1. The players' moves involve manipulating these numbers under certain rules:
1. Player A erases two numbers, x and y.
2. Player B then writes either x+y or ∣x−y∣ back on the blackboard.
The game ends under two conditions:
- One number becomes larger than the sum of all others.
- All numbers become zero.
To find the optimal strategies for both players:
### Analyzing the Strategies:
- **Player A Strategy:**
- Player A aims to keep the game going for as long as possible to maximize the number of cookies received. A will look to choose x and y such that the choices available to B either do not terminate the game quickly or lead to suboptimal reductions.
- **Player B Strategy:**
- Player B wants to end the game as soon as possible to minimize the number of numbers on the blackboard, thus minimizing the cookies given away. Therefore, B tries to quickly reach one of the stopping conditions, preferably making all numbers zero.
### Evaluating the Outcome:
Given the 2020 starting numbers:
1. Game Dynamics:
- Each operation by the two players reduces the total number of numbers on the board by exactly one each round.
- If m is the total number of operations performed, then the number of entries on the blackboard at the end of the game is 2020−m.
2. Equalizing Strategy:
- Player B can minimize the number of cookies by trying to ensure that the numbers gradually reduce to an equal or nearly equal state, especially driving towards zeroes by cleverly using the ∣x−y∣ operation whenever possible.
3. Optimal Play:
- Player B can achieve a situation where only 7 numbers remain on the blackboard through optimal reduction strategies despite the initial large number of 1s because:
- Using the x+y or ∣x−y∣ operation strategically can quickly consolidate numbers or eliminate non-zero numbers.
Given the optimal plays from both sides, the minimum number of numbers left on the board—and hence cookies to be given—is 7 after the conclusion of their strategies.
Thus, the number of cookies player A receives is:
7.
This solution reflects the balance between both players playing optimally to achieve their conflicting goals.