孫子算經(選) The Mathematical Classic of Master Sun (selections) Master Sun (identity unknown) 孫子 (fl. c. 3rd–5th century CE) Six Dynasties · c. 3rd–5th century CE Cold Library · Open Stacks · S-002047 · https://coldlibrary.com/s/002047 Rights: Mathematical text of the 3rd to 5th century CE; public domain everywhere. Checked for Australia, the EU, the UK, mainland China and the United States as of 11 October 2026. Guidance, not legal advice. Source: Wikisource, https://zh.wikisource.org/wiki/孫子算經 (retrieved 2026-10-11) English translation: Claude (an AI), 2026 · CC0 1.0 Generated 2026-10-14 from https://coldlibrary.com/en/open-stacks/sunzi-suanjing-unknown-number ---- 孫子曰:夫算者:天地之經緯,群生之元首,五常之本末,陰陽之父母,星辰之建號,三光之表裏,五行之準平,四時之終始,萬物之祖宗,六藝之綱紀。稽群倫之聚散,考二氣之降升,推寒暑之迭運,步遠近之殊同,觀天道精微之兆基,察地理從橫之長短,采神祇之所在,極成敗之符驗。窮道德之理,究性命之情。立規矩,準方圓,謹法度,約尺丈,立權衡,平重輕,剖毫釐,析泰絫。歷億載而不朽,施八極而無疆。散之者,不可勝究;斂之,不盈掌握。向之者,富有餘;背之者,貧且窶。心開者,幼沖而即悟;意閉者,皓首而難精。夫欲學之者,必務量能揆己,志在所專,如是,則焉有不成者哉! 卷下 今有物,不知其數。三三數之,賸二;五五數之,賸三;七七數之,賸二。問:物幾何?答曰:二十三。 術曰:三三數之,賸二,置一百四十;五五數之,賸三,置六十三;七七數之,賸二,置三十。并之,得二百三十三,以二百一十減之,即得。凡三三數之,賸一,則置七十;五五數之,賸一,則置二十一;七七數之,賸一,則置十五。一百六以上,以一百五減之,即得。 今有雉、兔同籠,上有三十五頭,下有九十四足。問:雉、兔各幾何?答曰:雉二十三,兔一十二。 術曰:上置三十五頭,下置九十四足。半其足,得四十七,以少減多,再命之,上三除下三,上五除下五,下有一除上一,下有二除上二,即得。 又術曰:上置頭,下置足,半其足,以頭除足,以足除頭,即得。 ---- 孙子曰:夫算者:天地之经纬,群生之元首,五常之本末,阴阳之父母,星辰之建号,三光之表里,五行之准平,四时之终始,万物之祖宗,六艺之纲纪。稽群伦之聚散,考二气之降升,推寒暑之迭运,步远近之殊同,观天道精微之兆基,察地理从横之长短,采神祇之所在,极成败之符验。穷道德之理,究性命之情。立规矩,准方圆,谨法度,约尺丈,立权衡,平重轻,剖毫厘,析泰絫。历亿载而不朽,施八极而无疆。散之者,不可胜究;敛之,不盈掌握。向之者,富有余;背之者,贫且窭。心开者,幼冲而即悟;意闭者,皓首而难精。夫欲学之者,必务量能揆己,志在所专,如是,则焉有不成者哉! 卷下 今有物,不知其数。三三数之,剩二;五五数之,剩三;七七数之,剩二。问:物几何?答曰:二十三。 术曰:三三数之,剩二,置一百四十;五五数之,剩三,置六十三;七七数之,剩二,置三十。并之,得二百三十三,以二百一十减之,即得。凡三三数之,剩一,则置七十;五五数之,剩一,则置二十一;七七数之,剩一,则置十五。一百六以上,以一百五减之,即得。 今有雉、兔同笼,上有三十五头,下有九十四足。问:雉、兔各几何?答曰:雉二十三,兔一十二。 术曰:上置三十五头,下置九十四足。半其足,得四十七,以少减多,再命之,上三除下三,上五除下五,下有一除上一,下有二除上二,即得。 又术曰:上置头,下置足,半其足,以头除足,以足除头,即得。 ---- English translation by Claude (an AI) Master Sun says: calculation is the warp and weft of heaven and earth, the head of all living things, the root and branch of the five constant virtues, the father and mother of yin and yang, the giver of names to the stars and constellations, the outside and inside of the three lights, the level of the five phases, the beginning and end of the four seasons, the ancestor of the ten thousand things, and the guiding thread of the six arts. With it we examine how all kinds gather and disperse, study how the two breaths rise and fall, follow the turning of cold and heat, measure how far and near differ, observe the subtle beginnings of the way of heaven, survey the lengths of the land from north to south and east to west, discover where the spirits dwell, and test to the end the signs of success and failure. It reaches to the principles of the Way and virtue, and fathoms the nature of life. It sets up the compass and square, makes circles and squares true, governs the laws and measures, fixes feet and yards, establishes the steelyard and balance, levels heavy and light, divides the hair's breadth and splits the smallest grain. It will last through hundreds of millions of years without decay, and reach the eight ends of the earth without limit. Spread out, it can never be exhausted; gathered in, it does not fill the palm of a hand. Those who turn towards it will be rich and have more than enough; those who turn their backs on it will be poor and in want. To an open mind it is clear even in childhood; to a closed mind it remains hard to master even when the hair is white. Whoever wishes to study it must measure his abilities, know himself, and keep his will fixed on it. If he does this, how could he fail? Book Three Suppose there are some things whose number is not known. Counted in threes, two are left over; counted in fives, three are left over; counted in sevens, two are left over. How many things are there? Answer: twenty-three. Method: counted in threes with two left over, put down one hundred and forty; counted in fives with three left over, put down sixty-three; counted in sevens with two left over, put down thirty. Add these together to get two hundred and thirty-three, subtract two hundred and ten, and you have the answer. In general, for each one left over when counting in threes, put down seventy; for each one left over when counting in fives, put down twenty-one; for each one left over when counting in sevens, put down fifteen. If the sum is one hundred and six or more, subtract one hundred and five, and you have the answer. Suppose pheasants and rabbits are in the same cage. Above there are thirty-five heads; below there are ninety-four feet. How many pheasants and how many rabbits are there? Answer: twenty-three pheasants and twelve rabbits. Method: put down thirty-five heads above and ninety-four feet below. Halve the feet to get forty-seven. Subtract the smaller from the larger, twice over: the three above removes three below, the five above removes five below; then the one below removes one above, the two below removes two above, and you have the answer. Another method: put down the heads above and the feet below. Halve the feet, take the heads away from the feet, then take what remains of the feet away from the heads, and you have the answer.