Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

problem: a hostile artificial intelligence called nim has taken over th…

Question

problem: a hostile artificial intelligence called nim has taken over the world’s computers. you’re the only person skilled enough to shut it down. you break into nim’s secret lab, and you find yourself on top of 25 stories of electrified water. you have created a remote that can lower the water level to 0, you can shut off nim. however, nim can lower the water as well. if nim lowers the water to 0, you will be ejected out of the secret lab. can you survive and shut off artificial intelligence?
rules:
● water starts at level 25.
● control over water drainage alternates between you and nim, and neither of you can skip a turn.
● you and nim can lower the water 1, 3, or 4 stories at a time.
● whoever can arrive exactly at level 0 first wins.
● neither can lower the water below zero, and if the water is at level 2, then the only move is to lower the water level 1 story.
● you go first.

Explanation:

Step1: Analyze winning - losing positions

We need to work backwards to find winning and losing positions. If the water level is at 0, the player whose turn it is wins. If the water level is at 1, the player can move to 0 and win. If the water level is at 2, the only move is to 1, and then the other player can move to 0 and win, so 2 is a losing position. If the water level is at 3 or 4, the player can move to 0 and win. If the water level is at 5, no matter if the player moves 1, 3, or 4, the other player can reach 0, so 5 is a losing position. If the water level is at 6 or 7, the player can move to 2 or 0 respectively and win. If the water level is at 8, no matter the move (1, 3, or 4), the other player can reach a winning position, so 8 is a losing position.
We observe a pattern: Losing positions occur at levels that are congruent to 2 or 5 modulo 7.

Step2: Check the initial level

The initial water - level is 25. Calculate 25 mod 7.
$25\div7 = 3\cdots\cdots4$.
Since 25 mod 7 = 4, and 4 is not a losing position (losing positions are of the form 7k + 2 or 7k+5, k = 0, 1, 2,...), you can win.
Your first move should be to lower the water level by 3 stories. Then, no matter how many stories NIM lowers the water level (1, 3, or 4), you can always make a move such that after your move, the remaining water - level is a losing position for NIM.

Answer:

Yes, you can survive and shut off the artificial intelligence. Your first move should be to lower the water level by 3 stories. Then, respond to NIM's moves in a way that leaves NIM with a water - level that is congruent to 2 or 5 modulo 7.