HOME

TheInfoList



OR:

Liu Hui's algorithm was invented by
Liu Hui Liu Hui () was a Chinese mathematician who published a commentary in 263 CE on ''Jiu Zhang Suan Shu (The Nine Chapters on the Mathematical Art).'' He was a descendant of the Marquis of Zixiang of the Eastern Han dynasty and lived in the state o ...
(fl. 3rd century), a mathematician of the state of Cao Wei. Before his time, the ratio of the circumference of a circle to its diameter was often taken experimentally as three in China, while
Zhang Heng Zhang Heng (; AD 78–139), formerly romanization of Chinese, romanized as Chang Heng, was a Chinese polymathic scientist and statesman who lived during the Eastern Han dynasty, Han dynasty. Educated in the capital cities of Luoyang and Chang ...
(78–139) rendered it as 3.1724 (from the proportion of the celestial circle to the diameter of the earth, ) or as \pi \approx \sqrt \approx 3.162. Liu Hui was not satisfied with this value. He commented that it was too large and overshot the mark. Another mathematician
Wang Fan Wang Fan (228–266), courtesy name Yongyuan, was a Chinese astronomer, mathematician, politician, and writer of the state of Eastern Wu during the Three Kingdoms period of China. Life Wang Fan was from Lujiang Commandery (), which is located ...
(219–257) provided . All these empirical values were accurate to two digits (i.e. one decimal place). Liu Hui was the first Chinese mathematician to provide a rigorous algorithm for calculation of to any accuracy. Liu Hui's own calculation with a 96-gon provided an accuracy of five digits: . Liu Hui remarked in his commentary to ''
The Nine Chapters on the Mathematical Art ''The Nine Chapters on the Mathematical Art'' () is a Chinese mathematics book, composed by several generations of scholars from the 10th–2nd century BCE, its latest stage being from the 2nd century CE. This book is one of the earliest su ...
'', that the ratio of the circumference of an inscribed hexagon to the diameter of the circle was three, hence must be greater than three. He went on to provide a detailed step-by-step description of an iterative algorithm to calculate to any required accuracy based on bisecting polygons; he calculated to between 3.141024 and 3.142708 with a 96-gon; he suggested that 3.14 was a good enough approximation, and expressed as 157/50; he admitted that this number was a bit small. Later he invented an ingenious quick method to improve on it, and obtained with only a 96-gon, with an accuracy comparable to that from a 1536-gon. His most important contribution in this area was his simple iterative algorithm.


Area of a circle

Liu Hui argued: :"''Multiply one side of a hexagon by the radius (of its circumcircle), then multiply this by three, to yield the area of a dodecagon; if we cut a hexagon into a dodecagon, multiply its side by its radius, then again multiply by six, we get the area of a 24-gon; the finer we cut, the smaller the loss with respect to the area of circle, thus with further cut after cut, the area of the resulting polygon will coincide and become one with the circle; there will be no loss''". Apparently Liu Hui had already mastered the concept of the limit : \lim_\textN\text = \text. \, Further, Liu Hui proved that the area of a circle is half of its circumference multiplied by its radius. He said: "''Between a polygon and a circle, there is excess radius. Multiply the excess radius by a side of the polygon. The resulting area exceeds the boundary of the circle''". In the diagram = excess radius. Multiplying by one side results in oblong which exceeds the boundary of the circle. If a side of the polygon is small (i.e. there is a very large number of sides), then the excess radius will be small, hence excess area will be small. As in the diagram, when , , and . "''Multiply the side of a polygon by its radius, and the area doubles; hence multiply half the circumference by the radius to yield the area of circle''". When , half the circumference of the -gon approaches a semicircle, thus half a circumference of a circle multiplied by its radius equals the area of the circle. Liu Hui did not explain in detail this deduction. However, it is self-evident by using Liu Hui's "in-out complement principle" which he provided elsewhere in ''The Nine Chapters on the Mathematical Art'': Cut up a geometric shape into parts, rearrange the parts to form another shape, the area of the two shapes will be identical. Thus rearranging the six green triangles, three blue triangles and three red triangles into a rectangle with width = 3, and height shows that the area of the dodecagon = 3. In general, multiplying half of the circumference of a -gon by its radius yields the area of a 2-gon. Liu Hui used this result repetitively in his algorithm.


Liu Hui's inequality

Liu Hui proved an inequality involving by considering the area of inscribed polygons with and 2 sides. In the diagram, the yellow area represents the area of an -gon, denoted by A_N, and the yellow area plus the green area represents the area of a 2-gon, denoted by A_. Therefore, the green area represents the difference between the areas of the 2-gon and the ''N''-gon: :D_=A_-A_N. The red area is equal to the green area, and so is also D_. So :Yellow area + green area + red area = A_ + D_. Let A_ represent the area of the circle. Then :A_ < A_ < A_ + D_. If the radius of the circle is taken to be 1, then we have Liu Hui's inequality: : A_ < \pi < A_ + D_.


Iterative algorithm

Liu Hui began with an inscribed hexagon. Let be the length of one side of hexagon, is the radius of circle. Bisect with line , becomes one side of
dodecagon In geometry, a dodecagon or 12-gon is any twelve-sided polygon. Regular dodecagon A regular dodecagon is a figure with sides of the same length and internal angles of the same size. It has twelve lines of reflective symmetry and rotational sym ...
(12-gon), let its length be . Let the length of be and the length of be . , are two right angle triangles. Liu Hui used the
Pythagorean theorem In mathematics, the Pythagorean theorem or Pythagoras' theorem is a fundamental relation in Euclidean geometry between the three sides of a right triangle. It states that the area of the square whose side is the hypotenuse (the side opposite ...
repetitively: : G^2 = r^2 - \left(\tfrac\right)^2 : G = \sqrt : j = r - G = r - \sqrt : m^2 = \left(\tfrac\right)^2 + j^2 : m = \sqrt : m = \sqrt : m = \sqrt From here, there is now a technique to determine from , which gives the side length for a polygon with twice the number of edges. Starting with a
hexagon In geometry, a hexagon (from Greek , , meaning "six", and , , meaning "corner, angle") is a six-sided polygon. The total of the internal angles of any simple (non-self-intersecting) hexagon is 720°. Regular hexagon A '' regular hexagon'' has ...
, Liu Hui could determine the side length of a dodecagon using this formula. Then continue repetitively to determine the side length of an
icositetragon In geometry, an icositetragon (or icosikaitetragon) or 24-gon is a twenty-four-sided polygon. The sum of any icositetragon's interior angles is 3960 degrees. Regular icositetragon The '' regular icositetragon'' is represented by Schläfli symbol ...
given the side length of a dodecagon. He could do this recursively as many times as necessary. Knowing how to determine the area of these polygons, Liu Hui could then approximate . With r = 10 units, he obtained : area of 96-gon A_ = 313 : area of 192-gon A_ = 314 : Difference of 96-gon and 48-gon: :D_ = 314\frac - 313\frac = \frac :from Liu Hui's inequality: : A_ < A_ < A_ + D_. :Since = 10, A_ = 100 \times \pi :therefore: :314\frac<100 \times \pi <314 \frac +\frac ::314\frac<100 \times \pi <314 \frac : 3.141024 < \pi < 3.142704. He never took as the average of the lower limit 3.141024 and upper limit 3.142704. Instead he suggested that 3.14 was a good enough approximation for , and expressed it as a fraction \tfrac; he pointed out this number is slightly less than the actual value of . Liu Hui carried out his calculation with
rod calculus 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. ...
, and expressed his results with fractions. However, the iterative nature of Liu Hui's algorithm is quite clear: : 2-m^2 =\sqrt\, , in which is the length of one side of the next–order polygon bisected from . The same calculation is done repeatedly, each step requiring only one addition and one square root extraction.


Quick method

Calculation of square roots of irrational numbers was not an easy task in the third century with counting rods. Liu Hui discovered a shortcut by comparing the area differentials of polygons, and found that the proportion of the difference in area of successive order polygons was approximately 1/4. Let denote the difference in areas of -gon and (/2)-gon : D_N = A_N - A_\, He found: :D_ \approx \tfrac D_ :D_ \approx \tfrac D_ Hence: : \begin D_ & \approx \tfrac D_ \\ D_ & \approx \left(\tfrac\right)^2 D_ \\ D_ & \approx \left(\tfrac\right)^3 D_ \\ D_ & \approx \left(\tfrac\right)^4 D_ \\ & \ \ \vdots \end Area of unit radius circle = : \pi = A_ + D_ + D_+D_+D_ + \cdots \approx A_ + F \cdot D_. \, In which : F = \tfrac + \left(\tfrac\right)^2 + \left(\tfrac\right)^3 + \left(\tfrac\right)^4 + \cdots=\frac=\tfrac. That is all the subsequent excess areas add up amount to one third of the D_ : area of unit circle =\pi \approx A_ + \left(\tfrac\right)D_ \approx \approx 3.1416.\, Liu Hui was quite happy with this result because he had acquired the same result with the calculation for a 1536-gon, obtaining the area of a 3072-gon. This explains four questions: # Why he stopped short at 192 in his presentation of his algorithm. Because he discovered a quick method of improving the accuracy of , achieving same result of 1536-gon with only 96-gon. After all calculation of square roots was not a simple task with
rod calculus 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. ...
. With the quick method, he only needed to perform one more subtraction, one more division (by 3) and one more addition, instead of four more square root extractions. # Why he preferred to calculate through calculation of areas instead of circumferences of successive polygons, because the quick method required information about the difference in areas of successive polygons. # Who was the true author of the paragraph containing calculation of \pi = . # That famous paragraph began with "A Han dynasty bronze container in the military warehouse of Jin dynasty....". Many scholars, among them
Yoshio Mikami was a Japanese mathematician and historian of ''Japanese mathematics''. He was born February 16, 1875, in Kotachi, Hiroshima prefecture. He attended the High School of Tohoku University, and in 1911 was admitted to the Imperial University of To ...
and
Joseph Needham Noel Joseph Terence Montgomery Needham (; 9 December 1900 – 24 March 1995) was a British biochemist, historian of science and sinologist known for his scientific research and writing on the history of Chinese science and technology, ini ...
, believed that the "Han dynasty bronze container" paragraph was the work of Liu Hui and not Zu Chongzhi as other believed, because of the strong correlation of the two methods through area calculation, and because there was not a single word mentioning Zu's 3.1415926 < < 3.1415927 result obtained through 12288-gon.


Later developments

Liu Hui established a solid algorithm for calculation of to any accuracy. *
Zu Chongzhi Zu Chongzhi (; 429–500 AD), courtesy name Wenyuan (), was a Chinese astronomer, mathematician, politician, inventor, and writer during the Liu Song and Southern Qi dynasties. He was most notable for calculating pi as between 3.1415926 and 3 ...
was familiar with Liu Hui's work, and obtained greater accuracy by applying his algorithm to a 12288-gon. :From Liu Hui's formula for 2-gon: : A_ = m_ \times r :For 12288-gon inscribed in a unit radius circle: : A_=3.14159261864 < \pi . :From Liu Hui's inequality: : A_ < \pi < A_ +D_ :In which D_=A_- A_=0.0000001021 : A_=3.14159261864 < \pi <3.14159261864 +0.0000001021. :Therefore :3.14159261864 < \pi <3.141592706934 Truncated to eight significant digits: : 3.1415926 < \pi <3.1415927. That was the famous Zu Chongzhi inequality. Zu Chongzhi then used the interpolation formula by
He Chengtian He or HE may refer to: Language * He (pronoun), an English pronoun * He (kana), the romanization of the Japanese kana へ * He (letter), the fifth letter of many Semitic alphabets * He (Cyrillic), a letter of the Cyrillic script called ''He'' ...
( 何承天, 370-447) and obtained an approximating fraction: \pi \approx . However, this value disappeared in Chinese history for a long period of time (e.g. Song dynasty mathematician
Qin Jiushao Qin Jiushao (, ca. 1202–1261), courtesy name Daogu (道古), was a Chinese mathematician, meteorologist, inventor, politician, and writer. He is credited for discovering Horner's method as well as inventing Tianchi basins, a type of rain gaug ...
used = and \pi=\sqrt )), until
Yuan dynasty The Yuan dynasty (), officially the Great Yuan (; xng, , , literally "Great Yuan State"), was a Mongol-led imperial dynasty of China and a successor state to the Mongol Empire after its division. It was established by Kublai, the fift ...
mathematician Zhao Yuqin worked on a variation of Liu Hui's algorithm, by bisecting an inscribed square and obtained again \pi \approx .


Significance of Liu Hui's algorithm

Liu Hui's algorithm was one of his most important contributions to ancient Chinese mathematics. It was based on calculation of -gon area, in contrast to the Archimedean algorithm based on polygon circumference. With this method Zu Chongzhi obtained the eight-digit result: 3.1415926 < < 3.1415927, which held the world record for the most accurate value of for 1200 years; even by 1600 in Europe, the Dutch mathematician Adriaan Anthonisz and his son obtained value of 3.1415929, accurate only to 7 digits.Robert Temple, The Genius of China, a refined value of pi, p144-145,


See also

*
Method of exhaustion The method of exhaustion (; ) is a method of finding the area of a shape by inscribing inside it a sequence of polygons whose areas converge to the area of the containing shape. If the sequence is correctly constructed, the difference in area ...
(5th century BC) * Zhao Youqin's π algorithm (13-14th century)
Proof of Newton's Formula for Pi
(17th century)


Notes

: Correct value: 0.2502009052 : Correct values: :A_= 3.1410319509 :D_=0.0016817478 :\pi \approx A_+ \frac D_\approxeq 3.1410319509 +0.0016817478/3 :\pi \approx 3.1410319509 +0.0005605826 :\pi \approx 3.1415925335.
Liu Hui's quick method was potentially able to deliver almost the same result of 12288-gon (3.141592516588) with only 96-gon.


References


Further reading

*Needham, Joseph (1986). ''Science and Civilization in China'': Volume 3, Mathematics and the Sciences of the Heavens and the Earth. Taipei: Caves Books, Ltd. * Wu Wenjun ed, ''History of Chinese Mathematics'' Vol III (in Chinese) {{DEFAULTSORT:Liu Hui's Pi Algorithm Pi algorithms Chinese mathematics Cao Wei