Hacker News new | past | comments | ask | show | jobs | submit login
How to Multiply Roman Numerals (nfshost.com)
62 points by tontonius on May 10, 2022 | hide | past | favorite | 19 comments



Binary (halving and doubling) multiplication is one (but not the only) way people multiplied, not just in Rome but in many times and places. The oldest extant example is from the famous Rhind Mathematical Papyrus from three and a half millennia ago. https://en.wikipedia.org/wiki/Ancient_Egyptian_multiplicatio...

Romans did not, in general, use Roman numerals directly for arithmetic. Roman numerals are a kind of serialization format for the state of a counting board. If you want to do arithmetic like a Roman, you need a bunch of lines on a paper (or the ground, or a board, or a piece of cloth) and a pile of tokens or pebbles. Deserialize your input numbers onto the counting board(s), perform your algorithm there, then serialize the result back into your record.


A few weeks ago I wrote a comment here on HN with the details of the Roman arithmetics. I’ll copy/paste it here.

————————————-

You often hear that it was next to impossible to calculate with Roman numerals. That's not true at all. People developed a very ingenious scheme to do additions and multiplications using pebbles. Since the word for pebble in Latin is calculus, we now call calculus calculus. How did it go? You represented the digits of a number by a pebble. You drew some lines in the sand, some rows and columns. The rows represented the digit magnitude (I, V, X, etc). The columns were for the operands. Two columns for a number. Why two? Because Roman numerals sometimes use negative digits. Let's see a concrete example. You want to do the addition 28+44. That is XXVIII + XLIV. You first draw the lines and put the pebbles in the corresponding squares. Note that XLIV has two negative digits (44 = XLIV = -10 + 50 -1 + 5). So the pebble for 10 and the one for 1 are put on the left side. The first number does not have any negative digits, so no pebbles in its left column.

  ———————————————————————————————
  L    |        ||       |  o
  X    |   oo   ||   o   |
  ——————————————————————————————— 
  V    |    o   ||       |  o 
  I    |  ooo   ||   o   |
  ———————————————————————————————
So, now that we set the pebbles, we need to do the calculation. We can do it in many ways. Let's start by first canceling the digits that can be canceled: a positive 10 pebble with a negative 10 pebble, and a positive 1 pebble with a negative 1 pebble. The table looks now like this:

  ——————————————————————————————— 
  L   |        ||       |  o
  X   |   o    ||       |
  ——————————————————————————————— 
  V   |    o   ||       |  o 
  I   |   oo   ||       |
  ———————————————————————————————
At this point we reduced the initial addition 28 + 44 (XXVIII + XLIV) to the equivalent one XVII + LV ( 17 + 55). Now we just move the pebbles from the fourth column to the second column.

  ——————————————————————————————— 
  L   |   o    ||       |   
  X   |   o    ||       |
  ——————————————————————————————— 
  V   |   oo   ||       |   
  I   |   oo   ||       |
  ———————————————————————————————
We are almost done. We got the result as LXVVII. But this is not a valid Roman numeral, we need to do the simplification VV = X. We remove the two 5-pebbles and add a 10-pebble. Oh, and let's get rid of the last 2 columns.

  ————————————————
  L  |   o      || 
  X  |   oo     ||  
  ————————————————
  V  |          ||   
  I  |   oo     ||   
  ————————————————
So now our final result, in correct form, is LXXII, or 72. Multiplication can be also performed, and it's quite a lot of fun. I'll explain it in the post below.

Multiplication of Roman numerals. Here we need 3 columns, one each for the multiplicands and one for the result. Our example will be 12 * 61 = XII * LXI. I chose this example so that we don't need to use negative digits; negative digits can be handled easily, but you can get the idea without them. We start with the operands on the first two columns. 12 has one pebble at the X row and 2 at the units row; 61 has one pebble at the L row, one at the X row and one at the I row. The column for the result is now empty.

  D   |    ||   
  C   |    ||
  ———————————————
  L   | o  || 
  X o | o  ||  
  ———————————————
  V   |    ||   
  I oo| o  ||  
  ———————————————
We start removing pebbles from the first multiplicand. For each pebble in the multiplicand, we perform the multiplication with the second multiplicand, which in our case means we "copy" the multiplicand in the results column with an appropriate shift in rows. Since the first mutiplicand has 3 pebbles, there are three steps: Step 1:

  D   |    ||   
  C   |    ||
  ———————————————-
  L   | o  || o
  X o | o  || o 
  ———————————————-
  V   |    ||   
  I o | o  || o 
  ———————————————-
Step 2:

  D   |    ||   
  C   |    ||
  ———————————————-
  L   | o  || oo
  X o | o  || oo 
  ———————————————-
  V   |    ||   
  I   | o  || oo 
  ———————————————-
Step 3:

  D   |    ||    o   
  C   |    ||    o
  ———————————————-
  L   | o  || oo
  X   | o  || oo o
  ———————————————-
  V   |    ||   
  I   | o  || oo 
  ———————————————-
So, the result is DCLLXXXII. Of course, LL is not really "legal", so we replace it with a C, so we get DCCXXXII, or 732, which is indeed the correct number.


> You drew some lines in the sand, some rows and columns. The rows represented the digit magnitude (I, V, X, etc). The columns were for the operands. Two columns for a number. Why two? Because Roman numerals sometimes use negative digits.

Note that this is speculative. We don’t actually have descriptions of how Romans set up or used their counting boards, only indirect evidence that they did most arithmetic and accounting with them. The digits probably went left to right or right to left rather than top to bottom (there is some written account of IIRC Greek and Egyptian counting boards going opposite directions).

The more specific and complete evidence we have today is from medieval Europe, where typically digits were rows and tokens on the lines were used for 1, 10, 100, etc. with tokens in spaces between the lines used for 5, 50, 500. However, since counting board arithmetic was a skill taught directly as oral tradition, most practical algorithms (especially those used by specialists for more obscure operations) have been lost. We can do some additional speculation based on methods used today on bead-on-rod sorobans/suanpans from Japan/Korea/China.

We can speculate (from occasional examples in writing of IX to represent VIIII, etc.) that Romans may have (sometimes? often?) represented "negative" counts on the other side of a dividing line, but this does not have direct evidentiary support.

* * *

For more elaborate speculation about setup and algorithms, Steve Stephenson has done quite a bit of thinking about practical uses of counting boards. It’s impossible to judge how close this is to what ancient people actually did, but it’s interesting in itself, and IMO worth teaching to young children today as a complement to pen and paper (and mental) arithmetic. I think it is a better intellectual tool than the sliding-bead soroban. My kids use some nice metal buttons as counters:

https://ethw.org/Ancient_Computers


This looks good, but it casts doubt on whether you RTFA. :-) (Sorry, but it does.)

The very 2nd paragraph says:

« The ancient Romans didn't use subtractive shorthand notation (e.g. IV or CM), but allowed four repetitions of a numeral (e.g. IIII or DCCCC). Calculations will be easier if you do the same. You can wait for the final answer before normalizing back into modern form. »

If you incorporate that factoid, then would you not be able to significantly simplify your calculation method?


The calculation method I listed is just one possible one among many. The basis idea is that you use pebbles. We know that the Romans used something along the lines of what I described, but it's very likely that many "numbers specialists" devised their own personal tweaks. For sure some people replaced a V with an IIIII. Some people replaced a III with a IIV. We know for a fact that 48 could be written as IIL. Etc.

Maybe some people laid down their pebbles from left to right, some from right to left, some from bottom to top (like I did in my examples).

So, yes, some of my calculations could be simplified. It's a matter of personal taste, and since Roman numerals were used for almost two thousands years, over a very large geographical area, it's almost certain that numerous local variation arose.

But what is also almost certain is that TFA has zero grounds in reality. Roman people were not using Roman numerals to do their arithmetics. They were translating their numerals in a pebble setup, and performing their calculations using those pebbles, and then translating back to numerals.


TFA was written by someone speculating based on some half-remembered trivia and their own inferences, and is not based on solid evidence about how people actually calculated (notice the lack of references). There is limited direct evidence of calculations per se still available today, but plenty of indirect evidence that people did not ever write down modern-style “arithmetic” using Roman numerals, but instead did calculation with tokens on some kind of counting board, or else calculated on their fingers.

> Romans didn't use subtractive shorthand notation

Not always as a strict rule as became a common standard centuries later, but there are numerous examples of this kind of subtractive notation from ancient times. Wikipedia mentions “For example, on the numbered gates to the Colosseum, IIII is systematically used instead of IV, but subtractive notation is used for XL; consequently, gate 44 is labelled XLIIII”

You might enjoy https://en.wikipedia.org/wiki/Roman_numerals#Irregular_subtr...


> (notice the lack of references).

I do so note. I also note a lack of references in your explanation.

Look, I am not picking sides here. I have no skin in this game, merely a very mild passing interest.

You're presenting your own (AFAICS) hypotheses as facts, and so are they.

The Wikipedia page merely suggests to me that innumeracy was a common problem across the Empire, and that people got it wrong a lot, in inconsistent ways. No?


Your claim was that “Romans didn't use subtractive shorthand notation”. This is a trivially falsifiable claim: There are numerous examples of subtractive Roman numerals used in Roman times. Wikipedia describes several.

> Wikipedia page merely suggests to me that innumeracy was a common problem across the Empire, and that people got it wrong a lot

This is comical deflection from my point, which was that Wikipedia directly refutes your claim (repeated from TFA) with numerous references.

People writing XL for 40 and XIIX for 18 and IC for 99 are not “getting it wrong”; they are using subtractive notation, which was both commonplace and well understood (but not standardized) at the time.

The author of TFA didn’t do any research whatsoever about the topic and is speculating based on some half-remembered trivia. Which is fine, it’s a blog post on a personal website. But you shouldn’t pretend it is a reliable source.

* * *

More generally though, if you want to learn about my main claims upthread that a counting board was used by Romans in preference to anything like written arithmetic, here are some references:

Chrisomalis (2020) Reckonings

> In fact, among the thousands and thousands of Roman and post-Roman medieval Latin texts that survive, on a wide variety of media, none line up Roman numerals in columns for arithmetic, or use Roman numerals directly for arithmetical purposes. Admittedly, much of the material and literate record of of the Romans is lost, but there is no evidence to support the idea that reckoners in the Roman tradition ever did what we might imagine them to have done, which is to use Roman numerals as computational aids by writing them down and manipulating them.

> This has not stopped Western scholars from trying to show that it could have been done. I know of no fewer than five attempts, largely independent of one another, to show how the Roman numerals could have been manipulated to perform basic arithmetic adequately (Anderson 1956; Krenkel 1969; Kennedy 1981; Detlefsen et al. 1976; Schlimm and Neth 2008). All of these are artificial—they use the structure of the system and then imagine different ways it might have worked. None of them directly present any evidence to show that they were used in this way, because there simply is no such evidence.

> At best, even when the conclusion is not so bad for the Roman numerals, it’s ahistorical and strange to insist on these comparisons. We are so attached to the idea that numerals are for arithmetic that it’s very hard to stop and ask whether they were actually used for doing calculations in a given society.

Turner (1951) “Roman Elementary Mathematics” https://penelope.uchicago.edu/Thayer/E/Journals/CJ/47/2/Roma... (who also describes Roman finger calculations)

> The other method of working mathematical problems available to the ancient Roman would be the use of the counting board or abacus. That this was the standard instrument for any type of complex calculation is, I believe, a safe assumption, but an assumption based on surprisingly little direct evidence. The very word "abacus" which I have been using does not seem to have been found in this sense in classical Latin literature. The most common terms used are rather calculi (pebbles) for counters, tabula for the table; calculos ponere for undertaking a problem. The widespread metaphorical use of calculus is ample evidence of the universal and early use of the device, but precise evidence on its nature or on the way it was used is remarkably scarce....

If you are interested in the general topic of number systems let me recommend Menninger’s classic book Number Words and Number Symbols. Or you could try Chrisomalis’s other book Numerical Notation. Or Ifrah, The Universal History of Numbers.

If you want to know about medieval European counting boards, look up Barnard (1916) The Casting-Counter and the Counting-Board.

A neat paper about Greek use of tokens is Netz (2002) “Counter Culture” http://worrydream.com/refs/Netz%20-%20Counter%20Culture%20-%...


This was tremendously illuminating, thank you.


Similar to the abacus or knuckle methods.

Btw, the word for pebbles is calx, hence calculate/calculus.


Nice, but this was mostly unused. Sea and trade was dominated by Greeks and their numerical system. It is almost as practical as decimal.

https://en.m.wikipedia.org/wiki/Greek_numerals


Forget multiplication, you probably need a Ph.D in Latin to perform counting of Roman Numerals up to 10,000 [1].

Indian/Arabic numeral (including 0) is such a revelation to the modern world.

Fun facts, the word cypher originated from the Arabic word sifir (literally means zero), because most of the European populations at the Middle Ages time cannot comprehend the concept zero as a number.

[1]https://www.cuemath.com/numbers/roman-numerals-1-to-10000/


> you probably need a Ph.D in Latin to perform counting [...] Indian/Arabic numeral (including 0) is such a revelation to the modern world.

There are several advantages of the Hindu–Arabic numeral system, but accessibility is not one of them.

It takes significant training in literacy and numeration to become fluent with them, and the representation of numbers is much less direct than Roman numerals or similar systems which can be learned very quickly. For several centuries Roman numerals remained the standard tool for ordinary people in Europe while the educated elite (accountants, mathematicians, scientists) switched to Hindu–Arabic numerals.

If Roman numerals seem hard to decipher, that is mainly evidence of your lack of familiarity with them rather than any innate difficulty.

(Funny side note: the word “decipher” originally literally meant “read and interpret a Hindu–Arabic number”, from the time when they were considered obscure and difficult. The “cipher” part refers to the symbol ‘0’.)


Hm! I've come across this as "Russian Peasant Multiplication" https://www.wikihow.com/Multiply-Using-the-Russian-Peasant-M...

Easier to digest I think to break TFA into two conceptual pieces

1. the representational complexities of roman numerals (remember not to use prefix notation; what does each character mean)

2. the actual meat of the multiplication algorithm (russian peasant method)



How to really multiply Roman numerals: convert them to Arabic numeral notation, multiply them (use a calculator or your favorite algorithm), and convert them back to Roman numerals.

It's very interesting to discuss this from a cultural or anthropological point of view. It doesn't seem very interesting from a mathematical POV. I'm disappointed that there's no mention of the history of Roman arithmetic or content related to actual Romans doing math.

I feel like anyone who is even asking the question "how can I do arithmetic with Roman numerals?" knows enough math to make this a trivial observation.


The Romans used an abacus to multiply numbers: https://en.wikipedia.org/wiki/Roman_abacus


If you ask me to multiply Roman numerals in an interview then I'm going to multiply the perceived value of your offer by 0.


distributive property and rewrite rules

        1 5
        10 50
        100 500
        1000

        i v
        x l
        c d
        m
x moves down, v moves over

        17 * 42 = 
        xvii * xxxxii = 
        x*xxxx + x*ii + v*xxxx + v*ii + ii*xxxx + ii*ii
        cccc + xx + llll + vv + xxxxxxxx + iiii = 
        cccc + llll + xxxxxxxxxx + vv + iiii = 
        cccc + cc + c + x + iiii = 
        ccccccc + x + iiii =
        dccxiiii = 
        714




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: