User:Jccsvq/sandbox/pagetest

Introduction
It is a mystery why traditional Chinese and Japanese abacuses had five beads in their lower deck as only four are required from the point of view of decimal numbers representation. As no extant ancient document seems to explain it, this mystery will probably last forever and we are limited to conjectures to try to understand its origin. In this line, we could think that, when they first appeared, fixed beads abacuses were conceived in image and likeness of counting rods, from which they were called to inherit every algorithm. With counting rods, the use of five rods to represent number five was compulsory in order to avoid the ambiguity between one and five, at least initially, when neither a representation for zero nor a checkerboard a la Japanese sangi to sanban were used. Furnishing the abacus with five lower beads allowed a parallel or similar manipulations of beads and rods, bringing some kind of hardware and software compatibility to fixed beads abacuses, in fact, the first Chinese books on suanpan also dealt with counting rods, so that both instruments were learned at the same time. We could also invoke a certain desire for compatibility between the abacus and rods numerals that, in one way or another, have been in use until modern times. So, for instance, one would like to change all 5’s to be represented by the five lower beads before writing down a result using rods numerals, in order to avoid very silly and catastrophic transcription mistakes.

Counting rods, by the way the most versatile and powerful abacus ever, had a flaw: it is extremely slow to manipulate. It is not a surprise that ancient Chinese mathematicians invented the multiplication table to speed up multiplication and that they also discovered the use of this multiplication table to also speed up division. Nor is it a surprise that they also discovered that, by using the abacus fifth bead, addition and subtraction operations could be somewhat simplified. They really had to be very sensitive to slowness.

Yifu Chen, as part of his doctoral thesis, has systematically analyzed 16 classic works on the abacus: twelve Chinese books from the late Ming and Qing dynasties and four Japanese books from the Edo period in which addition and subtraction are studied. As a result, Chen finds four different modes of using the fifth bead in addition and two in subtraction. These modes range from intensive or systematic use of the fifth bead to sporadic use or no use at all. From all those texts, only one Chinese book from the late Ming dynasty make full use of the fifth bead, belonging to Chen’s Mode 1 in both addition and subtraction: Computational Methods with the Beads in a Tray (Pánzhū Suànfǎ 盤珠算法) by Xú Xīnlǔ 徐心魯 (1573), by the way, the oldest extant book entirely devoted to the abacus. This fact should not lead us to the erroneous conclusion that the use of the fifth bead was a rarity of old times, since the books analyzed are neither treatises nor compendia on state-of-the-art abacus computation, but introductory manuals or textbooks for learning its use. Rather, it seems that the use or not of the fifth bead in these books corresponds more precisely to the didactic objective pursued by the authors, and that only Xu Xinlu considered it interesting to demonstrate it thoroughly from the beginning and included it in the syllabus of his course. It is mainly thanks to this work that we can rescue the traditional use of the fifth bead to simplify operations.

In what follows a small set of rules for the use of the fifth bead is presented along with their rationale and scope of use. These rules are not explicitly stated in any of the classical works, but can be inferred from the addition and subtraction demonstrations present in them, (especially in the Panzhu Suanfa)  as is done in Chen's thesis

Some terms and notation



 * (F) to denote a lower five (five lower beads set) as opposed to:
 * (5) upper five (one upper bead set).
 * (T) ten on a rod (one upper bead and five lower beads set). On the suanpan, it is also a lower ten as opposed to (t) an upper ten (two upper beads set).
 * (Q) lower fifteen on a rod (two upper beads and five lower beads set) as opposed to (q) upper fifteen (suspended upper bead on the 2:5, three upper beads set on the 3:5).
 * (carry) this represents number 1 when it is to be added to a column as a carry from the right.

Rules for addition

 * a1 Never use the 5th bead in addition except in the two cases that follow.
 * a2  4 + carry = F
 * a3  9 + carry = T

You can see the above addition rules mentioned in a slightly different way by Yifu Chen in the chapter: The Education of Abacus Addition in China and Japan Prior to the Early 20th Century of the book: Computations and Computing Devices in Mathematics Education Before the Advent of Electronic Calculators. Springer 2018 https://doi.org/10.1007/978-3-319-73396-8

The rationale behind
Rule a1 goal is simply to always leave an unused lower bead at our disposal in case the current column has to accept a future carry from the right, while rules a2 and a3 specify the use of the 5th bead in such a situation. Then, we can expect to obtain:


 * a reduced number of finger movements because we avoid to deal with both upper and lower beads
 * to avoid skipping rods and to reduce the left-right hand displacement span
 * to avoid any “carry run” to the left (think of 99999+1=999T0 instead of 99999+1=100000)

The advantage
The above advantages are automatically realized by using rules a2 and a3, but rule a1 is of a different nature. Rule a1 is a provision for the future, it will simplify things if a future carry actually falls on the current column (which happens about 50% of the time on average), but it will simplify nothing otherwise. Rule a1 is so a kind of a bet (subtraction rules below are also of the same nature).

The scope of use
Rules a1 to a3 are for columns that can receive a carry, which excludes the rightmost column in normal (rightward) operation.

In inverse (leftward) operation, no column will receive a future carry from the right, so that rule a1 is out of scope and does not operate, but rules a2 and a3 should always be used. (This is mentioned because an ancient technique, now defunct, used leftward operation in alternation with normal operation to avoid long hand displacements. Not of general use but an extremely interesting exercise anyway).

Exceptionally, if you do know that some column will never receive a carry, you are also free of rule a1. (This seems a strange situation, but we need to introduce it to cope with the central part of the Test Drive below).

Rules for subtraction

 * s1 Always use lower fives (F) instead of upper fives (5).
 * s2 Never leave a cleared rod (0) if you can borrow from the adjacent left rod (but not from a farther one!), leave a T instead (i.e. 27-7 = 1T should be preferred to 27-7 = 20).

Remark: These two rules do not apply on rods where you are borrowing from, i.e. 112-7 = 10F (not TF) and 62-7 = 5F (not FF).

The rationale behind
Both rules tend to leave activated lower beads at our disposal for the case we need to borrow from them in the future (it is like always holding small change in our pocket just in case), saving us some movements and/or wider or more complex hand displacements, such as borrowing from non-adjacent columns or skipping rods.

The advantage
Is not automatically obtained, it is only fulfilled when we actually need to borrow from the present rod. This is similar to the case of addition rule a1.

The scope of use
Once more, the rightmost column is outside the scope of these rules as we will never borrow from it.

Also, In leftward or inverse operation we will never borrow from the current column, so these rules do not apply (which may be seen as an additional reason to prefer rightward operation in normal use).

Test drive
It was common in ancient books on the abacus to demonstrate addition and subtraction using the well-known exercise that consists of adding the number 123456789 nine times to a cleared abacus until the number 1111111101 is reached, and then erase it again by subtracting the same number nine times (This exercise seems to have the Chinese name: Jiǔ pán qīng 九盤清, meaning something like clearing the nine trays). You can find the sequence of intermediate results of the Panzhu Suanfa in this 1982 article by Hisao Suzuki (鈴木 久男): Chuugoku ni okeru shuzan kagen-hou 中国における珠算加減法 (Abacus addition and subtraction methods in China). This is a Japanese text (spiced up with some classical Chinese) that deals with addition and subtraction methods as they appear in various Chinese books from the 16th century. In pages 12-17, the Panzhu Suanfa version of the 123456789 exercise is graphically displayed on the upper series of  1:5 diagrams. The short Chinese phrases below each bar specify how the current digit was obtained (Table 1 in the Appendix A below serves a similar purpose but in a different and more convenient way for us).

Using the addition rules explained above, we should get the following sequence of results each time we complete the addition of 123456789 (see Table 1 for more details):

000000000, 123456789, 246913F78, 36T36T367, 4938271F6, 617283945, 74073T734, 864197F23, 9876F4312,   ...

at this point, adding 123456789 once more results in 1111111101, but this number appears in the Panzhu Suanfa as:

TTTTTTTT1

which cannot be obtained by the use of the above rules only. A similar situation occurs when repeating this exercise but starting with 999999999 instead of a cleared abacus (see Table 2), reaching 1TTTTTTTT0. This is why we introduced the last comment on the scope of addition rules above. It might be that, by inspection or intuition, we realize that using the 5th bead here does not generate any carry, so that we can overcome the a1 rule and proceed to this, somewhat theatrical, result ...

From here, by subtraction we should get:

TTTTTTTT1, 9876F4312, 864197523, 740740734, 61728394F, 493827156, 36T370367, 246913578, 123456789, 000000000

As it can be seen here, few F’s and T’s appear on the intermediate results, but a few more appear in the middle of calculation (Table 1), being immediately converted to 4’s and 9’s by borrowing, which is the purpose for which they were introduced. The F’s and T’s remaining on the intermediate results are only the unused ones.

Additional rules
Of course, the rules for addition can also be directly used in multiplication and the rules for subtraction in division, roots, etc.

Additionally, if using kijoho 帰除法 (Chinese or traditional division method) on the 2:5 or 3:5 abacus, we can introduce an additional rule:


 * k1 Always use lower five’s, ten’s, and fifteen’s (F, T, Q) when adding to the remainder after application of the Chinese division rules.

This is so because, although we are adding to a rod, the next thing we will do is start subtracting from it (if the divisor has more than one digit). It is a kind of extension of the first rule for subtraction (s1).

By the way, you may sometimes find somewhat conflicting the use of the second rule for subtraction (s2) in Chinese division. For instance, 1167/32 = 36,46875

Now, which rule should be used here? 1/3->3+1 or 2/3->6+2 ? In fact, we can use any of them and revise up as needed, but it is faster to realize that the remainder is actually 3207 so that the second Chinese rule is the appropriate one, so, simply change columns EF to 62 and continue.

Finally, if you are using the traditional Chinese multiplication method or similar on the suanpan, you may face overflow on some columns, so that an additional rule:


 * m1 [14] + carry = Q

can also be considered.

About the advantage
As Hannu and Totton pointed out, the use of the 5th bead may reduce the number of bead or finger movements required in some calculations, and the detailed example offered by them shows how it is achieved. Some time ago, I estimated this reduction in roughly 10% on the average, based on the 123456789 exercise and some of its derivatives. Nevertheless, I could have used different criteria to count movements so I don't value this numeric estimate too much.

As I see things, the advantage of the 5th bead goes a little beyond simply reducing the number of finger movements, as it also reduces the number and/or the extent of other hand gestures required in calculations (hand displacement, changes of direction, skipping rods,...). It seems pretty obvious that each gesture, as a physical process, takes a time to complete as governed by our brains, requires our attention, consuming (mental or biochemical) energy as we are not machines but humans, has a chance to be done in the wrong way, introducing mistakes So, under these optics, we can expect that the use of the 5th bead will result in a somewhat faster, more relaxed and reliable calculation by reducing the total number of required gestures. It is not easy to measure this triple advantage using a single parameter.

Skipping columns, as Yifu Chen comments in his two works mentioned above, seems to have traditionally been viewed as something to be avoided as a possible source of errors. Without this concept the subtraction rule (s2) cannot be understood since it does not always lead to a reduction in the number of finger movements, but it always reduces the range of hand movement and the need to skip rods. I personally attach great importance to this point based on my own experience. I still fear divisors and roots with embedded zeros and if I became an enthusiast of traditional methods it is solely because I drastically reduced my error rate in division and multiplication as soon as I started using the more compact traditional arrangements used for both operations. No matter how hard and for how long I practiced modern methods, I could never change this.

In any case, the advantage of using the fifth bead, although not negligible, is only modest, and each one must decide whether it is worth using it or not. For me the best test of the efficiency of the fifth bead is to use a 1:4 and feel the extra work required to complete the calculations on it.