446 karine chemla
Transforming algorithms as lists of operations
Th e goal, from this point onwards, is the transformation of this algorithm
4, qua algorithm , into the one for which the correctness is to be established,
that is, the one provided by Th e Nine Chapters for the volume of the
truncated pyramid with circular base. Liu Hui hence resumes reasoning
along the second line of argumentation. Considering the list of operations
obtained by the last transformation (5), he remarks:
But, earlier, in order to look for the volume of the truncated pyramid with square
base, we had divided by 3. Now, in order to look for the volume of the truncated
pyramid with circular base, one must also multiply by 3. Since the two denomina-
tors are equal, hence they compensate e a c h o t h e r.
Before clarifying the italicized terms, let us observe the argument made
here. Th e commentator clearly considers the operations that follow each
other as a list and carries out a transformation of this list as such. Th e algo-
rithm yielding the circumscribed truncated pyramid with square base, he
remarks, ended by a division by 3, whereas transformation 4 fi rst appended
to it a multiplication by 3. 27 Liu Hui thus suggests deleting both from the list
of operations, thereby carrying out transformation 6. It can be represented
as follows ( Figure 13.7) :
27 Let us stress, in the previous quotation, the use of the same term when referring to the two
algorithms: ‘to look for’ ( qiu ). Th is confi rms the part played by problems in decomposing the
task to be fulfi lled into sub-tasks conceived of as problems.
Transformation 6 modifi es the list of operations without altering the
meaning or the value of the result. We meet here with the same phenom-
enon as above. Bringing to light the opposed multiplication and division
was crucial to interpreting the meaning ( yi ) of the result. However, when
viewing the list of operations as a means for computing, the two operations
appear unnecessary. Th is is how Liu Hui progressively accounts for the
shape of the algorithm found in the Classic.
Figure 13.7 Algorithm 5: cancelling opposed multiplication and division.
Multiplications Division Division Multiplications by 3
Sum by 9 by 3
Multiplication by h
Ci > (Ci Cs + Ci^2 + Cs^2 )h > [(Ci Cs + Ci^2 + Cs^2 )h/9]/3 > [(Ci Cs + Ci^2 + Cs^2 )h/9]/3.3
Cs
Division by 4
> [(Ci Cs + Ci^2 + Cs^2 )h/9]/4