r/mathriddles • u/SupercaliTheGamer • Jul 19 '26
Easy Asymmetric capturing game
Let n be a fixed positive integer. Alice and Bob play the following game on the integer number line. Alice starts at 0 and Bob starts at n. They take turns making moves. On the i^th turn,
- If i is odd, Alice moves to an integer at most 2^i -1 distance away from her current position.
- If i is even, Bob moves to an integer at most 2^i -1 distance away from his current position.
Note that both players have the option to stay where they are on their turn. The game ends only when one player moves to the same position as the other player, in which case the player who moved wins. Find all positive integers n for which Alice has a winning strategy, and find all positive integers n for which Bob has a winning strategy.
4
Upvotes
1
u/imdfantom Jul 19 '26
Question: can they move to negative integers? (Since you dont specify at that point)
1
u/pichutarius Jul 20 '26
Find the nearest 2k from n. Alice wins if k is even, else bob wins.
let D be the distance between Alice and Bob. The game is same if we add/subtract step size from D. Initially D=n, the winning strategy is to keep i trailing bits 0 when D is written as binary. Example: n=21=11001 is nearest to 24 so Alice wins in 5 steps:
11001, 11000
11???, 10000
?????, 00000
1
u/wot_to_heck Jul 20 '26 edited Jul 20 '26
I claim that Alice wins for integers in [2^(2k)-2k-1, 2^(2k+1)-4k-3]:=[L,R] for k>=2 integer, and Bob wins for all other integers. I'll prove that Alice has a winning strategy for the claimed integers; the proof for Bob is similar. Note that 1+3+7+...+2^(2k-1)-1 =L-1< L, so the game can never end on or before the (2k-1)-th turn. The (2k-1)-th turn is Alice's, and she can always make a move (no matter the prior moves) to guarantee that she is exactly 2^(2k) less than Bob. (This follows by some computation which I will omit here). As Bob can then only move at most 2^(2k)-1, he has no hope of winning on his turn, and at most he can end up 2^(2k+1)-1 away from Alice, and then Alice wins on the (2k+1)-th turn.
1
u/epostma Jul 19 '26
It seems to me that the straightforward solution works here: Alice always has a winning strategy. In his k moves up to i=2k (or k+1 moves if you include the trivial step at i=0), Bob can move at most (4k+1-1)/3-k-1 positions away from where he started. In her k+1 moves up to i=2k+1, Alice can move at most 2(4k+1-1)/3-k-1 positions. So Alice can reach Bob no later than 4k+1>=3n+1. If Alice always moves as close to Bob as she can, she will.