# Games with modular arithmetic

In this discussion we began with the following simple game. Two players alternate naming a number from the set {1,…,n-1} and after each move the running total is computed modulo n. You can’t play a number that’s already been played. The first player who arrives at a running total of 0 loses.

What kind of outcomes can this game have? Does either of the two players have a winning strategy? Does the answer depend on the value of n? We investigated these questions and many more in this session, which was led by three undergraduate researchers at BSU: Dan Kondratyuk, Scott Navert, and Stephanie Potter.

Before going any further, you may wish to read the Slides attachment below. which provide more details about the setup to this game. Do you want to play the game by yourself? The Cyclic exercises handout will help you play it for n=7,…,13.

After we played the game in pairs for a while, we noticed some patterns. When $n$ is even, the game never seemed to have a winner or a loser, and when $n$ was odd the first player seemed to win pretty much no matter what. Many students arrived at an explanation for this outcome too. The Worksheet handout will also lead one to a rigorous proof.

But that wasn’t all. If you are bored by working with the set {0,…,n-1}, one can also work with pairs of numbers. In group theory terms, one can play the same game in the product group Z_n x Z_m. The Challenges attachment will help you play this version of the game. Who wins in this game? The answer may surprise you!

At the conclusion of the meeting, the presenters mentioned some further variants of the game they are working on, as well as some applications of their work. Some students even suggested their own variants of the game too. What twist would you add?