《孫子算經卷下》 "Sun Tzŭ's Computational Classic: Volume III"
§24. Discrete area of a square grid of given perimeter

This section gives a word problem asking for the area of a square grid given its perimeter (in terms of object count).

Translation

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 square objects [in] one bundle, once around [the] outer perimeter there being thirty-two [objects]. [We] ask, how much [be the] area?
  • 匝: around

    匝、子答切、 Cantonese: tsaap8, Mandarin: zā

  • 積: area; or accumulation
答曰、八十一枚。 Answer saith: eighty-one [objects].
術曰、重置二位。上位減八、餘加下位、至盡虛加一、即得。 Method saith: put layered two places. Subtracting eight of [the] upper place, [and] adding [the] remainder to [the] lower place, unto [its being] exhausted hollow [then] adding one, [we] are done.
  • Version B has 左位 for 上位 and 右位 for 下位.
  • In modern notation, the total number of objects is
    \begin{aligned} & \phantom{+} 32 \\ & + (32 - 8) \\ & + (32 - 2 \times 8) \\ & + (32 - 3 \times 8) \\ & + (32 - 4 \times 8) \\ & + 1 \\ &= 81, \end{aligned}
    since each successive layer has eight fewer objects, with a single object in the centre of the bundle.
    Diagram showing layers of 32, 24, 16, 8, and 1 objects outside-in, forming a 9 by 9 square grid with 81 objects altogether.
  • Under an optimistic reading of 至盡虛加一, we only add one if the remainder becomes zero. This covers the case where the total number of objects is even (in which case the last remainder is 4, and there is no object in the centre of the bundle).

Cite this page

Conway (2023). "Sun Tzŭ's Computational Classic: Volume III §24". <https://yawnoc.github.io/sun-tzu/iii/24> Accessed yyyy-mm-dd.