14 * 12 = (14 * 10) + (14 * 2) = 168
Anyone else do that?Sometimes I refactor at first:
14*12=28*6=56*3=56*2+56=112+56=168
or 14*12=7*8*3=21*8=160+8 14 * 12 = (12^2) + (12*2) = 168However for historical purposes, the question is why? I think there is a very simple reason. Before you have based number systems, most number systems are usually derived from tally sticks. This makes some functional sense, and once you think about it from a tally stick, roman numerals make perfect sense. For example consider the number XXIV. It represents a position on a tally stick:
IIIIVIIIIXIIIIVIIIIXIIIIVIIIIXIIIIVIIIIXIIIIVIIIIL
Count to the second X and then one before the V. IXL is the same. Count backwards one X and then one I from the L. So while our system of numbers today is based on position of digits, many earlier systems were based on visualized markings on tally sticks. So you have numbers without a base system. This divide and add approach works very well when you don't have a number system. You can take your tally stick, figure out the number, and the same on the other side. I cannot think of another way to do multiplication on a tally stick.
Interestingly tally sticks of a slightly different sort were in use up until the early 19th century in Britain as tax receipts and in 1836 the attempt of the British government to get rid of these humble staves leveled both houses of parliament. Before you have widespread numeracy, tally sticks are how you track amounts for everything from debts to receipts. It isn't surprising that this would be a widespread method.
Of course, here's another, er, related algorithm. Take your two numbers A and B. Make a variable called C, initially set to 0. Iteratively decrease A by 1, and increase C by B. Do this until A = 0. Then C is your answer. Everyone knows this technique, it's obvious. But it means that you can do multiplication with just + and --.
I wonder what other ways you can do multiplication with a limited set of mathematical operators.
While the new simple methods got the job done, I still think the old methods are worth teaching because they're required when doing some advanced math later on.
The difficult method of long division, for example. After elementary school arithmetic, I've had to re-learn the method several times. In grade school it was doing divisions of numbers but later the same method was used for division of polynomials, then doing binary and again when learning how to compute crc checksums and hassling with polynomial fields in crypto class.
Math education is not necessarily supposed to be about learning how to get shit done (if it were, it would be obsolete because of calculators), but rather learning methods to deal with numbers, polynomials and other algebraic beings.
# Ethiopian Multiplication
# usage: ruby em.rb 673 7
m, n = ARGV.map(&:to_i)
product = 0
while m >= 1
puts "%4d : %4d %s" % [m, n, m.even? ? "Ignore" : ""]
product += n unless m.even?
m = m / 2
n = n * 2
end
puts "Product: #{product}"
https://gist.github.com/3660240