[net.sf-lovers] Arithmetic with Roman numerals

stolfi@jumbo.DEC.COM (Jorge Stolfi) (11/01/86)

Dan Tilque wrote in net.sf-lovers:
>   
>   L.  Sprague de Camp's _Lest_Darkness_Fall_ is slightly less realistic.
>   (SPOILER) His protagonist is an archeologist living in Rome who is
>   transported to the 5th or 6th century.  ...  He achieves some fortune
>   by "inventing" the still and the Hindu-Arabic numerals along with long
>   division (ever try doing long division in Roman numerals?).  

Aren't you being a little unfair here?  I think that arithmetic with
Roman numerals is hard only if you try to handle each letter as a
separate digit.  If instead you break the numbers into multi-letter
decimal "digits", you will find that arithmetic is as almost as easy as
with arabic numerals.  

For example, if you want to add MMCMLXXIV (2974) and CDIX (409), you
parse the numbers into thousands, hundreds, tens, and units, as 

   MM CM LXX IV    CD IX

then write them one on top of the other, with like "digits" on the same
column, 

   MM CM LXX IV
      CD     IX
 
and then add the columns, as in the arabic system:


    M      X
   
   MM CM  LXX  IV

      CD       IX +
 -----------------
  MMM CCC LXXX III

As in the Arabic system, you must memorize a 9x9 addition table
(IV+IX = III plus a carry of X, etc.).  Note that the same table works
for all columns, once you identify M=C=X=I and D=L=V.  Note also that
many entries of the table are trivial (e.g., I+I = II, V+II = VII,
etc.) 

If we replace the "subtractive" digits IV, IX, XL, ...  by their
"additive" equivalents IIII, VIIII, XXXX, etc, the addition table
becomes even simpler.  (I have seen this notation used in a couple of
places, but don't know if it was ever used for computations.
Note however that this is exactly how numbers would be encoded in an
abacus).  

The other operations can be handled in the same manner.  I don't know
if the Romans actually used these methods, but I am sure that with a
little practice the parsing will become automatic: one will "see"
MMCMLXXVI as four digits, not nine letters.  At that point, one will
probably be able to match corresponding digits without having to write
them into aligned columns.  

The real problems with Roman numerals are the lack of a symbol for
zero and the varying width of digits (which makes it hard to align
corresponding digits); the finite supply of letters (which puts a bound
on the representable numbers); and its general verbosity.  Of course,
the Romans also lacked many mathematical concepts that we have since
incorporated into our number system, such as decimal fractions and
negative numbers.  

In spite of those problems, I don't think that Roman numerals were as
cumbersome as they are usually said to be.  Considering how long it
took for the Arabic notation to be accepted in Europe, I seriously
doubt that L.  Sprague de Camp's hero would have made a fortune by
"selling" them...  

  vale,
  
    j.

------------------------------------------------------------------------
DISCLAIMER: Digital Equipment Corp. does not sell or manufacture Roman
numerals, and I do not get any royalties for their use.