Rod calculus or rod calculation was the mechanical method of algorithmic computation with counting rods in China from the Warring States to Ming dynasty before the counting rods were increasingly replaced by the more convenient and faster abacus. Rod calculus played a key role in the development of Chinese mathematics to its height in the Song dynasty and Yuan dynasty, culminating in the invention of polynomial equations of up to four unknowns in the work of Zhu Shijie.
The basic equipment for carrying out rod calculus is a bundle of counting rods and a counting board. The counting rods are usually made of bamboo sticks, about 12 cm- 15 cm in length, 2mm to 4 mm diameter, sometimes from animal bones, or ivory and jade (for well-heeled merchants). A counting board could be a table top, a wooden board with or without grid, on the floor or on sand.
In 1971 Chinese archaeologists unearthed a bundle of well-preserved animal bone counting rods stored in a silk pouch from a tomb in Qian Yang county in Shanxi province, dated back to the first half of Han dynasty (206 BC – 8AD).[ citation needed ] In 1975 a bundle of bamboo counting rods was unearthed.[ citation needed ]
The use of counting rods for rod calculus flourished in the Warring States, although no archaeological artefacts were found earlier than the Western Han dynasty (the first half of Han dynasty; however, archaeologists did unearth software artefacts of rod calculus dated back to the Warring States); since the rod calculus software must have gone along with rod calculus hardware, there is no doubt that rod calculus was already flourishing during the Warring States more than 2,200 years ago.
The key software required for rod calculus was a simple 45 phrase positional decimal multiplication table used in China since antiquity, called the nine-nine table, which were learned by heart by pupils, merchants, government officials and mathematicians alike.
Rod numerals is the only numeric system that uses different placement combination of a single symbol to convey any number or fraction in the Decimal System. For numbers in the units place, every vertical rod represent 1. Two vertical rods represent 2, and so on, until 5 vertical rods, which represents 5. For number between 6 and 9, a biquinary system is used, in which a horizontal bar on top of the vertical bars represent 5. The first row are the number 1 to 9 in rod numerals, and the second row is the same numbers in horizontal form.
For numbers larger than 9, a decimal system is used. Rods placed one place to the left of the units place represent 10 times that number. For the hundreds place, another set of rods is placed to the left which represents 100 times of that number, and so on. As shown in the adjacent image, the number 231 is represented in rod numerals in the top row, with one rod in the units place representing 1, three rods in the tens place representing 30, and two rods in the hundreds place representing 200, with a sum of 231.
When doing calculation, usually there was no grid on the surface. If rod numerals two, three, and one is placed consecutively in the vertical form, there's a possibility of it being mistaken for 51 or 24, as shown in the second and third row of the adjacent image. To avoid confusion, number in consecutive places are placed in alternating vertical and horizontal form, with the units place in vertical form, [1] as shown in the bottom row on the right.
In Rod numerals, zeroes are represented by a space, which serves both as a number and a place holder value. Unlike in Hindu-Arabic numerals, there is no specific symbol to represent zero. Before the introduction of a written zero, in addition to a space to indicate no units, the character in the subsequent unit column would be rotated by 90°, to reduce the ambiguity of a single zero. [2] For example 107 (𝍠 𝍧) and 17 (𝍩𝍧) would be distinguished by rotation, in addition to the space, though multiple zero units could lead to ambiguity, e.g. 1007 (𝍩 𝍧), and 10007 (𝍠 𝍧). In the adjacent image, the number zero is merely represented with a space.
Song mathematicians used red to represent positive numbers and black for negative numbers. However, another way is to add a slash to the last place to show that the number is negative. [3]
The Mathematical Treatise of Sunzi used decimal fraction metrology. The unit of length was 1 chi,
1 chi = 10 cun, 1 cun = 10 fen, 1 fen = 10 li, 1 li = 10 hao, 10 hao = 1 shi, 1 shi = 10 hu.
1 chi 2 cun 3 fen 4 li 5 hao 6 shi 7 hu is laid out on counting board as
where is the unit measurement chi.
Southern Song dynasty mathematician Qin Jiushao extended the use of decimal fraction beyond metrology. In his book Mathematical Treatise in Nine Sections , he formally expressed 1.1446154 day as
He marked the unit with a word “日” (day) underneath it. [4]
Rod calculus works on the principle of addition. Unlike Arabic numerals, digits represented by counting rods have additive properties. The process of addition involves mechanically moving the rods without the need of memorising an addition table. This is the biggest difference with Arabic numerals, as one cannot mechanically put 1 and 2 together to form 3, or 2 and 3 together to form 5.
The adjacent image presents the steps in adding 3748 to 289:
The rods in the augend change throughout the addition, while the rods in the addend at the bottom "disappear".
In situation in which no borrowing is needed, one only needs to take the number of rods in the subtrahend from the minuend. The result of the calculation is the difference. The adjacent image shows the steps in subtracting 23 from 54.
In situations in which borrowing is needed such as 4231–789, one need use a more complicated procedure. The steps for this example are shown on the left.
Sunzi Suanjing described in detail the algorithm of multiplication. On the left are the steps to calculate 38×76:
The animation on the left shows the steps for calculating 309/7 = 441/7.
The Sunzi algorithm for division was transmitted in toto by al Khwarizmi to Islamic country from Indian sources in 825AD. Al Khwarizmi's book was translated into Latin in the 13th century, The Sunzi division algorithm later evolved into Galley division in Europe. The division algorithm in Abu'l-Hasan al-Uqlidisi's 925AD book Kitab al-Fusul fi al-Hisab al-Hindi and in 11th century Kushyar ibn Labban's Principles of Hindu Reckoning were identical to Sunzu's division algorithm.
If there is a remainder in a place value decimal rod calculus division, both the remainder and the divisor must be left in place with one on top of another. In Liu Hui's notes to Jiuzhang suanshu (2nd century BCE), the number on top is called "shi" (实), while the one at bottom is called "fa" (法). In Sunzi Suanjing , the number on top is called "zi" (子) or "fenzi" (lit., son of fraction), and the one on the bottom is called "mu" (母) or "fenmu" (lit., mother of fraction). Fenzi and Fenmu are also the modern Chinese name for numerator and denominator, respectively. As shown on the right, 1 is the numerator remainder, 7 is the denominator divisor, formed a fraction 1/7. The quotient of the division 309/7 is 44 + 1/7. Liu Hui used a lot of calculations with fractions in Haidao Suanjing.
This form of fraction with numerator on top and denominator at bottom without a horizontal bar in between, was transmitted to Arabic country in an 825AD book by al Khwarizmi via India, and in use by 10th century Abu'l-Hasan al-Uqlidisi and 15th century Jamshīd al-Kāshī's work "Arithematic Key".
1/3 + 2/5
8/9 − 1/5
31/3 × 52/5
The algorithm for finding the highest common factor of two numbers and reduction of fraction was laid out in Jiuzhang suanshu. The highest common factor is found by successive division with remainders until the last two remainders are identical. The animation on the right illustrates the algorithm for finding the highest common factor of 32,450,625/59,056,400 and reduction of a fraction.
In this case the hcf is 25.
Divide the numerator and denominator by 25. The reduced fraction is 1,298,025/2,362,256.
Calendarist and mathematician He Chengtian (何承天) used fraction interpolation method, called "harmonisation of the divisor of the day" (调日法) to obtain a better approximate value than the old one by iteratively adding the numerators and denominators a "weaker" fraction with a "stronger fraction". [5] Zu Chongzhi's legendary π = 355/113 could be obtained with He Chengtian's method [6]
Chapter Eight Rectangular Arrays of Jiuzhang suanshu provided an algorithm for solving System of linear equations by method of elimination: [7]
Problem 8-1: Suppose we have 3 bundles of top quality cereals, 2 bundles of medium quality cereals, and a bundle of low quality cereal with accumulative weight of 39 dou. We also have 2, 3 and 1 bundles of respective cereals amounting to 34 dou; we also have 1,2 and 3 bundles of respective cereals, totaling 26 dou.
Find the quantity of top, medium, and poor quality cereals. In algebra, this problem can be expressed in three system equations with three unknowns.
This problem was solved in Jiuzhang suanshu with counting rods laid out on a counting board in a tabular format similar to a 3x4 matrix:
quality | left column | center column | right column |
---|---|---|---|
top | |||
medium | |||
low | |||
shi |
Algorithm:
quality | left column | center column | right column |
---|---|---|---|
top | |||
medium | |||
low | |||
shi |
The amount of one bundle of low quality cereal
From which the amount of one bundle of top and medium quality cereals can be found easily:
Algorithm for extraction of square root was described in Jiuzhang suanshu and with minor difference in terminology in Sunzi Suanjing.
The animation shows the algorithm for rod calculus extraction of an approximation of the square root from the algorithm in chap 2 problem 19 of Sunzi Suanjing:
The algorithm is as follows:
.
North Song dynasty mathematician Jia Xian developed an additive multiplicative algorithm for square root extraction, in which he replaced the traditional "doubling" of "fang fa" by adding shang digit to fang fa digit, with same effect.
Jiuzhang suanshu vol iv "shaoguang" provided algorithm for extraction of cubic root.
〔一九〕今有積一百八十六萬八百六十七尺。問為立方幾何?答曰:一百二十三尺。
problem 19: We have a 1860867 cubic chi, what is the length of a side ? Answer:123 chi.
North Song dynasty mathematician Jia Xian invented a method similar to simplified form of Horner scheme for extraction of cubic root. The animation at right shows Jia Xian's algorithm for solving problem 19 in Jiuzhang suanshu vol 4.
North Song dynasty mathematician Jia Xian invented Horner scheme for solving simple 4th order equation of the form
South Song dynasty mathematician Qin Jiushao improved Jia Xian's Horner method to solve polynomial equation up to 10th order. The following is algorithm for solving
This equation was arranged bottom up with counting rods on counting board in tabular form
0 | shang | root |
---|---|---|
626250625 | shi | constant |
0 | fang | coefficient of x |
15245 | shang lian | positive coef of |
0 | fu lian | negative coef of |
0 | xia lian | coef of |
1 | yi yu | negative coef of |
Algorithm:
Yuan dynasty mathematician Li Zhi developed rod calculus into Tian yuan shu
Example Li Zhi Ceyuan haijing vol II, problem 14 equation of one unknown:
Mathematician Zhu Shijie further developed rod calculus to include polynomial equations of 2 to four unknowns.
For example, polynomials of three unknowns:
Equation 1:
Equation 2:
Equation 3:
After successive elimination of two unknowns, the polynomial equations of three unknowns was reduced to a polynomial equation of one unknown:
Solved x=5;
Which ignores 3 other answers, 2 are repeated.
Arithmetic is an elementary branch of mathematics that studies numerical operations like addition, subtraction, multiplication, and division. In a wider sense, it also includes exponentiation, extraction of roots, and taking logarithms.
Chinese numerals are words and characters used to denote numbers in written Chinese.
The decimal numeral system is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers of the Hindu–Arabic numeral system. The way of denoting numbers in the decimal system is often referred to as decimal notation.
An irreducible fraction is a fraction in which the numerator and denominator are integers that have no other common divisors than 1. In other words, a fraction a/b is irreducible if and only if a and b are coprime, that is, if a and b have a greatest common divisor of 1. In higher mathematics, "irreducible fraction" may also refer to rational fractions such that the numerator and the denominator are coprime polynomials. Every rational number can be represented as an irreducible fraction with positive denominator in exactly one way.
A continued fraction is a mathematical expression that can be writen as a fraction with a denominator that is a sum that contains another simple or continued fraction. Depending on whether this iteration terminates with a simple fraction or not, the continued fraction is finite or infinite.
The Liber Abaci or Liber Abbaci was a 1202 Latin work on arithmetic by Leonardo of Pisa, posthumously known as Fibonacci. It is primarily famous for helping popularize Arabic numerals in Europe.
A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method for representing numbers that uses only two symbols for the natural numbers: typically "0" (zero) and "1" (one). A binary number may also refer to a rational number that has a finite representation in the binary numeral system, that is, the quotient of an integer by a power of two.
A numerical digit or numeral is a single symbol used alone or in combinations, to represent numbers in a positional numeral system. The name "digit" comes from the fact that the ten digits of the hands correspond to the ten symbols of the common base 10 numeral system, i.e. the decimal digits.
In mathematics, the lowest common denominator or least common denominator is the lowest common multiple of the denominators of a set of fractions. It simplifies adding, subtracting, and comparing fractions.
Positional notation, also known as place-value notation, positional numeral system, or simply place value, usually denotes the extension to any base of the Hindu–Arabic numeral system. More generally, a positional system is a numeral system in which the contribution of a digit to the value of a number is the value of the digit multiplied by a factor determined by the position of the digit. In early numeral systems, such as Roman numerals, a digit has only one value: I means one, X means ten and C a hundred. In modern positional systems, such as the decimal system, the position of the digit means that its value must be multiplied by some value: in 555, the three identical symbols represent five hundreds, five tens, and five units, respectively, due to their different positions in the digit string.
Location arithmetic is the additive (non-positional) binary numeral systems, which John Napier explored as a computation technique in his treatise Rabdology (1617), both symbolically and on a chessboard-like grid.
A fraction represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight-fifths, three-quarters. A common, vulgar, or simple fraction consists of an integer numerator, displayed above a line, and a non-zero integer denominator, displayed below that line. If these integers are positive, then the numerator represents a number of equal parts, and the denominator indicates how many of those parts make up a unit or a whole. For example, in the fraction 3/4, the numerator 3 indicates that the fraction represents 3 equal parts, and the denominator 4 indicates that 4 parts make up a whole. The picture to the right illustrates 3/4 of a cake.
In mathematics, matrix calculus is a specialized notation for doing multivariable calculus, especially over spaces of matrices. It collects the various partial derivatives of a single function with respect to many variables, and/or of a multivariate function with respect to a single variable, into vectors and matrices that can be treated as single entities. This greatly simplifies operations such as finding the maximum or minimum of a multivariate function and solving systems of differential equations. The notation used here is commonly used in statistics and engineering, while the tensor index notation is preferred in physics.
Methods of computing square roots are algorithms for approximating the non-negative square root of a positive real number . Since all square roots of natural numbers, other than of perfect squares, are irrational, square roots can usually only be computed to some finite precision: these methods typically construct a series of increasingly accurate approximations.
A decimal representation of a non-negative real number r is its expression as a sequence of symbols consisting of decimal digits traditionally written with a single separator: Here . is the decimal separator, k is a nonnegative integer, and are digits, which are symbols representing integers in the range 0, ..., 9.
A division algorithm is an algorithm which, given two integers N and D, computes their quotient and/or remainder, the result of Euclidean division. Some are applied by hand, while others are employed by digital circuit designs and software.
In mathematics, a quadratic equation is a polynomial equation of the second degree. The general form is
In algebra, an algebraic fraction is a fraction whose numerator and denominator are algebraic expressions. Two examples of algebraic fractions are and . Algebraic fractions are subject to the same laws as arithmetic fractions.
Counting rods (筭) are small bars, typically 3–14 cm long, that were used by mathematicians for calculation in ancient East Asia. They are placed either horizontally or vertically to represent any integer or rational number.
Principles of Hindu Reckoning is a mathematics book written by the 10th- and 11th-century Persian mathematician Kushyar ibn Labban. It is the second-oldest book extant in Arabic about Hindu arithmetic using Hindu-Arabic numerals, preceded by Kitab al-Fusul fi al-Hisub al-Hindi by Abul al-Hassan Ahmad ibn Ibrahim al-Uglidis, written in 952.