Shades Of Reality

 

Chapter Three

Fuzzy Logic

 

 

The patterns in thinking of Western civilization have their roots in ancient Greece. More than two thousand years ago Aristotle formulated the laws of logic that, even today, profoundly affect the ways in which we view and discuss reality.

According to Aristotle's way of thinking, logic was a binary operation: something was either A, or else it was not-A. Grass was either green, or else it was not green. It certainly couldn't be both green and not-green simultaneously. It had to be one or the other. Therefore, any statement (such as, "grass is green") could be assigned a numerical truth value: If the statement was true, it's truth value was 1 (or 100 percent); if the statement was false, it's truth value was 0 (or 0 percent).

As we have already seen, reality has a smoothness to it. For example, "day" continuously turns into "not-day" without crossing any well-defined boundary line. Reality, therefore, does not always seem to conform very well to Aristotelian black and white logic, a fact that (ironically) was largely ignored by science, the very discipline that supposedly studies reality! Scientists and mathematicians still continued to view the world as a black and white place that had well-defined yes or no answers to all questions. Every molecule in the universe was either a part of your body, or else it wasn't. Every mathematical statement was either a true statement, or else it was a false statement. Everything was either all, or else it was nothing.

 

Sets

In the late 19th century Georg Cantor, a German mathematician, developed a branch of mathmatics known as set theory. Cantor defined sets as collections of definite, distinguishable objects of our intuition or intellect. For example, the set of single-digit perfect squares would be: 0, 1, 4, and 9.

For the purposes of visualization, sets are sometimes depicted as circles (Venn diagrams), which divide the "universe" into two parts. The part inside a particular circle represents those objects that belong to that particular set, and the part outside the circle represents those objects that do not belong to the set. (Those objects which belong to the set are usually called elements of the set, and the region outside the set is referred to as the complement of the set.) For example, the point a in Figure 3.1 is a member of the set S (the horizontally shaded region), while the point b is not a member of S. Instead, point b is a member of the set Not S (the vertically shaded region), which is the complement of the set S.

 

(Figure 3.1)

For any particular set (such as S), every object in the universe (or "uiversal set" defined in Figure 3.1 as the complete rectangle) is either a member of that set, or else it is not a member (i.e., it is either a member of the set S, or else it is a member of the set Not S). There can be no objects that are only partly in the set and partly out. Membership in a set is all, or nothing.

When the universal set consists of an enumerable collection of items, it is also customary to represent a particular set as a sequence of ones and zeros which specifically indicate those items of the universal set that are contained in the set and those that are not. To create such a sequence of ones and zeros, simply write down all of the individual items of the universal set in some prescribed order. Then underneath each item write down a one (if that item is a part of the set) or a zero (if that item is not a part of the set). For example if our universal set consists of the single-digit integers, then to represent our previous set of perfect squares (0, 1, 4, and 9) we would proceed as follows:

0 1 2 3 4 5 6 7 8 9
1 1 0 0 1 0 0 0 0 1

Therefore the set of single-digit perfect squares would be represented by the sequence: (1, 1, 0, 0, 1, 0, 0, 0, 0, 1). Similarly, the set of single digit odd integers would be represented by the sequence: (0, 1, 0, 1, 0, 1, 0, 1, 0, 1).

As successful as Cantor's set theory became, it still had difficulties handling a certain kind of scenario known as a sorites paradox: Take a heap of sand. Remove one grain of sand from the heap. Is it still a heap? Remove another grain, and another. Eventually you'll end up with only one grain of sand left. At which point did the heap become not a heap? Or, in terms of set theory, which of the intermediate stages belong to the set called "heaps," and which ones don't? Of course the traditional way such a problem is resolved is to simply "draw the line" at some arbitrary point -- declare some minimum threshold value as the fewest number of grains of sand that you will acknowledge as being a heap. Once the size of the pile diminishes past that point, it is no longer a heap. But this "draw the line" philosophy, while presenting a pragmatic "solution" to the problem, merely sidesteps the real issue -- a fundamental inadequacy in the concept of all-or-nothing sets.

 

Vagueness

Things in the real world tend to have vague boundary lines. For example there is no precise point in time at when day becomes night, as we have already discussed in Chapter One in conjunction with the Smoothness Principle.

It is important to distinguish vagueness from uncertainty. There are many things in the universe that are uncertain, like "Is it going to rain one month from today?" or "Did life ever exist on the planet Mars?" or "What's the real story behind the JFK assination?" These kinds of questions have answers, which may be uncertain today, but given more information may ultimately be resolved. (If we simply wait one more month, we will know for certain whether or not it is going to rain.)

Vagueness, on the other hand, is an intrinsic property that doesn't go away when more information is supplied. Even if we had all the information in the universe at our disposal, and even if we could ask God for the answers, we still couldn't resolve vagueness.

The American philosopher Charles Pierce (1839-1914) was one of the first persons to formally investigate vagueness. He maintained that all that exists is continuous, and such continuums govern knowledge. For example, both size and time exist as continua. So even though an acorn will eventually become an oak tree, it is impossible to determine a point in time when the transition occurs. This kind of vagueness is not simply the result of faulty thinking on our part. The uncertainty is inherent in reality. "Vagueness," he said, "is no more to be done away with in the real world of logic than friction in mechanics."

In 1923 Bertrand Russell published a paper in which he argued that vagueness was merely a feature of human language, rather than an aspect of reality. Furthermore, he contended, vagueness was clearly a matter of degree.

In 1937 quantum philosopher Max Black published a paper titled "Vagueness: An Exercise in Logical Analysis." In his paper he stated that vagueness arises from continua, and that continua imply degrees. Furthermore, a continuum did not have to actually be continuous. Even discrete entitities, which form nearly a continuum will still result in vagueness (as we saw in our discussion of pseudocategories in the previous chapter).

The example Black gave was to imagine a row of chairs stretching toward the horizon. The front-most chair is a Chippendale, and behind it is a near-Chippendale, which is almost indistinguishable from the one in front of it. Succeeding chairs become even less and less chair-like until, at the end of the row, there is a block of raw wood. So, even in this case, the concept of "chair" does not have a distinct separation from the concept of "not-chair." However, when dealing with such a "continuum of discretes," one can stick a number on each item in the row, and that number will indicate the degree to which that item can be regarded as being a "chair."

As a more modern example of the same idea, consider the process of "morphing" an image on a computer. The user supplies digitized photographs of two entirely diffferent objects (such as a person's face and a dog's face). The computer then generates a sequence of in-between images that starts with one of the initial two images, and eventually ends with the second image. However the difference between any two consecutive images is negligible, and so it is impossible to determine a specific frame number at which the image changes from that of a person to that of a dog.

The ideas that Max Black expressed in 1937 are virtually identical to the concepts that today are known as "fuzzy logic." But because he published in a journal that almost no one had heard of, and because of the strong counteropinions that prevailed at the time, his ideas fell into obscurity, and he never again persued the matter.

 

Fuzzy Sets

In 1920 a Polish logician and philosopher by the name of Jan Lucasiewicz published a paper describing a new system of logic. Just as in Aristotle's logic, zero represented false, and one represented true. But Lucasiewicz introduced a new value, 1/2, which stood for possible (or indeterminate). A statement could therefore have any one of these three truth values. This line of thinking immediately opened the door for the next obvious step -- why use only one intermediate point? And so, ultimately, he assigned a continuum of points between true (1) and false (0), with each fractional value representing a degree of truth. (We will discuss more about truth in the next chapter.)

In 1965 Professor Lotfi Zadeh of the University of California published a paper called "Fuzzy Sets," in which he applied Lucasiewicz's multi-valued logic to the concepts of sets. As you recall, in a traditional set, membership is an all-or-nothing concept. Consequently the statement, "point a (in Figure 3.1) is a member of set S," is a statement whose truth value is equal to one. And the statement, "point b is a member of set S," is a statement whose truth value is equal to zero.

But if one allows multi-valued logic to be applied to statements about membership, then it allows for the existance of a new kind of set -- one in which statements about membership can have truth values anywhere in the range from zero to one. In other words, the set can contain members that only partly belong to the set, and at the same time, also partly don't belong to it. And the degree to which a member belongs to the set is indicated by it's membership value, a number that can range anywhere from zero (for total non-membership) to one (for total membership). While it is customary to express membership values in the range 0 to 1.0, it is also permissible to express them as percentages. In this case the values will, of course, range from 0 percent to 100 percent.

Zadeh called his new sets "fuzzy sets" to distinguish them from the "crisp" sets of Cantor. (If Max Black had received the recognization he deserved for making essentially the same observations back in 1937, such sets would have been known today as "vague sets.") It is perhaps somewhat unfortunate that Zadeh chose the name, "fuzzy," to describe his sets. The concept of a fuzzy set is already too strange for the average American to understand. And the use of such a silly sounding name just opens up the whole idea to ridicule by those who understand the concept the least. Also the term "fuzzy" erroneously conjures up an image of tiny hair-like substances (like cotton fuzz or peach fuzz) which if magnified sufficiently should ultimately resolve into well-defined "hair-like" structures. Perhaps a better name might have been something like blurred sets, or smooth sets, or continuum sets. But for better or for worse, the name fuzzy has stuck.

A fuzzy set is not a new separate kind of set; fuzzy sets include crisp sets. A crisp set is merely a fuzzy set whose elements all have membership values of only zero or one. The relationship between a fuzzy set and its complement is illustrated in Figure 3.2.

 

(Figure 3.2)

In this illustration the horizontally shaded circular region represents a fuzzy set A, and the vertically shaded region represents not A, the complement set. Any point, such as x, exists in a region that is both horizontally shaded to some degree and vertically shaded to some degree. The darker the horizontal shading, the greater the membership value in the set A. The darker the vertical shading, the greater the membership value in the complement of the set (i.e., the more the point is "in not A," or equivalently "not in A"). Furthermore, the sum total of an element's memberhip value in a fuzzy set plus its membership value in the complement of the set add up to one (or 100 percent), just as they do in the case of crisp sets.

 

Example: Tall Men

The traditional example of a fuzzy set is the set of tall men. Suppose we have five men named Al, Bill, Charlie, Dave, and Ed. Al's height is 5'7", Bill is 5'9", Charlie is 5'11", Dave is 6'1", and Ed is 6'3". Using conventional thinking we might ask the question, "which of these men are tall (or equivalently, which men are members of the set called "tall men")? The usual procedure for answering this question is to assign an arbitrary cutoff point at some height and then define "tall" as being any height greater than that value. Therefore, if we were to arbitrarily draw a mental boundary line at 5'10', we would say that Charlie, Dave, and Ed are tall men (i.e., they are members of the set called "tall men"), while Al and Bill are not.

In contrast, fuzzy (or "continuum") thinking embodies the smoothness principle -- everything (including "tallness") happens smoothly. So instead of trying to establish an unrealistic cutoff point between tall and not tall, fuzzy logic asks the question, "to what degree are each of the men tall (i.e, to what degree are they members of the "tall men" set)? For example the statement, "Ed is a tall man," might have a truth value of 0.9, while the corresponding statement about Al might have a truth value of only about 0.2. Therefore Ed would have a 90 percent membership value in the "tall men" set, while Al's membership value in the set would be only 20 percent.

The fuzzy approach to sets clearly supplies more information about membership than does the conventional crisp approach. Instead of supplying only simple "yes" or "no" answers, fuzzy sets specify numerical information indicating the degree of membership. Therefore the fuzzy approach is, ironically, the more precise approach!

 

Example: Pitching Pennies

Let's look at one more example that will show how fuzzy sets and crisp sets relate to each other as well as to our everyday use of language. Figure 3.3 shows the game of "Pitching Pennies."

 

(Figure 3.3)

The object of the game is to toss a penny so that it ends up inside the circle. If I were to ask the question, "of the eight coins shown in Figure 3.3, which ones lie completely inside the circle?", the answer would be the crisp set consisting of the coins, a, b, and c. This set could also be expressed as a binary sequence by associating each element of the universal set (a through h) with either a zero or a one:

a b c d e f g h
1 1 1 0 0 0 0 0

Therefore, the set coins that lie completely inside the circle would be represented by the sequence: (1, 1, 1, 0, 0, 0, 0, 0).

However, if I omit the word "completely," the question itself becomes vague. Should the coins, d, e, and f, be considered as lying "inside" the circle or "outside" the circle? To some degree they are both. Therefore the answer to the vague question would be the fuzzy set consisting of the coins, a, b, c, d, e, and f . The three coins, a, b, and c, would each have a membership value of 100 percent, while the remaining three coins, d, e, and f, would have membership values of approximately 75 percent, 50 percent, and 25 percent, respectively. (Even coins g and h could be considered as lying "inside" the circle -- but to a zero degree.) I could also rephrase the question slightly and ask, "to what degree is each coin inside the circle?" And once again the same corresponding percentages would answer this new question.

Just as in the case of crisp sets, a fuzzy set can also be represented by a sequence of "binary-type" numbers. But since each member of the fuzzy set can have a membership value anywhere in the range from zero to one, the sequence of numbers representing the fuzzy set will not be limited to consisting of combinations of only zeros and ones. The sequence will generally have fractional values as well. Therefore, the fuzzy set of coins lying inside the circle would be represented by the sequence:

(1, 1, 1, 3/4, 1/2, 1/4, 0, 0)

Finally, suppose I were to ask a question about one of the border-touching coins: "Is coin f inside of the circle?" We will discuss this kind of question (and its answer) in the next chapter.

 

White & Black Marbles

Let's now return to our discussion of partitioned continua that we began in the previous chapter. In the light of our ongoing discussion, it should be obvious that pseudocategories are nothing more than fuzzy sets. If one partitions a continuum into pseudocategories, then the closer an item is to the "boundary line" of that partitioning, the more it becomes a member of both sets.

For example consider the two fuzzy sets, "White marbles" and "Black marbles, which were depicted in Figure 2.3 in Chapter Two. We now realize that instead of simply asking which marbles "belong" to a given set, we must ask what each marble's membership value is in that particular set. The set of "White marbles" shown in Figure 2.3 might be represented by the sequence:

(1, 7/8, 3/4, 5/8, 1/2, 3/8, 1/4, 1/8, 0)

where marble A has a membership value of 1, marble B has a membership value of 7/8, etc.

Since in this example, the sets "White marbles" and "Black marbles" are complementary sets (i.e., "Black marbles" is "Not-White marbles"), then each marble's membership value on the "Black marbles" set must be equal to one minus its membership value in the "White marbles" set. Therefore the set of "Black marbles" would be represented by the sequence:

(0, 1/8, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8, 1)

Notice that the fifth marble in this example has a membership value of 1/2 in both sets. It is as much "white" as it is "black." And equivalently, it is as much "not white" as it is "not black." It is at this point that a "white" marble becomes indistinguishable from a "black" marble. It is here that the concept, A = Not-A, holds exactly.

 

Getting Dark

Our preceeding three examples (Tall Men, Pitching Pennies, and White & Black Marbles) were all instances of fuzzy sets whose members consisted of discrete entities (men, coins, and marbles). Because there was only a finite number of them, the membership values in these sets could be simply enumerated. But how would we indicate the membership values for fuzzy sets that contain an infinite number of members?

As an example of a fuzzy set whose members form a continuum, let's return to our discussion from Chapter One about when the sky gets dark. It should be obvious by now that the collection of clock times that represent periods of darkness constitute a fuzzy set. Each point in time is therefore a member of this "Dark" set to some degree, and also not a member to some degree. As the sun sets and the sky continues to get darker and darker, each successive point in time gradually becomes more and more of a member of the fuzzy set called "Dark."

One way to approximate this fuzzy set might be to indicate membership values for only a few selected points equally spaced in time. For example if we were to start at sunset and specify the level of darkness at 10-minute intervals, we might produce something like the following sequence for the "Dark" set:

(0.05, 0.15, 0.40, 0.65, 0.85, 0.95)

Sunset would have only about 0.05 membership value in the "Dark" set, ten minutes past sunset would have a membership value of about 0.15, etc.

If we wanted to, we could plot these values on a graph and obtain a set of dots showing a visual representation of the "Dark" set:

 

(Figure 3.4)

If we were to do the same construction using five-minute intervals instead of ten-minute intervals, we would produce an even better visual representation of the "Dark" set. (We would fill in some of the intermediate points.) And finally, if we were to use infinitesimally small intervals of time, we would end up with a smooth curve representing the "Dark" set:

 

(Figure 3.5)

Working backward from such a curve, we can simply "read off" the membership value at any point by measuring the height of the curve at that point.

We will be using many such curves to denote fuzzy sets, particularly in Part Two of this book.