Summary of Chinese Rings Puzzle With Arduino
This article describes an Arduino-based Chinese Rings Puzzle, a combinatorial challenge requiring 341 moves to untangle nine rings. The project replicates the original mechanical constraints digitally using an Arduino UNO R3 and an LCD Keypad Shield. Users navigate rings via left/right keys and select/insert them with the SELECT button. The text includes historical context, mathematical formulas for move calculations, and instructions for uploading the necessary code.
Parts used in the Chinese Rings Puzzle with Arduino:
- Arduino UNO R3
- LCD Keypad Switch
Introduction
Hello all,
The Chinese Rings Puzzle with Arduino is my version of a centennial Chinese puzzle.
It is very simple to play and it is an example of a combinatorial puzzle, and lots of patience and concentration is required to solve it.
The objective is to untangle the long loop from all nine rings, and the solution takes 341 moves (minimum possible).
Once you learn the method to solve the puzzle, you will see that is very easy to play it!
This project is very simple to be assembled, using only an Arduino UNO R3 and a LCD Keypad Shield.
It took me some time, but the code I developed reproduced exactly the same conditions and constraints as the original mechanical puzzle.
Let’s do it and have a fun for a long time!!
LAGSILVA
The Puzzle Story
Stewart Culin in his book “Games of the Orient” records a story that the Chinese Rings puzzle was invented by the famous Chinese hero Mung Ming (A.D. 181 – 234).
He apparently gave it to his wife when he went to war so she would have something to keep her busy in his absence. The story relates that she forgot her sorrow while trying to solve the puzzle.
This puzzle or the Cardano’s Rings was introduced in Europe by Girolamo Cardano in 1550 and it is perhaps the greatest mechanical puzzle of China.
The original puzzle consists of a long loop with a handle on one end that is interlocked with nine rings.
A Little of Math
The total of moves for a number of rings (n) is determined by the following equations:
1) When n is odd number:
T (n) = (2 ^ (n+1) − 1 ) / 3
2) When n is even number:
T (n) = (2 ^ (n+1) − 2 ) / 3
n T(n)
1 1
2 2
3 5
4 10
5 21
6 42
7 85
8 170
9 341
10 682
11 1365
12 2730
13 5461
14 10922
15 21845
16 43690
17 87381
18 174762
19 349525
20 699050
Material List
- Arduino UNO R3
- LCD Keypad Switch
he Code
The code is attached to this project.
Just upload it to your Arduino.
For this project you will need the Liquid Crystal library.
Playing
The first line of LCD is shown the 09 rings, and in the second line is shown the pointer.
You must use the keys LEFT & RIGHT to move the pointer, and the key SELECT to remove or to insert a ring.
For more detail: Chinese Rings Puzzle With Arduino
- What is the objective of the puzzle?
The objective is to untangle the long loop from all nine rings. - How many moves are required to solve the nine-ring version?
The solution takes a minimum of 341 moves. - Can I use this project without an Arduino?
No, the project is assembled using only an Arduino UNO R3 and an LCD Keypad Shield. - Which library is needed for the code?
You will need the Liquid Crystal library for this project. - How do you remove or insert a ring?
You must press the key SELECT to remove or insert a ring. - How do you move the pointer on the display?
You must use the keys LEFT and RIGHT to move the pointer. - Does the digital version follow the original rules?
Yes, the developed code reproduces exactly the same conditions and constraints as the original mechanical puzzle. - Who invented the Chinese Rings puzzle according to the story?
The story states it was invented by the famous Chinese hero Mung Ming.