The Story of the ‘Ancient Computer’ That Led Mathematics in East Asia Before the Abacus
- Understand why Sanjagi was not just a simple counting tool but a perfect algorithmic system.
- Learn how it implemented advanced mathematical concepts ahead of its time, such as zero, negative numbers, and simultaneous equations.
- Discover the implications of Sanjagi’s history for modern computational thinking education.
The Story Before Calculators
What comes to mind when you hear ‘calculator’? Most likely, you think of an abacus or an electronic calculator. However, before the abacus swept through East Asia, there was a great ‘ancient computer’, Sanjagi (算木), that dominated the intellectual world of East Asians for an astonishing 2,000 years.
People often misunderstand Sanjagi as a primitive form of the abacus, but this is not true. Sanjagi was not just a simple counting tool; it was a cutting-edge calculating device with a perfect system of its own. It implemented the abstract concepts of algebra hundreds of years before the West. Let us now follow the tumultuous journey of Sanjagi, the forgotten hero that ruled the intellectual thought of an era.
Chapter 1: The Birth of the Ancient Computer
Long Ago, Born from the Needs of Reality
The first appearance of Sanjagi is surprisingly found not in mathematics books but in philosophical and military strategy texts. In the 5th century BC, during the Warring States period in China, numbers represented by Sanjagi already appeared in currency, indicating that Sanjagi was born to solve practical problems such as tax collection and commerce.
The great thinker Laozi (老子) stated in the Tao Te Ching that “a truly skilled calculator does not rely on Sanjagi (善數不用籌策)”. This paradoxically proves how common a symbol of calculation Sanjagi was in the intellectual society of that time. Even the strategist Sunzi (孫子) mentioned Sanjagi to calculate the odds of victory in war.
In the 1950s and 70s, actual Sanjagi artifacts were discovered in ancient tombs, making these records a vivid reality. Sanjagi was not a product of pure mathematical exploration but an ‘applied science’ born from taxes, calendars, and war strategies. This practical origin fundamentally endowed Sanjagi’s calculation method with procedural and logical, that is, algorithmic characteristics, much like modern computer programming.
The Promise Encased in Bamboo Rods
So, what did this ancient computer look like? According to the Book of Han (漢書), Sanjagi was primarily made of bamboo, measuring about 14 cm in length and 0.7 cm in diameter. It is said that 271 Sanjagi rods were carried in a hexagonal container, making it seem like quite a professional tool.
By the time of the Han Dynasty, the standardization of Sanjagi indicated that it was no longer a personal tool but a ‘cognitive tool’ recognized by the state. This became an important foundation for spreading a common mathematical language across East Asia. This wonderful tool was known by slightly different names in Korea (Sanjagi, Sanmok), China (Sanzhu), and Japan (Sanki), but all explored the world of mathematics using the same system.
Chapter 2: The Secrets of Ahead-of-Its-Time Design
The Magic of Ten Columns: The Place-Value System
The greatest aspect of the Sanjagi system was its use of a perfect decimal place-value system. The value of Sanjagi on the counting board was determined by which ‘column’ it was placed in. From the right, the positions were designated as units, tens, hundreds, and thousands. Each time a number was moved one column to the left, its value increased exactly tenfold. This was a revolutionary mathematical advancement that allowed for very efficient handling of complex calculations.
The Aesthetics of Vertical and Horizontal, Interleaving
If you were to place ‘123’ using Sanjagi, how could you distinguish the digits? Ancient East Asian mathematicians solved this problem in a very creative way.
They changed the direction of placement for each digit. Odd positions, such as units and hundreds, were placed vertically (縱), while even positions, such as tens and thousands, were placed horizontally (橫). For example, ‘12’ was represented by one horizontal rod (十) and two vertical rods (二), looking like ‘⊤∣∣’, so there was no confusion with ‘3’, represented as ‘∣∣∣’. Isn’t that an elegant design?
Seeing the Invisible: Zero, Negative Numbers, Fractions
The true greatness of Sanjagi lies in its ability to implement invisible abstract concepts in physical form.
- Discovery of Zero: If a specific place value was empty, it was simply left as a ‘blank space’. Before other civilizations invented the ‘symbol’ for zero, it had already perfectly implemented the concept of a ‘placeholder’ that maintained place value. This blank space was ‘0’.
- Concept of Debt, Negative Numbers: While it took hundreds of years for European mathematics to accept negative numbers, East Asians freely handled negative numbers using red (positive) and black (negative) Sanjagi rods or by placing the last Sanjagi rod diagonally. This naturally developed from the practical concept of ‘debt’ when solving simultaneous equations in the Nine Chapters on the Mathematical Art.
- Expression of Division, Fractions: The numerator was placed above, and the denominator below using Sanjagi. This is almost identical to modern fraction notation.
| Arabic Numerals | Vertical Placement (Units, Hundreds…) | Horizontal Placement (Tens, Thousands…) |
|---|---|---|
| 1 | ∣ | — |
| 2 | ∣∣ | = |
| 3 | ∣∣∣ | ≡ |
| 4 | ∣∣∣∣ | ≡ |
| 5 | ∣∣∣∣∣ | ≡ |
| 6 | ⊤ | ⊥ |
| 7 | ⊤∣ | ⊥ |
| 8 | ⊤∣∣ | ⊥ |
| 9 | ⊤∣∣∣ | ⊥ |
| Example: 2024 | ∣∣ (blank) ∣∣ ∣∣∣∣ | |
| Example: 0 | (blank) or 〇 | |
| Example: -47 | ≡≡╱ (diagonal rod for negative) |
Chapter 3: Algorithms Unfolding at Your Fingertips
Calculate Like a Machine, Think Like a Human
The method of calculation using Sanjagi, known as Jusan (籌算), was a physical and procedural process of moving Sanjagi according to set rules, or algorithms. Complex multiplication or division was solved by rearranging the Sanjagi on the counting board in a predetermined order.
Interestingly, the Sanjagi calculation process remarkably resembles the operation of modern computers. The counting board served as ‘memory’ for storing data, the mathematician’s hand acted as the ‘CPU’ processing operations, and the calculation rules functioned as ‘software (algorithms)’. This not only sought answers but also naturally instilled a mindset of breaking down problem-solving processes into logical steps.
Timeless Advanced Mathematics
The Sanjagi calculation method demonstrated its true power in solving higher-level problems beyond basic arithmetic.
- Open Method (開方術): An algorithm for finding square roots (√) or cube roots (∛), continuously correcting errors to approach the correct answer. Remarkably, this is essentially the same principle as modern numerical analysis’s ‘Horner’s method’.
- Simultaneous Equations and Matrices: The method for solving simultaneous equations in the Nine Chapters on the Mathematical Art involved laying out the coefficients of the equations on the counting board like a table and eliminating variables by adding and subtracting rows. This is functionally identical to the process of solving simultaneous equations using matrices with Gaussian elimination in modern mathematics. Sanjagi and the counting board acted as a massive matrix calculator.
- The Pinnacle of Algebra, Tianyuan Method (天元術): A method for establishing and solving higher-order equations that include unknowns x. The unknown was referred to as ‘Tianyuan (天元)’, and coefficients were visually represented by stacking them in order from the constant term to the first and second degree, then solved using an algorithm similar to the assembly method.
Chapter 4: Joseon Opens the Golden Age of Sanjagi
A Pride Preserved Alone
While commerce flourished in China and Japan, leading to the popularity of the faster abacus, Joseon uniquely maintained and further developed Sanjagi. This was because the national technical examination, Jabgwa (雜科), placed more emphasis on solving complex equations than on simple calculations. Thanks to this, Joseon mathematicians could explore the depths of algebra using the excellent tool of Sanjagi.
The Superstar of Joseon Mathematics, Hong Jeong-ha
The golden age of Joseon mathematics blossomed in the 18th century under the mathematician Hong Jeong-ha (洪正夏), who came from the middle class. His book Gu-il-jip (九一集) details the process of solving a 10th degree polynomial equation using the Tianyuan method with Sanjagi. This was a highly advanced algebraic problem that was unimaginable with an abacus.
Equation Problems Featured in Hong Jeong-ha’s Book Gu-il-jip
In 1713, a dramatic incident showcased his fame. When a Qing Dynasty envoy, Ha Guk-joo (何國柱), displayed his mathematical skills during a visit to Joseon, Hong Jeong-ha was challenged to compete with him. Using the Tianyuan method, Hong Jeong-ha solved the complex equation problem posed by Ha Guk-joo right before his eyes, astonishing him. This anecdote symbolizes the pinnacle of traditional algebra centered around Sanjagi in Joseon and the intellectual encounter with Qing mathematics, which was absorbing Western mathematics.
Chapter 5: The Hero’s Lonely Exit
The Challenger of Speed, The Emergence of the Abacus
The Sanjagi that held the throne in Joseon eventually faced a new challenger, the abacus. In everyday addition and subtraction, the abacus was much faster than Sanjagi. I would liken this competition to a battle between a ‘high-performance workstation for experts (Sanjagi)’ and a ‘smartphone for everyday use (abacus)’. Sanjagi was optimized for complex tasks like solving higher-order equations, while the abacus excelled in quickly and easily handling simple calculations. Ultimately, the victory tilted towards the power of versatility.
The Great Wave, The Arrival of Western Mathematics
However, what completely severed the lifeline of Sanjagi was the arrival of Western mathematics in the late 19th century during the Enlightenment period. New schools taught Arabic numerals and written calculations (필산) as part of a national modernization project. The decline of Sanjagi was not merely a defeat of technology. It was a facet of the civilizational transition where the unique mathematical world of East Asia was absorbed into a new global knowledge system centered on the West.
Chapter 6: The Echo That Does Not Fade
Traces That Remain with Us
While the life of Sanjagi as a calculating tool has ended, its spirit still lives on in our culture and language.
- Sanjagi in Language: The phrase “breaking the San-tong” means ruining something that was going well, where ‘San-tong’ refers to the Sanjagi rods used for counting.
- Sanjagi in Food: The name of the skewer dish ‘Sanjeok (散炙)’ was given because the appearance of the ingredients skewered resembles the scattered arrangement of Sanjagi.
Sanjagi Reborn in the Classroom
Surprisingly, Sanjagi has recently returned to us, recognized for its educational value. Games using Sanjagi rods have become excellent teaching tools that not only enhance arithmetic skills but also develop spatial perception and creativity in children by allowing them to create shapes.
Moreover, the procedural characteristics of the Sanjagi calculation method are highly effective in teaching computational thinking, which is emphasized in modern STEM education. The process of manipulating rods according to set rules to solve problems is the best way to learn the fundamental principles of algorithms physically. The legacy of Sanjagi has evolved from ‘calculation’ to ’training in how to think’.
Comparison/Alternatives
Sanjagi vs. Abacus: What Was Different?
| Category | Sanjagi (算木) | Abacus (籌板) |
|---|---|---|
| Strengths | Favorable for higher mathematics and algebra such as higher-order equations and matrices | Extremely fast for basic arithmetic like addition and subtraction |
| Principle | Based on algorithmic, procedural manipulation using place-value system | Immediate operations through physical actions of flicking beads |
| Users | Professional mathematicians, national technical officials | Merchants, general public |
| Weaknesses | Slow for everyday calculations | Unsuitable for solving complex algebraic problems |
| Significance | A tool for training algorithmic thinking | Commercial practicality and popularization of calculation |
Conclusion
The journey of Sanjagi tells us much.
- Tools Shape Thinking: The act of moving rods on the counting board naturally instilled algorithmic thinking, which resonates with the spirit of modern computer science.
- A System Ahead of Its Time: Sanjagi was a timeless mathematical system that visually and physically implemented concepts of decimal systems, zero, negative numbers, and matrices.
- Pride of Joseon Mathematics: Joseon reached the highest level of algebra in East Asia through Sanjagi, culminating in Hong Jeong-ha’s Gu-il-jip.
Although Sanjagi has faded into the background of history, the logical principles and wisdom contained within it are being revived in today’s computational thinking education. How about taking another look at Sanjagi as an excellent tool for the future education of our children, beyond mere museum artifacts?