Some classic algorithms
T. W. Körner · Cambridge University Press eBooks · 1996
These twice five figures If you are a shepherd counting sheep there is a natural way of keeping tally. Each sheep is recorded by a simple stroke I. When you have ten strokes IIIIIIIIII (check by counting on your fingers) cross them out and make a cross sign X. Now start again with strokes I, crossing out when you reach ten and making another X and so on. In this way if you have forty-three sheep you will end up with four Xs and three Is i.e. XXXXIII. If you have a large flock you may reach ten Xs in which case you cross them out and make a C (from ‘centum’, the Latin for one hundred). Thus CCXIIIIIIII represents two hundred and eighteen. To make numbers easier to read the Romans used V for five and L for fifty giving CCXVIII for two hundred and eighteen and CCLXXXI for two hundred and eightyone†. As society became more complex (a Roman legion under Julius Caesar consisted of six thousand men, the ordinary soldiers being paid two hundred and twenty-five denarii a year with the cost of rations being deducted) the Romans added the symbols M for one thousand and D for five hundred. Since we are not used to working with Roman numerals, we are apt to exaggerate the difficulty of calculating with them but, for example, addition is no more difficult with Roman numerals than with our own.