Is there any winning strategy? "Adam and Eve take turns writing one number each..."

aleksamid

New member
Joined
Jul 30, 2023
Messages
1
a) Adam and Eve take turns writing one number each until they have 20 numbers in a row. Adam writes the first number, and the only numbers they can use are 1, 2, 3, 4, and 5. Eve tries to ensure that the 20-digit number obtained is divisible by 9. Can Adam prevent it?

(b) The same task as above, but this time Adam and Eve write a 30-digit number.

I know that : "A natural number is divisible by 9 iff its checksum is." But i do not know how to continue from that.
 
a) Adam and Eve take turns writing one number each until they have 20 numbers in a row. Adam writes the first number, and the only numbers they can use are 1, 2, 3, 4, and 5. Eve tries to ensure that the 20-digit number obtained is divisible by 9. Can Adam prevent it?

(b) The same task as above, but this time Adam and Eve write a 30-digit number.

I know that : "A natural number is divisible by 9 iff its checksum is." But i do not know how to continue from that.
I haven't tried solving this yet, but I know what I'd think about first: the last pair of moves.

Under what conditions would Eve be unable to attain her goal with the 20th digit?

Under what conditions can Adam leave the number in that state after writing the 19th digit?

Then I'd think about working backward to find a strategy for Adam, if possible.
 
When you divide the sum of the first 19 numbers by 9 the remainder will be 0,1,2,...,7 or 8. Which of those remainders will allow Eve to get the sum of the 20 digits to be divisible by 9. Which remainders will not. As Dr Peterson advised, now work backwards.
 
Since it's been more than the mandatory week since op I am posting a summary answer here. To simplify the notation below all variables and expressions belong to [imath]\mathbb Z_9[/imath], i.e. considered modulo 9.
  1. Let [imath]S_i[/imath] be the sum of digits (modulo 9) at step [imath]i[/imath]. If Eve wants to be able to achieve [imath]S_{2k} \equiv n (\mbox{mod\;} 9)[/imath] she needs [imath]S_{2k-1} \in T_{2k-1} = \{n-5,n-4,n-3,n-2,n-1\}[/imath].
  2. To make sure that Adam cannot avoid putting [imath]S_{2k-1}[/imath] in [imath]T_{2k-1}[/imath] all she needs to do is to make sure that [imath]S_{2k-2} = n-6 = n+3[/imath].
  3. Since [imath]S_0 = 0[/imath] Eve can always drive [imath]S_{2k}[/imath] to [imath]3k ({mod\;} 9)[/imath]. Such strategy guarantees Eve's success when [imath]k = 30[/imath] but not for for [imath]k=20[/imath].
  4. Moreover, Adam can use a similar strategy to deny Eve's success when [imath]k[/imath] is not divisible by 3. All he has to do is to make sure that [imath]S_{2k-1} \in \{0,1,2,3\}[/imath]. For this he must pick [imath]S_1 \in R_1 = \{3k-3,3k-2,3k-1,3k\}[/imath]. The only case where he cannot do that is when [imath]R_1 \cap \{1,2,3,4,5\} = \emptyset[/imath], which means [imath]3k \equiv 0 ({mod\;} 9)[/imath]
Summary: the victory can be guaranteed for Eve when [imath]k\equiv 0 (mod\; 3)[/imath], otherwise the victory can be guaranteed for Adam.
 
Top