16 ms·
How to Multiply Roman Numerals
- jacobolus 4y agoBinary (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_multiplication 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.
- credit_guy 4y agoA 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.
- lproven 4y agoThis 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?
- jacobolus 4y agoTFA 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_subtractive_notation https://en.wikipedia.org/wiki/Roman_numerals#Irregular_subtr...
- lproven 4y ago> (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?
- 4y ago
- gumby 4y agoSimilar to the abacus or knuckle methods. Btw, the word for pebbles is calx, hence calculate/calculus.
- throw93232 4y agoNice, 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 https://en.m.wikipedia.org/wiki/Greek_numerals
- jhallenworld 4y agoUse Claude Shannon's THROBAC-I https://cacm.acm.org/blogs/blog-cacm/235492-calculating-with-roman-numerals-is-not-so-difficult/fulltext https://cacm.acm.org/blogs/blog-cacm/235492-calculating-with...
- ipnon 4y agoIf you ask me to multiply Roman numerals in an interview then I'm going to multiply the perceived value of your offer by 0.
- NAR8789 4y agoHm! I've come across this as "Russian Peasant Multiplication" https://www.wikihow.com/Multiply-Using-the-Russian-Peasant-Method 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)
- robot_no_419 4y agoHow 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.
- DonaldFisk 4y agoThe Romans used an abacus to multiply numbers: https://en.wikipedia.org/wiki/Roman_abacus https://en.wikipedia.org/wiki/Roman_abacus
- deleted 4y ago[deleted]
- nh23423fefe 4y agodistributive 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
- teleforce 4y agoForget 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/ https://www.cuemath.com/numbers/roman-numerals-1-to-10000/
- jacobolus 4y ago> 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’.)