Try These Logic Puzzles from the International Logic Olympiad

The competition included three rounds of tests, culminating in the final one at Stanford. There teams of two to four engaged in a battle of wits, solving and competing in mathematical games against the backdrop of the foothills of Palo Alto, Calif. The winners this year were 11th-grade students Luke Song, Zixuan Yin, Kingston Zhang and Max Yang, who, unhappy with their official moniker of “Team I,” informally dubbed themselves “Team Goblin Tribe” after a video skit they watched during a review session. The key to their success, they contend, was lots of practice and teamwork. “I think part of the reason why we were able to do so well in this was because I know my teammates really well and we’ve been friends for many years,” Song says.

If you’re enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.

Most of this year’s winners have an interest in computer science, alongside environmental science, applied math and electrical engineering, but Zhang says that neither math nor computer science are his “strong suit” and that he plans to go into political science. “A lot of the problems require very expansive thinking and creative solutions, and I think that’ll definitely help me if I go into policy in the future,” he explains.

A special aspect of the olympiad is its collaborative nature, in which teams work together to solve problems, Yin says. He was particularly proud of how he and his teammates collaborated on a puzzle called Nations (below). After he reasoned out that a solution offered by one of the members of his group must be wrong and came up with an alternate one that proved correct, that teammate “just kept on telling me how fortunate he was to have me on his team,” Yin says. “Having these amazing people to work on logic—it’s something that unites our friend group together.”

Here are a few curated puzzles from the competition that you can try your hand at with a friend group of your own. Some of the puzzles have been edited to better fit the format of this article.

Four students, numbered 1, 2, 3 and 4, vote among themselves to determine who should lead their review session. Each student is required to vote “yes” or “no” for each person in the group, including themselves. The following are true statements about their ballots:

Determine, to the extent possible from these statements, who did and did not vote for whom. Fill that out in the following grid with a check for a yes vote, an “x” for a no vote and a blank if you can’t know for sure. Each row represents the ballot of the number listed at the left.

Note: If we have a statement A that is not true, we consider any sentence of the form “if A, then B” to be true. For example, “if the sky is green, then ____” is true no matter what goes in the blank because the premise is false. You will need this fact to solve the puzzle.

1. What is the answer to question 2?

A. B
B. A
C. D
D. C

2. What is the answer to question 3?

A. C
B. D
C. B
D. A

3. What is the answer to question 4?

A. D
B. A
C. C
D. B

4. What is the answer to question 1?

A. D
B. C
C. A
D. B

A combination safe is opened with a series of four switches that can be flipped on (1) or off (0). The safe is broken, so in order to open it, you only need to get the position of two particular switches correct—but there’s no way of knowing which switches are the ones that matter. Find the smallest set of combinations you can try to guarantee that one of them will open the safe. 

There are two types of nations: strong and weak. Only weak nations can be invaded, and only strong nations can invade. If a strong nation invades a weak nation, it will annex the weak nation, but it will become weak, and thus invadable, for some period of time. Only one strong nation may invade a weak nation at a time. If multiple nations decide to invade the same weak nation, one is randomly chosen to be allowed to invade. Each nation wants to be as big as possible but not at the expense of being annexed itself. Assume all nations are completely rational. There are five strong nations and one weak nation. Will the weak nation be invaded?

Hint: Try starting with one strong nation and one weak nation first and then build up from there. In order to solve the problem, try to see how complex cases can be reduced to simpler ones⁠—a method formally known as “mathematical induction.”

This puzzle was also included in the ILO. Competitors had to solve it under a time limit using only a pencil and paper.

Friends

Quiz

1. D 
2. C 
3. B
4. A

Safe Cracking

To guarantee you can crack the safe, you’ll need to have every possible set of positions for each pair of switches represented. That way, no matter which two switches are the ones that matter or which positions open the safe, one of the codes will crack it. The minimum number of combinations needed is five. Here’s one possible solution: 1000, 0100, 0010, 0001, 1111.

Nations

Emma R. Hasson is a Ph.D. candidate in mathematics at the City University of New York Graduate Center with expertise in math education and communication. Hasson is also a 2025 AAAS Mass Media Fellow at Scientific American.