Fuzzy Thinking

Larry Landau

Mathematics Summer School
June 2004

You might suppose that fuzzy thinking is sloppy thinking, and has no place in mathematics - one of the most precise intellectual disciplines. But that is not the case. Fuzzy thinking captures with mathematical precision the way we describe and interact with the world around us. Usually in mathematics we think in a `black and white' way: statements are true or false. But in the real world there are many grey areas where questions do not have a yes or no answer. We want to be able to deal with statements which are to some extent true, and also to some extent false. They have a degree of truth, rather than being absolutely true or false, right or wrong.
The Iraq crisis reminds us that the winning side can be right and wrong at the same time, and none of us should ever be afraid to admit that and deal with the consequences. Anne McElvoy[1]

Degrees of Truth

Everything is a Matter of Degree.
Thinking in terms of a degree of truth, rather than only in terms of truth and falsehood, can be quite liberating and can open new ways of debating important issues. Actually, there are several approaches to most issues, and you would do well not to choose one approach, but rather assign a degree of truth to each approach. If a statement is true, assign it a degree of truth = 1, and if it is false, assign it a degree of truth = 0. And in general, the degree of truth could be any number between 0 and 1. Consider person A and person B, who take opposing views on a political issue. Person A says Statement 1 is correct, and person B says Statement 2 is correct. How would they resolve their differences? It's very difficult. But suppose person A assigns a degree of truth of .75 to Statement 1 and .25 to Statement 2, while person B assigns a degree of truth of .6 to Statement 2 and .4 to Statement 1. Instead of being at opposite poles, they now agree to some extent and can discuss the issues and perhaps reduce their differences. Assigning a degree of truth is much less confrontational than declaring a statement true or false. Try it the next time you're having an argument with one of your friends (or enemies!). Each of you should assign a degree of truth to your respective positions, and you may find that you're not as far apart as you thought.

There are no Absolutes

Or almost no absolutes! Absolute space and time were banished by Einstein's relativity, and absolute immutable species were banished by Darwin's evolution. In science we have moved away from absolutes, and fuzzy thinking is part of that movement. Concepts have fuzzy edges. It's the `straw that broke the camel's back' effect. When is a hill not a hill but a mound? When is a bush not a bush but a tree? It may be a tree to some extent and a bush to some extent.

Where is the dividing line between `tall' and `not tall'. Take a millimeter from the height of a tall person and he should still be tall. But continue taking one millimeter, then another, and eventually the person will be short! (Unless you've removed his head, in which case he'll be dead.) When did that change from tall to short occur? It didn't! The concept `tall' does not have a precise boundary.

Qualitative versus Quantitative

This problem with the concept `tall' is associated with the relation between qualitative and quantitative descriptions: discrete versus continuous. Both are essential to our thought processes. A quantitative description can vary smoothly, but a qualitative one must vary discontinuously. `Tall' is a qualitative description. Someone is either tall or he is not tall. But height is quantitative and can vary by very small amounts. As the height varies smoothly from a large value to a small value, the qualitative description `tall' must jump from being valid to being not valid.

Can We Use Scientific Precision to Remove the Fuzziness?

Where should that jump occur? You might try to define the boundary of the concept `tall' by accurately measuring height (say to the nearest hundredth of an inch) and then defining `tall' by means of the measured height. For example, we might say a person is tall if his height is greater than 5 feet 10.50 inches. Then a person who is 5 feet 10.51 inches is tall, but a person 5 feet 10.50 inches is not tall. Is this satisfactory? Not really, no. To say one person is tall and another is not tall when they differ in height by a hundredth of an inch seems silly and does not correspond to the way we use the term `tall'. Furthermore, the chosen dividing line between tall and not tall (here 5 feet 10.50 inches) is arbitrary, without any particular significance. So we cannot resolve the mismatch between the qualitative and the quantitative by arbitrarily fixing the boundaries of the qualitative description.

Can We Eliminate Fuzzy Concepts Altogether?

Why not simply eliminate the concept `tall' and just use the accurately measured height? In other words, why not eliminate qualitative concepts and use only quantitative ones? Because qualitative concepts are essential to the way we interact with our environment.

We don't use a scientifically defined color scale to describe a sunset.

If you measure the temperature to the nearest hundredth of a degree, the wind speed to the nearest millimeter per second, and the humidity to the nearest hundredth of a percent, you still may not be able to work out if you would feel `hot'. `Hot' is a qualitative description which is very useful in describing your environment.

The classification of living things into species is qualitative. But the DNA of a lion can vary by small amounts until it is the DNA of a tiger. Along the way it can be the DNA of a liger or a tigon. Species have fuzzy boundaries.

You would find it difficult to function without qualitative concepts. Your intelligent interaction with your environment is based in large part on them. They should not be eliminated. Instead their fuzzy nature should be recognized and studied. If someday an intelligent robot is constructed, its artificial intelligence very likely would be based on fuzzy concepts. In fact, nowadays many devices are designed using fuzzy engineering techniques [2,Chapter 10]. Fuzziness is here to stay!

Crisp Sets

To see how fuzzy thinking can be incorporated into mathematics, let's start with crisp concepts, which are the opposite of `fuzzy'. A crisp concept has no fuzzy edges. Suppose a property P is crisp. Let X denote the universe of objects we are going to consider. An object either does have property P or it doesn't, yes or no, true or false. We can then consider the set of objects that have property P. This will be a precisely defined subset A of X. So an object x in X will be in the subset A if x has the property P, and x will not be in A if it doesn't have the property P. Subsets such as A are the kind of sets we normally use in mathematics. The property P is associated with, and described by, the subset A.

Suppose none of the objects in X possess the property P. Then the set of objects possessing property P doesn't contain any objects, and so it's empty. The set which contains no objects is called the empty set, and is denoted f.

Fuzzy Sets

But what happens if the property P has fuzzy edges, so we can't be sure that an object x does have the property P or doesn't? How would we describe such a fuzzy property in mathematics? Can we make the subset A fuzzy, can we give it fuzzy edges? Can you think of a way of doing that? If we think of the subset A in terms of the objects which make it up, it's hard to see how to generalize the notion of set so that fuzzy properties can be incorporated. But there is a very useful way in mathematics to generalize a notion which has already been defined, and that is to reformulate the notion in another, but equivalent, way. The new formulation may then be easy to generalize, whereas the original formulation did not provide any obvious avenues for generalization. Before we try to reformulate the notion of a set, let's first consider a little bit of the usual mathematics of sets.

The Mathematics of Crisp Sets

There are various operations we can perform on sets.

  1. If A is a subset of the set X (the universe of objects we are considering), then the complement of A, denoted Ac, is the set of objects which are not in A. Thus if A is the set of objects possessing the property P, then Ac is the set of objects not possessing the property P.
  2. If A and B are two subsets of X, we define the intersection of A and B, denoted AÇB, as the set of objects which are in both A and B. Thus if A is the set of objects possessing the property P, and B is the set of objects possessing the property Q, then AÇB is the set of objects possessing both properties P and Q.
  3. The union of A and B, denoted AÈB, is the set of objects which are in at least one of the sets A and B. Thus if A is the set of objects possessing property P, and B the set of objects possessing property Q, then AÈB is the set of objects possessing the property P or the property Q (or both).
Here is a theorem from the mathematics of sets:
 
Theorem 1. AÈAc=X and AÇAc=f.

To prove this theorem, we note that the set AÈAc consists of those objects x such that x is in A or x is in Ac, that is, x is in A or x is not in A. But every object x is either in A or not in A. So AÈAc contains every object, that is, AÈAc is X. On the other hand, the set AÇAc consists of those objects x which are in A and in Ac, that is, x is in A and x is not in A. But there are no such objects. Thus AÇAc is f, the empty set.

Here is another theorem from the mathematics of sets:
 
Theorem 2. (AÇB)c=AcÈBc

To prove this theorem, we must show that the set (AÇB)c on the left of the equality is the same as the set AcÈBc on the right. To do that, we show that these sets contain precisely the same objects. That is, we show that if an object x is in (AÇB)c then it is also in AcÈBc, and conversely, if x is in AcÈBc then it is also in (AÇB)c. Let's start with an object x in (AÇB)c. Then x is not in AÇB, that is, it is not in both A and B. So it is either not in A or not in B. Thus x is either in Ac or in Bc. Hence x is in AcÈBc. So we've shown that if x is in (AÇB)c then x is in AcÈBc.

Now we'll show that if an object x is in AcÈBc then it is in (AÇB)c. If x is in AcÈBc then it is in Ac or it is in Bc. So x is not in A or not in B. That is, x is not in AÇB. Hence x is in (AÇB)c.

In the same way, we can prove other theorems about sets:
(AÈB)c
=
AcÇBc
(1)
AÇ(BÈC)
=
(AÇB)È(AÇC)
(2)
AÈ(BÇC)
=
(AÈB)Ç(AÈC)
(3)
Try proving one of these theorems by the same method we used to prove Theorem 2.

Membership Functions

The membership function mA of the set A assigns the value 1 to an object x if x is in A, and the value 0 if x is not in A. Thus mA(x)=1 if x is in A, and mA(x)=0 if x is not in A. The membership function mA of any subset A of X is a function defined on X and taking only the two values 0 and 1. It therefore satisfies the important equation
mA2=mA
(4)

What is the membership function of the complement Ac of the set A? You can easily work out that
mAc=1-mA
(5)
That is, mAc(x)=1-mA(x) for each object x in X.

It's also easy to see that mf(x)=0 for all x in X, and mX(x)=1 for all x in X. Let's define the function O, which is 0 for all x in X:
O(x)=0 for all x in X
Let's also define the function I, which is 1 for all x in X:
I(x)=1 for all x in X
Then we can write
mf=O and mX=I
(6)

We need to work out the membership functions for AÇB and AÈB. Let's consider AÇB first. The membership function mAÇB(x)=1 if x is in both A and B, and is 0 otherwise. It's easy to check that the following formula works:
mAÇB=mAmB
(7)
Thus,
mAÇB(x)=mA(x)mB(x) for all x in X
We would get the same membership function if we defined it this way instead:
mAÇB= min
[mA,mB]
(8)
That is, mAÇB(x) is the minimum of mA(x) and mB(x).

The membership function for AÈB is a little tricky. The formula is
mAÈB=mA+mB-mAmB
(9)
(We need to subtract mAmB, since if the object x is in both A and B, then mA(x)+mB(x)=2, which we don't want.) The membership function mAÈB could also be defined this way:
mAÈB= max
[mA,mB]
(10)
That is, mAÈB(x) is the maximum of mA(x) and mB(x).

Reformulating Set Theory

Now let's reformulate set theory in terms of membership functions. Instead of working geometrically with parts (subsets) of a set X, we work algebraically with functions defined on X. So, instead of associating with a property P the collection A of objects which possess the property P, we associate the function mA which assigns the value mA(x)=1 to an object x which possesses the property P, and the value mA(x)=0 to an object which does not possess the property P. The function mA answers the yes-no question, `Does the object x possess the property P?' The two ways of working are really equivalent, since the same theorems can be proved either way.

In order to complete the reformulation, we should translate the operations which we apply to sets into operations on the corresponding membership functions. For example, the complement operation takes the subset A to its complement Ac. This corresponds to an operation which takes the membership function mA to the membership function mAc, which is 1-mA. So, as an operation which takes membership functions to membership functions, the complement operation is
mA c=1-mA
(11)
Similarly, the intersection operation which takes the subsets A and B to the intersection AÇB, corresponds to the operation which takes the membership functions mA and mB to the membership function mAÇB, which is mAmB or, what is the same thing, min[mA,mB]. So, as an operation applied to membership functions, the intersection operation is
mAÇmB
=
mAmB
(12)
=
min
[mA,mB]
(13)
Finally, the union operation which takes the subsets A and B to the subset AÈB, corresponds to the operation which takes the membership functions mA and mB to the membership function mAÈB. So, as an operation applied to membership functions, the union operation is
mAÈmB
=
mA+mB-mAmB
(14)
=
max
[mA,mB]
(15)

So now let's forget about subsets of X and think only about functions defined on X which take the two values 0 and 1, that is, which satisfy the equation
m2=m
(16)

If m, m1, and m2 are such functions, then we have the following definitions:
 
Definition (Function Operations).
mc
=
I-m
(17)
m1Çm2
=
m1m2
(18)
=
min
[m1,m2]
(19)
m1Èm2
=
m1+m2-m1m2
(20)
=
max
[m1,m2]
(21)

Reformulating the Theorems

We can translate all the theorems about sets into theorems about membership functions, that is, functions satisfying (16). For example, Theorem 1 expressed using functions is
 
Theorem 1. mÈmc=I and mÇmc=O.
 
We can prove the theorem in this form by manipulating functions algebraically, using equations (16), (17), (18), and (20):
mÈmc
=
m+mc-mmc=m+(I-m)-m(I-m)
=
I-m+m2=I-m+m=I
Similarly,
mÇmc=mmc=m(I-m)=m-m2=m-m=O

Using functions, Theorem 2 is expressed as:
 
Theorem 2. (m1Çm2)c=m1cÈm2c
 
We can prove this by manipulating functions as follows:
m1cÈm2c
=
m1c+m2c-m1cm2c=(I-m1)+(I-m2)-(I-m1)(I-m2)
=
I-m1m2=I-m1Çm2=(m1Çm2)c
Try proving one of the equations (1), (2), or (3) by manipulating functions algebraically, in the same way as we have done here.

We see that the usual set theory can be formulated geometrically in terms of collections of objects, or algebraically in terms of functions. Each theorem in the old formulation corresponds to a theorem in the new formulation. We might find that some theorems are easier to prove in the new formulation than in the old one, and we might even find a theorem in the new formulation which we didn't notice in the old formulation. So there may be advantages to formulating a mathematical theory in a new way. Furthermore, there may be a straightforward way to generalize the new formulation, which we couldn't see using the old formulation, as we'll show next.

Fuzzy Membership Functions

The property P is associated with a subset A and also with a membership function mA, so that mA(x)=1 if the object x possesses the property P, and mA(x)=0 if x does not possess the property P. This is the situation for a crisp property P, which either is or is not possessed by an object. What about a fuzzy property? If the property P is fuzzy, then there is no longer a clear dividing line between those objects which possess the property P and those which do not. We must consider the degree to which an object possesses the property P, which can be any number between 0 and 1; 0 if it definitely does not possess the property P, and 1 if it definitely does. Our membership function can easily be generalized to take into account this new situation. Instead of restricting the membership function to the values 0 and 1, we can allow it to take any value between 0 and 1:
0 £ m(x) £ 1
(22)
In this new situation, equation (16) is replaced by the formula
m2 £ m
(23)

The new situation includes the old situation as a special case. Among our generalized membership functions which now include fuzzy membership functions taking values greater than 0 and less than 1, we still have our crisp membership functions which only take the two values 0 and 1.

New Definitions

The generalized membership function m takes values between 0 and 1. How should we define mc? Just as the value m(x) indicates the degree to which the object x possesses the property P, the value mc(x) should indicate the degree to which the object x does not possess the property P. The greater m(x), the smaller mc(x) should be. But what formula should we use to express mc(x) in terms of m(x)? We should certainly require that whatever formula we use, it should agree with the old formula when the membership function takes the value 0 or 1. So if m(x)=1 then mc(x) should be 0, and if m(x)=0, then mc(x) should be 1. But other than that, we have a choice as to how we define mc(x). This choice might be determined by the context in which fuzzy concepts are being used. One reasonable choice, and this is the choice we'll make, is the same formula (17) that we used for crisp membership functions:
mc=I-m
(24)
So if the degree to which x has the fuzzy property P is 2/3, i.e. m(x)=2/3, then mc(x)=1-2/3=1/3. That is, the degree to which x does not have the fuzzy property P is 1/3.

Now what about intersections and unions? If the property P has the membership function m1, and the property Q has membership function m2, what is the membership function for both properties P and Q? That is, what is the value of m1Çm2? Again we have a choice, depending on the sort of application of fuzzy concepts which we intend to make. We could use the old formulas (18) or (19), but notice that for fuzzy properties these two formulas are not the same! They are the same for crisp membership functions, but not for fuzzy ones. We'll choose (19):
m1Çm2= min
[m1,m2]
(25)
Similarly, we'll choose formula (21) for m1Èm2:
m1Èm2= max
[m1,m2]
(26)
With the definitions (24), (25), and (26), do Theorems 1 and 2 hold for fuzzy properties? Let's see.

Theorems for Fuzzy Properties

Theorem 1, which we have proved for crisp membership functions, is mÈmc=I and mÇmc=O. Can we prove these formulas for fuzzy membership functions? No! The function mÈmc=max[m,mc]=max[m,I-m], and this is NOT equal to 1 for all x, and so is not equal to I. For example, if m(x)=2/3, then mÈmc(x)=max[2/3,1/3]=2/3.

Similarly, mÇmc=min[m,mc]=min[m,I-m] and this is not equal to 0 for all x, and so is not equal to O. In the previous example, where m(x)=2/3, we have mÇmc(x)=1/3. So the degree to which the object x both possesses the property P and doesn't possess the property P is not 0, but rather 1/3.

Here is how Bart Kosko puts it [2,page 6]:

Aristotle's binary logic came down to one law: A or not-A. Either this or not this. The sky is blue or not blue. It can't be both blue and not blue. It can't be A and not-A. Aristotle's ``law'' defined what was philosophically correct for over two thousand years.

The binary faith has always faced doubt. It has always led to its own critical response, a sort of logical and philosophical underground. The Buddha lived in India five centuries before Jesus and almost two centuries before Aristotle. The first step in his belief system was to break through the black-and-white world of words, pierce the bivalent veil and see the world as it is, see it filled with ``contradictions,'' with things and not-things, with roses that are both red and not red, with A and not-A.

You find this fuzzy or gray theme in Eastern belief systems old and new, from Lao-tze's Taoism to the modern Zen in Japan. Either-or versus contradiction. A or not-A versus A and not-A. Aristotle versus the Buddha.

What about Theorem 2? Is (m1Çm2)c=m1cÈm2c? Let's check.
(m1Çm2)c=I-m1Çm2=I- min
[m1,m2]
and
m1cÈm2c= max
[m1c,m2c]= max
[I-m1,I-m2]=I- min
[m1,m2]
So yes, (m1Çm2)c=m1cÈm2c, and Theorem 2 holds for fuzzy properties. Why don't you check if the theorems (1), (2), and (3) hold for fuzzy properties?

Fuzzy Logic

We've talked about fuzzy properties and associated fuzzy membership functions, but if we want to mathematically analyze fuzzy thinking, we need to introduce fuzzy logic, since logic is the precise analysis of deductive reasoning. Our usual logic deals with true-false statements, using black-and-white concepts with no gray areas. But using fuzzy concepts, statements will not necessarily be true or false, but may have a degree of truth assigned to them, as we discussed at the beginning of this talk. A true statement will have a degree of truth equal to 1, a false statement will have a degree of truth equal to 0, and other statements might have any degree of truth between 0 and 1.

True or False

If S and T denote two statements, then In our usual crisp logic, statements will be assigned a truth value which is either TRUE or FALSE. Then the Rules of Truth are These rules of truth correspond to our usage of the connectives not, and, or. The last rule for implies might seem strange. If T is FALSE, the only way S® T can be TRUE is if S is FALSE. This actually does correspond to the way we use if-then statements. For example, in Noel Coward's film Brief Encounter, a customer at the station cafeteria says to the waitress:
If them sandwiches woz made this morning, you're Shirley Temple.
Of course the waitress is NOT Shirley Temple, and the only way this statement can be true is if the sandwiches were not made this morning. So the statement is a way of saying `Those sandwiches were not made this morning.' (They're not fresh.)

Fuzzy Rules of Truth

Let S denote the statement `Mr. Mbekwi is tall.' If Mr. Mbekwi is a Zulu then the statement S is TRUE (degree of truth = 1), and if he's a Pygmy then S is FALSE (degree of truth = 0). But if Mr. Mbekwi is just a typical resident of Cape Town, we might assign of degree of truth to S which is somewhere between 0 and 1.

We need to give Fuzzy Rules of Truth to work out the degree of truth of each of the statements ØS, SÙT, SÚT, and S® T in terms of the degrees of truth of the statements S and T. There are various choices which could be made, but whatever choice we make, it should agree with the usual Rules of Truth in the special case where the statements are TRUE or FALSE. Here is a possible choice, where d(S) denotes the degree of truth of the statement S:
d(ØS)
=
1-d(S)
d(SÙT)
=
min
[d(S),d(T)]
d(SÚT)
=
max
[d(S),d(T)]
d(S® T)
=
ì
í
î
1
if d(S) £ d(T)
d(T)
otherwise

Deductions

In logic, we specify Axioms and Rules of Deduction, which allow us to deduce a conclusion S from the premises S1,S2,¼,Sn. Such a deduction is a sequence of statements T1,T2,¼,TN-1,TN, where TN is S, and where each statement Tj is either a premise, or an axiom, or follows from previous statements by a rule of deduction. The deduction doesn't have to use all the premises. So S might be deducible from fewer premises, and it can also be deduced from more premises (the extra premises not being used).

If a statement S can be deduced from no premises, then S is called a theorem. By the way, axioms are theorems, since if S is an axiom, then a deduction of S from no premises consists simply of a single statement T1, which is S itself. (This is allowed since S is an axiom.)

Define the degree of truth of a collection of statements S1,S2,¼,Sn by
d(S1,S2,¼,Sn)= min
[d(S1),d(S2),¼,d(Sn)]
We would like our fuzzy logic to obey the following principle:
 
Deductive Principle. A conclusion should have a degree of truth at least as great as the degree of truth of the premises.
 
That is, if S can be deduced from the premises S1,S2,¼,Sn, then
d(S1,S2,¼,Sn) £ d(S)
 
Let's now show that all theorems are TRUE, and in particular, all axioms are TRUE. So suppose the statement S is a theorem. Then it can be deduced from no premises. But we can always add a premise S1 (and not use it). Choose S1 to be TRUE, i.e. d(S1)=1. Then, by the Deductive Principle, since S can be deduced from S1, we have 1=d(S1) £ d(S), and hence d(S)=1. We have thus shown that all theorems are TRUE. Since axioms are theorems, it follows that all axioms are TRUE.

Furthermore, rules of deduction must not decrease the degree of truth. Consider the rule
 
Modus Ponens. From the statements S and S® T, deduce T.
 
To show that Modus Ponens satisfies the Deductive Principle, we need to show that d(S,S® T) £ d(T). We can show this by considering two cases.

  1. If d(S) £ d(T), then d(S® T)=1 and d(S,S® T)=d(S). Hence d(S,S® T) £ d(T).
  2. If d(S) > d(T), then d(S® T)=d(T) and d(S,S® T)=d(T). Hence again d(S,S® T) £ d(T).

Fuzzy Engineering

Fuzzy Thinking is not just a philosophical approach to concepts, leading to abstract ideas of fuzzy sets (fuzzy properties, fuzzy membership functions) and fuzzy logic (degrees of truth). It also has important practical applications in the design of devices that function well in their interactions with the environment and with us. There are various ways that fuzzy design can be carried out. Here is one way to do it, giving the steps in the fuzzy design of an air conditioner:
Step 1.
Write down the fuzzy rules governing the way the air conditioner works:

  1. If it is COLD, the air conditioner motor speed is OFF.
  2. If it is COOL, the air conditioner motor speed is SLOW.
  3. If it is WARM, the air conditioner motor speed is FAST.
  4. If it is HOT, the air conditioner motor speed is MAXIMUM.
Step 2.
Define the fuzzy properties COLD, COOL, WARM, and HOT. This is done by drawing the fuzzy membership function for each of the fuzzy properties: mCOLD(x), mCOOL(x), mWARM(x), and mHOT(x). For each temperature x, the sum of all the membership functions should be 1:
mCOLD(x)+mCOOL(x)+mWARM(x)+mHOT(x)=1
Step 3.
Decide on particular motor speeds to represent OFF, SLOW, FAST, MAXIMUM, where 0=sOFF < sSLOW < sFAST < sMAX=M, and M is the maximum speed of the motor.
Step 4.
For any temperature x, the speed of the motor is given by the formula
s=sOFF×mCOLD(x)+sSLOW×mCOOL(x)+sFAST×mWARM(x)+sMAX×mHOT(x)
Hence
s=sSLOW×mCOOL(x)+sFAST×mWARM(x)+M×mHOT(x)
A computer chip would then be designed which controls the motor speed according to this formula. A thermometer would input the temperature and the chip would output the motor speed.

References

[1]
Evening Standard (London, 17 December 2003)
[2]
Bart Kosko, Fuzzy Thinking (Flamingo, 1994)
[3]
Petr Hájek, Metamathematics of Fuzzy Logic (Kluwer, 1998)



File translated from TEX by TTH, version 3.05.
On 25 Jun 2004, 00:34.