Algorithms

Algorithms

Discussed to this day is whether the universe is composed of mathematical equations required to adhere to or is math our invention describing and predicting the cosmos. One definition of mathematics is the science of numbers pertaining to quantity, space, and time. Algorithms may perhaps be a system of math and can certainly be used for it but deals primarily with cause and effect. If this happens then that will probably if not certainly be made to or will happen as the result.

Preliminary examples of math are keeping count. If there are three marbles in a pile and two more are put in the same pile mathematics concludes there are now five marbles in that pile. When four are taken away one marble is left.

Likewise, fundamental algorithms can also be used for sorting. Given a bag of different colored marbles the first one taken out is put in a first pile, maybe it is blue. If the second marble taken out of the bag is blue it is put in the first pile but it if it is not, say yellow then placed in a second pile. Now the algorithm gets complicated. If the third marble out of the bag is blue it is put in the first pile and if yellow in the second pile but if not either color by being red then it’s located in a third pile. So forth and so on until no marbles remain in the bag. This algorithm makes it simple to count how many of the same colored marbles there are. Webster defines algorithms as a step-by-step procedure for solving a problem or accomplishing some end.

In the above illustration every time a marble is taken out of the bag and decisions are made which pile to put it in is called a loop in the computer world. Integrated electronic computers are extremely fast now capable of performing over a billion loops a second. Given a million marbles these computers can communicate how many marbles of each color are in a bag as soon as the enter key is pressed. Although modern computers are extremely fast they must follow direction of logic and reason.

Electronic computers may be a recent invention but math and algorithms are not. Evidence of counting is found in prehistoric human history before written records can be deciphered to make significant sense of. Wooly mammoth bones or the like have been found with columns of nicks cut in them equal distance apart indicating math and algorithms. Documented logic and reason will not happen until later ancient civilizations.

Evidence of early man have been found dating over a million years ago in north Africa and China. Prehistoric humanoids often referred to as cavemen are considered to be from 700,000 to 200,000 years in the past. They may not have had a conscience concept of logic and reason although religions were being developed. This required a belief in supernatural entities to make sense of why the world exists as it does and subsequently establish a social order. The ones who understood and could explain it best are called Shamans.  This era is also referred to as the stone age. These primitive people spread across the globe.

With discovery of processing metals to make better tools and weapons began the Bronze Age dating back 2,500 years B.C. (Before Christ) or B.C.E. (Before Common Era), whichever is preferred, resulting in ancient civilizations. The Bronze Age lasted until the 1100 B.C. when iron and steel are made. Babylonia originated in the early Bronze Age and ancient Egypt in 1550 B.C. The Xia Dynasty predates 2,000 B.C.E. in China dividing the continent into western and eastern regions. Religions ruled with supernatural deities now referred to as gods. Usually one deity in particular dominated over the others. Evidence of Hinduism is found 4,000, Buddhism 2,500, and Judaism 2,000 B.C.E. Legend has it the supreme Greek god Cronus was defeated by his son Zeus. It can’t be proven one way or other whether these transcendental entities exist or not but societies believing in them appear to outlast others that don’t.

Not until after discussion of philosophy by ancient Greeks and others that the Hebrew concept of only one god began to dominate modern society by Jesus in the first century, Buda the fifth, and Mohammad during seventh century A.D. or C.E. putting an end to Pharos, Caesars, Emperors, Shoguns, Kings and Queens demanding to be exclusive descendants of Gods.

Algorithms could care less about history and religion. They do with logic and reason. Religions are now included in philosophical metaphysics because belief can neither be intrinsically proven nor disproved mathematically. However, there seems no point in discussing philosophy and algorithms without knowing how they evolved.

Logic is an ancient Greek word used by its philosophers. The most well-known are Socrates, Plato, and Aristotle. Confucius was doing the same at the time in China around 500 B.C.E.  Philosophy is defined as the pursuit of wisdom, reason and understanding by applying logic. Not only did these theorists attempt to explain cause and effect but apply it to make decisions.

For example: In a game of marbles should the blue or red one be used to shoot with to achieve best results. This is easier to keep track of by listing the reasons for the blue one on the left side of a paper and for the red on the right side and likewise for not using the blue on the left and red on the right. This can be pictured to look like a diagram of a family tree. Pros and cons are subdivided for each reason and numbered from 1 to 10 ranking importance with positive numbers for and negative numbers given to reasons against. By adding and subtracting all the numbers on the left side of the paper and those on the right logic determines whether a blue marble or a red one has the highest probability of winning and should be used. This paper is called a flow chart explaining algorithms.

These philosophers also concluded it probably don’t matter if the blue or red marble is used to shoot with and may be best left to chance by flipping a coin. An attempt to use flow charts to make decisions in government became long and complicated with a vast number of citizens having reasons for and against when deciding an issue. It was concluded voting is more effective for wellbeing and satisfaction of society as a whole. Hence the idea of democracy was established.

Philosophy embracing collective reason as the path to contentment came to an end with territorial expansion of Alexander the Great conquering the vast territories of Macedonia in 323 B.C. extending from northern Greece to what is now Yugoslavia and Bulgaria. Alexander’s view of divide and conquer was also applied his army and a military divided was of little use. Although different opinions might be considered it became necessary for him to make final decisions how they all were to perform. The Roman Empire dominated not long after that with Caesars claiming absolute authority until its fall in 476 A.D. in the Common Era. Their philosophy basically revolved around aesthetics relating to sensory sensations of beauty and enjoyment.

A computer is a devise for calculating, processing, and storing data. An early device of this nature is the abacus dating back 2400 B.C. in Babylonia. This apparatus has a series of vertical rods supporting five beads on the bottom separated by a barrier from beads on the top. The reason for five is not hard to figure out since there are five digits on one hand. An abacus not only keeps count but can be used for adding and subtracting as well as multiplying and dividing. Modern slide rules also calculate trigonometry and calculus.

Paper may not be a computer in the sense it does not perform computations but assists in it and certainly stores information more easily shared with others. Paper was invented by Egyptians using papyrus plants. Although that paper was thick and heavy it was much easier to write on with ink made of other plants and minerals than carving and painting on sandstone. The Chinese further refined this process using plants growing there. Arabs got hold of this development finding methods to make it as durable and thin increasing their enlightenment and conquests. Arabic numbers are now used replacing Roman numerals. German invention of the printing press started the modern industrial revolution resulting in positive and negative consequences.

At first electric computers weren’t that great and were large and bulky but by using motors they could move mechanical objects around much faster than by hand. It wasn’t until development of electronics that things started rolling. Initially resistors, capacitors, transducers, diodes, and transistors were relatively large but smaller than vacuum tubes. The race is on figuring how to make them more miniature resulting in microchips made up of many of these components in a space smaller than a button on a remote control. They can’t handle much electrical current but that isn’t necessary to operate logical functions. Electricity is extremely fast moving at the speed of light at approximately 186,000 miles per second in a vacuum. Maybe not that fast in metals and silicon but electrons don’t have far to go in microchips.

These extremely small components are used to build electronic gates to determine logical functions. Let’s say one microvolt represents one, on, yes, or true. Then zero or absence of voltage represents off, no, or false. Given two inputs or circuits a simple logic gate has one output. An AND gate requires both circuit feeding it to have a microvolt for a microvolt to leave it. A OR gate requires one, the other or both incoming circuits to have a microvolt for a microvolt to exist on the output. The opposite being NAND and NOR gates. When both inputs are one to a NAND gate the output will be zero and in a NOR gate if any or all of the inputs are one the output will be zero. Depending on how logic gates are interconnected interprets if this and this is true or not true, and that and that might be or not be true, they will determine whether the outcome is true or false.

This all seems impossible although made easier by Boolean algebra resulting in computer programming and coding. Morse code used by crystal radios and telegraph lines is an example. When a switch at one end is taped or pressed creating dots and dashes it causes a light bulb to blink or speaker to make static sounds. Each letter in the alphabet and number is assigned a unique sequence of dots and dashes sent electrically and interpreted back to English at the receiving device. Instead of dots and dashes electronic computers use zeros and ones for coding.

The two basic microchips in a computer are Read Only Memory (ROM) and Random Access Memory (RAM). ROM chips are hard wired meaning their logic can’t be altered. They are used to determine the basic operating characteristics of a computer called firmware. Logic in a RAM chip can be changed by computer programming referred to as software. All computer applications (APPS) are software determined by program coding and algorithms. Computer memory is stored in registers.

There are many types of software computer languages using different coding symbols found on a keyboard the computer understands telling it what to do. If this happens then that will happen. Cause and effect. If Yoda is moved to a location on the computer screen inhabited by an evil wizard he could be gobbled up.

Which came first, the chicken or the egg. Human brains are capable of processing a lot of information and making many decisions based on it a minute. Is the universe made of up of algorithms it must adhere to or are they one way for us to explain and predict it? Our DNA is a genetic code full of algorithms.

Steve Eberling @ www.thndrsns.com

Posted in Copywriting.