9. Living Algorithm
Encompasses Numbers & Words

 

Chapters
Prior
Next

Introduction to Algorithms

Definition of Algorithm

"In mathematics and computer science, an algorithm is an effective method expressed as a finite list for calculating a function. … In simple words, an algorithm is a step-by-step procedure for calculations. … Giving a formal definition of algorithm, corresponding to the intuitive notion, remains a challenging problem." (Wikipedia) The 'step-by-step procedures' we learn in elementary school to add, subtract, multiply, and divide large numbers are common examples of some simple algorithms.

Intuitive Notion: Procedure for determining answer

The 'intuitive notion' of algorithm that we employ in our discussion of the Living Algorithm has to do with a 'step-by-step procedure’ for determining an answer. In mathematics and computer science this answer must be precise and unique - right or wrong. This is also true for the algorithm that determines the mathematical value of the Living Algorithm. However, when living systems employ the Living Algorithm's algorithm to make reasonable predictions, the answer must only be close enough for practical purposes.

Humans employ Living Algorithm to make daily predictions

Example: A Sense of Arrival Times

This concept is not complex in any way. Everyone employs the Living Algorithm's algorithm to make predictions every day of our lives – frequently. For instance, we regularly make predictions as to arrival time. This prediction determines when to expect a child, spouse, or friend to return home from school, work, or play; or conversely, when this assortment of individuals might arrive at their variety of destinations. As might be expected, this prediction includes a most probable time combined with a range of possibilities and, we will even suggest, a sense of the tendency (direction) of the pattern.

Partner’s return: A sense of expected arrival time – including range & direction

Let's turn these abstractions into a concrete example. We regularly make reasonable predictions as to when our partner will return home from work. Perhaps the vagaries of demands or traffic provide a range of possible times that our loved one might arrive. We might phrase this sense in the following manner. "She normally arrives home at 5:30 plus or minus a half hour. But recently she has been arriving a little later. So I'm expecting her home by at least 6:15. If she's much later than that the 'worry switch' goes on. For she is never that late." This type of reasoning is common for people of all races, ages, and sex. It might even be called a common sense.

Everyday Prediction of Arrival Time requires 3 values and thresholds

However, to make this normal statement with any degree of accuracy requires a reasonable knowledge of at least 3 values: the expected time (5:30), the range of times (plus or minus a half hour), and the direction (a little later). Further this statement requires a rudimentary sense of the Bell Curve (never that late) and thresholds (the 'worry switch' goes on). The numbers are complicated averages and the concepts are fairly sophisticated. Yet each of us, including some animals (feeding time), makes these computations on a daily basis regardless of socially determined mathematical or scientific skills. Although some make better use of this information than others, this is not determined by scientific or computational skills, but by common sense.

Crossing a threshold triggers action

Crossing a threshold is frequently, if not always, the temporal event that triggers our decision to take action. Crossing a threshold also determines many, if not all, of our automatic biological responses. The aforementioned quantities (most expected, range and direction) are required to determine these thresholds. So how do we compute these values that are so important in our decision-making? Is it time to call the police, get mad or just wait patiently? When does our stomach turn on the digestion fluids and when are they turned off?

Mean Average has Fatal Flaws

Mean Average determines most expected value of arrival time

Of course the most important prediction has to do with the most expected time. How do we compute this value? A seemingly simple approach would be to compute the ordinary mean average of everyday arithmetic. This would give us the average arrival time of our partner. What would we need to compute this value? Just a simple list of arrival times. With this list we could use an elementary school algorithm (a simple 3 step procedure) to calculate the desired result. 1) Add up the arrival times to determine a Sum, 2) Count the number of arrival times, then 3) divide the Sum by the Count. Three simple steps. Et voila! The average and most expected time of arrival.

Mean Average difficult for Living Systems to compute

Determining this value is simple, especially if you are a computer or an adding machine. The problem is in remembering all the specific times, combined with counting the number of these values. Even remembering 4 arrival times is challenging, not to mention the addition and division. Further, although these individual arrival times are important in terms of calculating the average, they have no emotional importance in and of themselves. In contrast, the average (in this case, the expected arrival time) has emotional importance because as a predictive tool it sets expectations. Because of the emotional component it is easier to remember. In fact, in neuro-science they call this ‘emotional tagging’ and claim this is a significant factor in memory.

Mean Average does not address Recency Effect

The other problem with this form of computation has to do with the recency effect. In general, for living systems the most recent data input has more weight (potential impact) than past data. Further the weight of the data fades with time. The most recent data has the most potential impact, while the most distant data has the least potential impact. In terms of our example, we remember that our partner has arrived later than normal recently. And we only vaguely remember that she may have come home late in the distant past. This has more to do with the heightened importance of recent events in determining action, and less to do with the fading nature of memory.

Needed: Simple Algorithm with Complex Requirements

As living systems, we need a simple step-by-step procedure (algorithm) to determine an expected arrival time. However, the simple algorithm has some distinct requirements – minimal memory storage, minimal computation, and also takes into account the recency effect. Is it possible to have a simple system that fulfills these complex requirements? Or should we just throw up our hands in despair? Does God provide these essential predictive values? Or will Science eventually discover some complex neurological mechanism that provides them?

Data Sets, Data Streams & the Recency Effect

Take a deep breath. Let’s not give up quite yet. Let’s go back to the beginning of this process. What was the only ingredient needed for the computation of the average arrival time? A simple list. Sounds like a data set. Let’s turn our data set into a data stream. In daily life, we process information as a stream, where the most recent points have the greatest significance (the recency effect). It is difficult to remember a simple list of arrival times. Yet, remembering a stream of arrival times in the order of their importance is even more daunting. Terrible suggestion. Give it up. Let’s run for the hills before confusion overwhelms us. Data Streams incorporating the recency effect are an order of magnitude more complex than a simple set of data.

Employing the Living Algorithm with Words, not Numbers

Living Algorithm’s specialty is digesting data streams

But wait a minute. Data Streams? Does that ring a bell? Of course! The Living Algorithm’s specialty is digesting data streams. Let’s see how her Family of Equations deals with the data stream of our partner’s arrival times. Hmmm? What is the first data point?

Arrival Times come in relative terms, ‘a little more’

Yikes! Another roadblock. None of us remember exact times, just general notions of time – a little before six, a little after six, right on time, a lot after six, and way before six. How do we put ‘a little before’, or ‘a little after’ into our internal computer? Even the Living Algorithm needs numbers.

Boss, let’s get out of here. This is never going to work.

Verbalizing the Living Algorithm

Sloooow down, little brother. How about the Living Algorithm?

Living Algorithm?! I thought that only dealt with numbers?

An algorithm is just a step-by-step procedure. Maybe it can apply to words as well.

How can an equation possibly digest words?

If we don’t look at it, how can we possibly say what it can do? Before running away, let’s check out the Living Algorithm.

 

1)  Find the difference between the most recent data point and the current average.

2)  Scale this difference down by a some ratio (1/2 or less)

3)  Add or subtract this scaled difference to the current average to obtain the new current average.

Three steps. Let’s see how it deals with our verbal data.

Applying verbal algorithm to partner’s arrival time

Suppose our first data point is ‘a little more’. Let’s see? 1) What is the difference between ‘a little more’ and the expected arrival time (the previous average)? Simple, ‘a little more’, nothing else. What’s next? 2) Scale down this difference. Now our value is tiny. 3) Finally, add this tiny value (the scaled down difference) to the previous average to get the current average. Because our partner arrived home a little later than normal we now expect them to be just a tiny bit later from now on. Simple. If the arrival time gets later and later, the expected arrival time (the average) drifts slowly later. If the arrival times are erratic the expected arrival time hovers around a center point.

Living Algorithm Memory Requirements: a single emotionally charged Average

Living Algorithm’s Memory Requirements: One data point only – Current Average

Sounds pretty reasonable; seems sensible; but maybe too simplistic. For instance, how does this process deal with the accumulating stream of arrival time data?

With each new arrival time data point, a new expectation is formulated. Once this occurs previous expectations and the data that generated them become as unimportant as yesterday’s weather. Accordingly, the memory requirements of this algorithm are simple: just one value, representing the current expectation. This expectation is constantly adjusting to the most recent input. There is no need to remember any of the specific arrival times or how many of them there are. As such, the Living Algorithm algorithm is incredibly efficient, requiring only the memory of the expected arrival time. Conversely, computing the simple mean average requires us to remember the number and values of a sequence of arrival times.

Emotionally charged Expectations about arrival time easy to Remember

There is a tremendous amount of emotion associated with the expected arrival time, as it sets thresholds of response. If one’s expectations are not met, then other thought processes kick in. For instance, if someone does not show up at the expected time, there is cause for concern. This concern might trigger a different kind of response than just waiting. In general our expectations, of whatever nature, are charged with emotion due to their connection with decision-making. Experimental results have firmly established that there is a positive correlation between emotion and memory. Consequently the expected arrival time is also easy to remember.

Algorithm easy to compute and easy to remember; what about recency effect?

We mentioned earlier that humans need a simple step-by-step procedure (algorithm) to determine an expected arrival time. This algorithm has 3 distinct requirements – minimal information retention, minimal computation, and it must incorporate the recency effect (the most recent information is most significant). The previous analysis established that the Living Algorithm’s algorithm fulfilled the first two requirements. It is both easy to compute and easy to remember. But what about the recency effect? How does the algorithm deal with this complex notion?

Recency Effect: Inherent to the Living Algorithm

The Living Algorithm algorithm inherently incorporates the recency feature. The impact of each data byte (arrival time) is greatest when it first enters the System (consciousness, in this case). After initial entry, the influence of the data byte begins to fade or decay. This is due to the scaling down (step 2 in the algorithm) that occurs with each repetition of the process.

Living Algorithm computes Data Stream's Range & Tendency

Humans also compute range of expected arrival time and recent tendencies

In our arrival time example, not only does our human compute an expected arrival time, but also the range and the recent trends of this expectation. These capabilities seem to be part of our innate predictive repertoire when estimating our partner’s arrival time. For instance, our expectation is not limited to a single number, but instead encompasses an expected range of possibilities and recent tendencies (plus or minus a half hour and a little later than normal). Earlier it was claimed that these features are essential predictive tools in setting the thresholds that determine our behavior – fight, flight, sex, creativity, or hunger. How does the Living Algorithm algorithm deal with this feature?

The Cell's Algorithm applied to the expected range of Arrival Times

The Living Algorithm’s algorithm determines these values with the exact same method that was used to determined the expected arrival time. Let's start with a concrete example and then abstract it. Your partner tends to arrive home at 6PM plus or minus 15 minutes. This evening she shows up at 7PM, a full hour later. Because the threshold of normal expectations was exceeded, your worry switch was beginning to turn on. Although it was due to an accident on the freeway, your expectations adjust to the new input. Not only do you bump your expected arrival time up, you also bump your expected range of arrival times up. In both cases, this adjustment is proportional to the difference. Perhaps you now expect your partner home at about 6:05 plus or minus 20 minutes – taking into account a possible delay.

The Verbal Algorithm applied to Recent Tendencies

Up to this point your partner's arrival time had been stable. Your expectations of recent tendencies weren't leaning either way. Because she arrived a full hour later than usual, you assign a new later time to her recent tendencies. But the next evening, she arrives late again – this time at 6:45 PM. (Working late.) Because normal expectations were exceeded again, you might even be a mite irritated that your partner didn't call. Again all three expectations are bumped upward: 1) the arrival time, 2) the range of arrival times, and the recent tendencies of the arrival times. Again these adjustments are proportional to the differences. Maybe you now expect your partner to arrive home a little later 6:10 PM with an increased range of 25 minutes, and certainly the recent trend is towards later.

No database of arrival times needed: Data (words or numbers) is integrated into expectations

With each new arrival time these three expectations are adjusted accordingly. No data need be retained. The expectations are immediately adjusted and the exact data has no more value - like yesterday's weather. Although you may store extreme values, there is no need for any database to compute the expectations. No numerical baggage need be lugged around. Although we assigned numbers to these changes, we could just as easily have assigned words. For instance: 'She has been arriving home a lot later, just recently.' Or 'Her arrival times are much less stable than they used to be.'

Evolving Expectations have an Emotional Component

Because expectations determine the threshold of response they have an emotional component as well. As a personal example: Herbert, an older German waiter, always showed up 10 minutes early for his shift. One time he was 5 minutes late and everyone began worrying. Herbert's range of expected arrival times, as determined by his past performance, was so narrow that even a slight variation was alarming. In Herbert’s case 5 minutes late was ‘a lot later than normal’. In contrast, my Person always showed up a little late. Even though he was later than Herbert on this night, no one paid it any mind. Because he was in the range of his expected arrival times, no thresholds were crossed. No need to contemplate a change in behavior. With Herbert, the manager had already begun to wonder if he should call the police. As this example shows, when people behave outside of their usual expectations, others may respond emotionally, in this case with concern.

Emotional Component of Expectations make then easier to remember

An awareness of the evolving features of your partner’s arrival times leads to estimates concerning her future performance. These estimates lead to expectation. Expectations tend to be emotionally charged as they determine the thresholds of response. When expectations are met, such as the partner arrives home on time, no thresholds are crossed and no action needs to be taken. When expectations aren't met, such as the partner arrives home much later than usual, the threshold of expectation is crossed, and decisions need to be made about what should be done. Because the three expectations (expected arrival time, range of arrival times, and recent trends) have emotional content, they are much easier to remember. Scientific studies are conclusive. Information that is emotionally tagged is much easier to remember than raw facts.

Living Algorithm digests Single Data Stream to create 3 Expectations

Computationally this is a very economical system in terms of memory, computation and relevance. The Living Algorithm digests a single data stream to create 3 very different expectations. Mathematical residue from the primary computation becomes the data in the secondary computations. It is not necessary to retain the data that goes into making these computations. Only the current adjusted expectations regarding arrival times have any meaning or relevance. One algorithm digests a single raw data stream to produce three emotionally charged expectations. Due to this emotional component these values are easy to remember.

3 Composite Data Streams of Differences

Mathematically, the Living Algorithm creates 3 evolving, composite data streams from the ongoing raw data of arrival times: 1) probable location, 2) probable range of variation, and 3) recent trends. Each of the data streams is characterized by a single value (not a database) that describes a unique feature of the most recent moment. The primary composite data stream determines the most probable arrival time. It is based upon the difference between expectation and the most recent arrival time. The Living Algorithm employs this original difference (residue from the initial computation) as the data for the other streams. In the case of the trends of the data stream, the original difference is digested as it is (positive or negative - a vector), In contrast, to determine the expected range, the initial difference is digested as a positive number (a scalar).

Living Algorithm encompasses Words & Numbers

Simple Living Algorithm algorithm fulfills Complex Requirements

It is evident that the simple Living Algorithm algorithm fulfills the complex requirements of our arrival time scenario. It generates 3 powerful predictive tools in a simple fashion without requiring too much memory. The recipe also incorporates the recency effect and decay into its averages (measures). Further it is easy to see that this algorithm could be the one we all use when predicting arrival times. The Living Algorithm’s computational requirements are natural and its memory requirements are simple and emotionally charged.

Living Algorithm algorithm handles both verbal & numerical data

From this example and line of reasoning it is evident that the Living Algorithm deals with imprecise verbal data as easily as it deals with precise numbers. As a mathematical algorithm, the results are precise, exact, right or wrong – just as in any other mathematical or computer-based algorithm. As an experiential algorithm, the results, although inexact and vague, are crucial in our ability to make regular and useful predictions about the behavior of our environment. This analysis supports the claim of our title – the Living Algorithm encompasses both words and numbers. Another amazing feature of our marvelous Living Algorithm.

Links

The Living Algorithm's mathematical system incorporates immediacy, relationship and fungible ambiguity. Further the Living Algorithm's algorithm can digest both numbers and relative terms. Can the Living Algorithm incorporate choice into her system? For answers to this question check out the next article in the series The Mathematics of Informed Choice.

To see what Life thinks about this article and what her concerns are, return to our metaphorical world and read Comfortable with Living Algorithm, Life wonders about Choice.

Article List    Previous    Next    Comments