You relax comfortably on your couch while typing and clicking away on your smartphone or computer, as satellites are launched into orbit, artificial intelligence performs a wide range of tasks, and the markets are flooded with uncountable electronic gadgets that perform almost any task you can think of. But did you know that all these feats could not have been achieved without a fundamental mathematical principle, an underlying set of instructions, an algorithm: an idea that originated from Africa and was invented by Africans?
An algorithm in layman’s terms means an established, detailed and structured step by step instruction aimed towards solving a problem or carrying out a task. Actually, we employ algorithms in everyday tasks; a food recipe is an algorithm, a do it yourself guide is an algorithm. However, in this article, we do not mean that Africans originated step by step instructions for food recipes or do it yourself guides or those sort of things, even though it might have been possible given that they were the earliest humans. What we do refer to are the earliest established mathematical principles by which most machines operate, mathematical algorithms. The set of mathematical rules which form the bases of most inventions was started in Africa and by Africans thousands of years ago.
THE ROLE OF ANCIENT AFRICA
Africa’s Contributions to human advancement are often downplayed. While Europe would readily acknowledge the contribution of ancient Greece as the foundation upon which they built their development, that credit is never extended to Africa.
“During the 19th century, many European writers, limited by ethnocentrism and racism, decided that black Africa could have had nothing to do with Europe’s rise to greatness,” wrote Gloria Dickson, A professor of AfricanAmerican studies at The College of New Jersey.
The Bamana code for instance and its different variations all across Africa is the foundation on which digital mathematics which is the bases in the binary coding of computers was invented^{[1]}.
The Greeks whom the modern world give much credit for their contributions had teachers from an ancient Kemet civilization which later came to be known as Egypt. It was the civilization that built the Sphinx, raised the pyramids, founded geometry and astronomy, produced the world’s first physician and established the world’s’ firstever library.
Greek scholars like Thales, Plato, Pythagoras, Hippocrates, Socrates to name but a few travelled to Kemet to study and learn.
It was in Kemet that Pythagoras, widely acclaimed as the father of mathematics learned calculus and geometry which was taught to him by Kemet priests during his 23 years of study.
Not to take anything away from the Greeks, they formed their own ideas and expatiated on what they have learned, however they always acknowledged the education they acquired from the Kemites.
“Egypt was the cradle of mathematics,” wrote Aristotle.
THE FIRST MATHEMATICAL ALGORITHMS
Although the word algorithm is widely associated with a Persian named Abu Ja’far Mohammed Ibn Musa AlKhowarizmi, it was derived from mathematics which was founded by the Egyptians about 5,000 to 4,000 years ago.
It was even the Egyptians that came up with the first recorded mathematical algorithm; this is not necessarily surprising given that mathematics is full of algorithms, a document from about 1650 BC bought in Egypt by a Scottish collector Rhind and named after him as the Rhind Mathematical Papyrus was the first ever known documented mathematical algorithm.
The document was written by a scribe called Ahmes. And contains a series of arithmetical and geometrical problems along with some computational tables. It also contains a technique for fast multiplication and another table for division of which even today is still considered an important computational technique.
There are only a few written records of the Egyptians’ mathematical knowledge. Unfortunately, only two mathematical documents have survived: the Rhind Mathematical Papyrus and the Moscow Mathematical Papyrus which is also known as the Golenishchev Mathematical Papyrus. Like you correctly guessed the Golenishchev Mathematical Papyrus is named after Vladimir Golenishchev a Russian Egyptologist who bought the document between 1892 and 1893 in Thebes Egypt.
The Rhind Mathematical Papyrus
Both documents were written in the 17th century by the same man Ahmes.
Ancient Egyptian multiplication algorithm involved two methods used by the scribes. One method is the Rhind Mathematical Papyrus technique which is similar to the Moscow Mathematical Papyrus or hieratic Moscow. The second method is the Ethiopian multiplication also known as Russian multiplication or Peasant Multiplication.
THE RHIND AND HIERATIC MOSCOW MULTIPLICATION ALGORITHM
The Rhind and Moscow mathematical algorithm are similar, the method involves the systematic multiplication of two numbers by employing the ability to multiply and divide by only number 2, but it also employs addition skills.
It does this by a technique referred to as mediation and duplation, the technique is basically the decomposition of one of the multiplicands, usually the smaller number into a sum of the powers of two, and the creation of a table of the doublings of the second multiplicand; hence the term mediation and duplation where mediation means halving one number and duplation means doubling the other.
Moscow Mathematical papyrus
DECOMPOSITION
The ancient Egyptians created and established tables full of numbers of the powers of two. This way they would not have to recalculate them each time.
The decomposition of a number, therefore, means finding the powers of two which make up such a number.
Knowing that a given power of two would only appear once in a number, they proceeded methodically by first finding the largest power of two less than or equal to the number in question, then subtracting it from that number. For example, the decomposition of the number 30 is as follows
a) First a table is created by doubling numbers starting from 1 until the nearest number less than or equal to the number to be decomposed is obtained.(this table has already been established)
1 + 1 = 2
2 + 2 = 4
4 + 4 = 8
8 + 8 = 16
16 + 16 = 32
b) To decompose the number 30, the largest power of two less than or equal to 30 is subtracted from 30 methodically until nothing remains, in this case, starting with the number 16
30 – 16 = 14
14 – 8 = 6
6 – 4 = 2
2 – 2 = 0
Therefore 30 is the sum of 16, 8, 4 and 2
TABLE
A table is then created after the first multiplicand must have been decomposed. The table is made up of the powers of two corresponding to the first multiplicand times the second multiplicand, up to the largest power of two obtained during the decomposition. in this case, the second multiplicand is 10. for example
2 x 10 = 10 + 10 = 20
4 x 10 = 10 + 10 + 10 + 10 = 40
8 x 10 = 10 + 10 + 10 + 10 + 10 +10 + 10 + 10 = 80
16 x 10 = 10 + 10 + 10 + 10 + 10 +10 + 10 + 10 + 10 + 10 + 10 + 10 + 10 +10 + 10 + 10 = 160
The table will look like:
2 
20 
4 
40 
8 
80 
16 
160 
RESULT
The result is then obtained by adding the numbers on the second column, therefore 30 x 10 is as thus:
30 x 10 = 20 + 40 + 80 + 160 = 300
PEASANT MULTIPLICATION ALGORITHM
This is another method ancient Egyptians used for a multiplication algorithm; it is also called Russian Peasant Multiplication or Ethiopian Multiplication. It involves only multiplications and divisions by two.
Under this method one multiplicand is halved in a series of steps. At each step, the remainder of the division operation is discarded, until the quantity one is obtained. A multiplicand is a quantity which is to be multiplied by one or more other numerical quantities in a multiplication operation. This is done on the left column, while the other multiplicand is doubled simultaneously on the right column, at each step. The rows containing even numbers on the left column are then struck out, both left and right columns when that condition is met. Next, the numbers on the right column that are not struck out are added to get the result.
For example. 10 x 30 is thus:


5 
60 


1 
240 
The remaining numbers on the right column when added produce the result of the multiplication problem: 60 + 240 = 300.
MODERN APPLICATION OF ALGORITHMS
Algorithms play a huge part in our everyday lives; we live in a world run by algorithms, currently dominated by computer programs. Algorithms are so closely associated with computer programming that most people actually think that algorithm is a term that originated from computer science.
Infrastructure built on algorithms have become such that society has become almost hopelessly dependent on them to function effectively.
Algorithms are increasingly determining our future; In science, complicated algorithms are used to design new drugs or model the climate, it is used in banks, and for financial trading. Banks now recruit computer experts to code algorithms for a role called “algorithmic trading” or “algotrading”.
Algorithms are used in policing; a classic example is the “Operation Blue Crush” employed by the police department of Memphis, Tennessee in the United States^{[2]}. Algorithms are used in medicine after trial runs in the 1950s discovered that teaching doctors and nurses to apply algorithmic decision trees improved healthcare. An app called Babylon Health is now able to produce competent medical advice in the United Kingdom that it would take more than six years of medical training to develop in a human.
It is algorithms that fuel the internet infrastructure, internet giant Google’s search engine algorithm is a tightly guarded secret.
Even in music Mike McCready, a website developer developed an algorithm that can determine hit songs, by breaking up a song into parts; melody tempo, etc, these characteristics can be correlated with the characteristics of previous no 1 songs to determine if the song will be a hit, the technique is called advanced spectral deconvolution.
And what about the application of algorithms in electronics manufacture? It would require writing a whole book to exhaust its application in that field.
Although algorithms have been around for a very long time, the current surge in its interest and application stems from the vast amount of data now being generated, which is driven by groundbreaking computer advancements and technological breakthroughs. Algorithms are now being integrated into our lives. The use of algorithms cannot be faulted, it makes tasks easier and significantly increases productivity, a very difficult and painstaking process, once a series of instructions are developed for it and automated can make the same process appear effortless and many cycles of it can now be executed in a very short time. The downside of the rapid integration of algorithms in modern society is not really about algorithms per se but rather on the way society is structured regarding the use of data and privacy.
CITATIONS