Home More Apps

Nim Sum Master

Master Combinatorial Game Theory Through Play

Welcome to Nim Sum Master!

Learn the winning strategy for the classic Game of Nim - a fundamental concept in Combinatorial Game Theory often featured in Math Olympiad competitions.

1

Single Pile

Start with basics - learn when you can guarantee a win with one pile of matchsticks.

2

Two Piles

Master the strategy for two-pile games using the XOR principle.

N

Multi-Piles

Apply Nim Sum theory to any number of piles and never lose again!

?

Learn Theory

Understand the mathematical theory behind the winning strategy.

Single Pile Game

Rules: Two players take turns removing 1 to 3 matchsticks from a pile. The player who takes the last matchstick wins!

Two Piles Game

Rules: There are 2 piles of different number of matchsticks. Two players take turns removing any number of matchsticks from ONE of the piles. The player who takes the last matchstick wins! How many matchsticks should the first mover take to guarantee a win?

Multi-Piles Nim Game

Rules: Multiple piles of matchsticks. Take any number from ONE pile per turn. Last matchstick wins!

Nim Sum Theory

Practice Problems

Test your understanding with these Math Olympiad-style problems!

Problem 1 Easy

Score: 0 / 0