In Day of the programmer. Who thought up algorithm?
Recently I thought that in the opinion of the young citizens of the twenty first century, since the childhood who got used to the computer I am a mammoth some, living in prehistoric times. I had to work at computing units which occupied several rooms. Textbooks according to which I had to study, remembered ancient Roman abacuses and of Al - Horezmi (786 - 850) .
However, and now we are not present and we will remember great this scientist, to the place and out of place squeezing the word “algorithm“ in the speech. Because there was this word from Latin writing (alhorithm) of the Arab name of the scientist: “al - Horezmi“, that is “from Khwarezm“.
That Khwarezm together with all Uzbekistan was included into the Soviet Union in due time al - Horezmi was considered as more “ours“, than other scientists - his contemporaries. Though judging by other his name, “al - Madzhusi“ (from magicians), origins it was, most likely, Persian, from a family of Zoroastrian priests who were called “magicians“. However, in those days, the columns “nationality“ in any documents did not put as also the concept such in plant was not.
In Khiva now and the monument costs to the famous fellow countryman. Though the most part of the life of al - Horezmi lived far from Khwarezm, in Baghdad. Baghdad of that time was the city young and dynamic. It was founded in 762 as the capital of the newborn caliphate. Several generations of Caliphs (among them and well-known on “Thousand and one night“ Garun of al - Rasheed) built and decorated the new capital. The son Garuna of al - Rashida, al - Mamun, organized in Baghdad “the house of wisdom“, something like academy. “the house of wisdom“ became one of the main centers of learning in the world of that time soon.
And not only learnings Muslim. In local library collected works of antique, Byzantine, Indian, Persian scientists and philosophers and translated them into the Arab language. Work of translators was paid remarkably - gold for work gave as much how many the translated treatise weighed. In library “house of wisdom“ (and it was only one of many Baghdad libraries) works of many Ancient Greek philosophers waited hard times that centuries later - hard times to come back to Europe and to lay the foundation of the European science and philosophy.
This library at al`s Caliph - Mamune headed al - Horezmi. However there was it not only the librarian and the collector of books, but also the scientist.
Just as in the Baghdad market goods from India, from Arabia and from Europe met, and in “the house of wisdom“ doctrines and abilities from all neighboring countries met. On the Baghdad market there was an exchange of goods. In the Baghdad “house of wisdom“ there was an exchange of knowledge. But knowledge, unlike carpets or spices, possesses remarkable property: giving, you do not lose them.
Al - Horezmi wrote the treatise on arithmetics which was called “About the Indian account“. For those times this book was the same “amplifier of intelligence“ what in the twentieth century became the computer. Addition and subtraction of large numbers stopped being intimate knowledge for which at universities gave the doctor`s degree. And there was it all - navsy of - for two inventions. Both inventions seem to us obvious now that, however, does not belittle their genius. Both were born in India, but told the whole world about them al - Horezmi on - Arab.
The position numeral system in which some final quantity of signs (figures) was applied to record of number was the first invention . At the same time numerical value of figure was defined by its situation in record (position).
All advantages of position system become obvious if to compare a denary numeral system habitual to us to some not position system of record of numbers. For example, with Roman in which letters of the Latin alphabet are applied to record of numbers. I=1, V=5, X=10, L=50, C=100, D=500, M=1000. The number registers from left to right, at first bo ́ lshy figures, then smaller. The resulting number turns out addition of all figures. MDCLXVI=1000+500+100+50+10+1=1661. The record IVXLCDM is considered wrong because in it figures with smaller value precede figures with bo ́ lshy value. If two or three identical Roman figures I, C or M stand nearby, they develop. II=2, MMM=3000. Instead of writing of in a row four identical figures I, X and C, this figure is subtracted from figures V, L and D respectively. For this purpose change a sequence of figures and smaller put to the left of bo ́ lshy. IV=5-1=4. XL=50-10=40. The record IC - wrong because from C subtraction it is not made. The record IL - too wrong because it is possible to subtract from L only the next younger figure, X. Romans wrote four identical figures only in one case: IIII=4. It became not to use without need an initial of the Supreme deity, Jupiter, IV.
Well, everything is clear? Then small exercise. What event took place in the MDCDLXI year?
B MDCDLXI=1000+500 - 100+500+50+10+1=1961 occurred to year many events, but the main thing probably weeds the person in space. Which would hardly be made if ballistic calculations were made in Roman, not position and therefore to very bulky numeral system.
Well, and second question. What largest number can be written by means of the Roman figures?
Is obvious, MMMCMXCIX=3000+900+90+9=3999. We are afraid here that in 2012 there will be a doomsday from - for the fact that the Maya calendar comes to an end, and ancient Romans have all arithmetics on 4000 came to an end - and nothing terrible!
Creation of the sign designating lack of any number was the second great invention which facilitated to mankind the account. Indians called this sign “sunye“ (“emptiness“). Al - Horezmi translated him into Arab the word “sifr“ having the same value. From this word there was a word “figure“. And word “code“ too. We give this number in “zero“ from the Latin word “nullus“ (“any“).
Thanks to these two great inventions became possible only by means of ten figures uniformly to write down both as much as big, and as much as small number. Moreover, now rules of addition and subtraction of multidigit numbers became simpler so that became possible to train in them even children. All of us learned these rules in the first class and remembered them forever. If suddenly near at hand there was no calculator, any will be able to make calculations “on a piece of paper“. Or not any?
Rules of addition and subtraction for the multidigit numbers which are written down in a decimal numeral system, al - Horezmi formulated in the “Book about the Indian account“ in the form of exact sequence of actions which should be made to come to the required result. Such sequence of instructions is also called algorithm . One algorithm in this text already was. This rule of record of numbers by means of the Roman figures which is four paragraphs above. For convenience I italicized it.
Other treatise of al - Horezmi was devoted to the solution of linear and quadratic equations. In this book (besides in the form of algorithms) process of the solution of the tasks reduced to linear or quadratic equations was described. The treatise was called “The book about restoration and opposition“, or on - Kitab al - dzhebr Wal - a mukabala is Arab ““. From this most “al - dzhebr“ there was a word “algebra“ as the name of science about the solution of the equations. Thus, the book of al - Horezmi can consider as the very first textbook of algebra, but without formulas habitual to us. Formular record of algebraic algorithms was entered only by the French mathematician Francois Viete (Fran ç ois Vi è te) (1540 - 1603) .
The third book of al - Horezmi was devoted to a calendar. In it time numeral systems at all neighboring people were considered and, the main thing, algorithms of the translation of dates between different calendars were described. It is necessary to tell that these algorithms with little changes are used also in modern computers