《孫子算經卷上》 "Sun Tzŭ's Computational Classic: Volume I"
§8. Rod calculus: multiplication algorithm

This section describes the algorithm for multiplying two integers represented using rod numerals. For a brief description of rod numerals, see §7 commentary.

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
凡乘之法、重置其位。 [In the] method of all multiplication, put layered [the] places.
  • 重: layered

    重、平聲、 Cantonese: chʻung4, Mandarin: chóng

上下相觀、上位有十步至十、有百步至百、有千步至千。 The upper [and] the lower observing each other: have [the] upper places tens, step unto [the] tens; have [they] hundreds, step unto [the] hundreds; have [they] thousands, step unto [the] thousands.
  • Version B has 頭位 for 上位, both here and in many of the sections to follow.
  • After putting the numbers into two separate rows, the text tells us to "step" (i.e. shift to the left) the lower number until its units digit is vertically in line with the top number's most significant digit. For example, if we wish to compute 1989 × 64:
    Top row: rod numerals representing 1989. Bottom row: rod numerals representing 64. The bottom units digit (4) is in line with the upper thousands digit (1).
    Or, in Arabic numerals for readability:
    Same arrangement with rod numerals replaced by arabic numerals.
以上命下、所得之數、列於中位。言十即過、不滿自如。 Name the lower with the upper; [the] numbers that result, [are] ranked in [the] middle places. Tens [be] immediately carried, [but those] not reaching [ten], [left] as [their] selves.
  • 命: name

    Or maybe "command/order" as in "operate on".

  • 過: carried; lit. passed
上位乘訖者、先去之。
下位乘訖者、則俱退之。
Those upper places which [be] finished multiplying: remove them first.
Those lower places which [be] finished multiplying: retreat them all.
  • 訖: finished

    訖、居迄切、 Cantonese: kat7, Mandarin: qì

  • A concrete example of the algorithm does not appear until §13, so I will provide my own. Here is an animation (crappy source code here) showing the multiplication 1989 × 64 = 127296, where I have used usual numerals rather than rods (for readability) and I have split the middle row into two rows to make the intermediate additions clearer. I have greyed out the finished digits instead of removing them:
    Animation for Sun Tzŭ multiplication: 1989 multiplied by 64.
    The algorithm pretty much works like modern long multiplication, except that you go from left to right. Indeed the advantage of using counting rods is that carrying simply consists of putting more rods down, whereas with pen & paper, you must work from right to left and finish all the carrying before proceding to the next digit.
  • The instruction 俱退之, "retreat them all", refers to the shifting to the right of the lower number 64, after both the 6 and the 4 have been multiplied through.
六不積、五不隻。 Sixes [are] not accumulated; fives, not single.
  • 六不積: sixes not accumulated

    This is saying that the digit 6 in rod numerals is displayed either as one horizontal rod with one vertical rod below it or as one vertical rod with one horizontal rod below it, but not as six vertical rods nor as six horizontal rods.

  • 五不隻: fives not single

    This is saying that the digit 5 in rod numerals is displayed either as five vertical rods or as five horizontal rods, but not as one horizontal rod above zero vertical rods nor as one vertical rod above zero horizontal rods, since the last two would be indistinguishable from the rod numeral representation for the digit 1.

上下相乘、至盡則已。 The upper [and] the lower [are] mutually multiplied, finishing [at] reaching exhaustion.

Cite this page

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