Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Okay, first and foremost, the algorithm obviously was never actually used in the way this story describes, because it is totally ridiculous and that is not even the point of the article.

But let's say it was. In saying that the shaman knows how to put two sets of 7 stones in a particular pile, it is implying that the shaman also knows how to put 34 sets of 7 stones in a particular pile. He also knows how to count them, so the problem is already solved. What he is doing is a bit more "rube goldberg" than novel. It may have parallels with some real algorithm for multiplication, but it is certainly not a very direct representation of it.



We know that the algorithm was used because it was specifically described in ancient Egyptian texts. The calculator would use either symbols on paper or objects representing successively larger numbers (1,5,10 etc) to perform the algorithm. He obviously wouldn't use only a single stone to count out each number.


Does it help if you don't call them "stones" but call them "bits"?

(https://en.wikipedia.org/wiki/Multiplication_algorithm#Peasa...)


No, it absolutely does not help. In the algorithm you are citing, the numbers never leave their binary representation; there is no counting of the units that make up the number. The step of multiplying by 2 is done by shifting the binary representation of the number, which is not the way that this supposed "Ethiopian algorithm" works. The long multiplication algorithm (in binary or not) has complexity O(log(NM)), where N and M are the numbers to be multiplied, while this algorithm has complexity O(NM), and also gets there in a roundabout way.

This algorithm is totally pointless if you're not going to work with a positional notation for the number; I am sure it was never used in the way described, with stones. Anyone capable of understanding the problem in the first place - 34 goats, 7 pieces per goat - would count out the price - here is 7 for the first goat, 7 for the next, etc. - and tell the shaman to take a hike. This story amounts to calling Ethiopians idiots for taking an algorithm suited for positionally represented numbers - or at least numbers in some kind of a concise representation - and using it in a totally unnecessary way with numbers represented as groups of stones, and not understanding the pointlessness of all the drudgery.


No, the algorithm as described is very different from binary multiplication. It requires a number of stones proportional to the result, while the number of bits required when doing binary multiplication is polylogarithmic.

It's a big difference: 1000 * 1000 would require 1000000 stones if done with the "Ehiopian algorithm", but it can be done with less than 1000 stones by using normal binary multiplication.




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

Search: