This section gives an example of the Chinese remainder theorem.
Chinese source text: Version A, Version B, Version C, Version D.
Unless noted otherwise, I follow the text from Version D, 《知不足齋叢書》本.
Source text | Target text | Notes |
---|---|---|
今有物不知其數。三三數之賸二、五五數之賸三、七七數之賸二。問物幾何。 | Suppose there be objects [we] know not [the] number thereof. Numbering them three [by] three [there] remain two; numbering them five [by] five [there] remain three; numbering them seven [by] seven [there] remain two. [We] ask, how many [be the] objects? |
|
答曰、二十三。 | Answer saith: twenty-three. | |
術曰、三三數之賸二、置一百四十、五五數之賸三、置六十三、七七數之賸二、置三十。 | Method saith: [for the] numbering them three [by] three [there] remaining two, put [down] one hundred [and] forty; [for the] numbering them five [by] five [there] remaining three, put [down] sixty-three; [for the] numbering them seven [by] seven [there] remaining two, put [down] thirty. | |
并之、得二百三十三。 | Combining them, resulteth in two hundred [and] thirty-three. | |
以二百一十減之、即得。 | Subtracting of it by two hundred [and] ten, [we] are done. | |
凡三三數之賸一、則置七十、五五數之賸一、則置二十一、七七數之賸一、則置十五。 | [For] every numbering them three [by] three [there] remaining one, put [down] seventy; numbering them five [by] five [there] remaining one, put [down] twenty-one; numbering them seven [by] seven [there] remaining one, put [down] fifteen. | |
一百六以上、以一百五減之、即得。 | [For] one hundred [and] six [or] above, subtracting of it by one hundred [and] five, [we] are done. |
|
Conway (2023). "Sun Tzŭ's Computational Classic: Volume III §26". <https://yawnoc.github.io/sun-tzu/iii/26> Accessed yyyy-mm-dd.