Monday, May 26, 2008

Fuzzy Mathematics: Fuzzy Logic, Fuzzy Sets, Fuzzy Numbers.

In this Chapter we will take a good long look at fuzzy logic, and a brief look at fuzzy sets and fuzzy numbers. (Later chapters will look more deeply into fuzzy sets and fuzzy numbers.)

1.1 Fuzzy Logic.

In conventional logic, a statement is either true or false, with nothing in between. This principle of true or false was formulated by Aristotle some 2000 years ago as the Law of the Excluded Middle, and has dominated Western logic ever since.

Fuzzy logic offers a better way of representing reality. In fuzzy logic, a statement is true to various degrees, ranging from completely true through half-truth to completely false.

The basic idea of multi-valued logic has been explored to some extent by a number of mathematicians in this century, but the real breakthrough was made by Prof. Lotfi Zadeh of the University of California in Berkeley. In 1965 he published a paper on the theory of fuzzy sets; that paper has given rise to hundreds of papers on fuzzy mathematics and fuzzy systems theory. Most importantly, fuzzy theory was adopted wholeheartedly by the Japanese, and their advances in the field of fuzzy control have won the attention of engineers throughout the world. Fuzzy theory gives us a whole new approach to the mathematics of thinking; it is a change of paradigm for Western world scientists and mathematicians, and like all changes of paradigm has been initially strenuously resisted, except in the Far East, where two-valued Aristotelian logic has not been too deeply ingrained.

The computer tool which your knowledge engineer will be using for expert system development is FLOPS (Fuzzy LOgic Production System), developed originally in the early 1980's at the Kemp-Carraway Heart Institute by Douglas Tucker and William Siler for medical image analysis.

FLOPS is based on fuzzy systems theory: fuzzy logic; fuzzy sets; and fuzzy numbers. The use of fuzzy mathematics gives FLOPS some important advantages. It is possible to reason in terms of words, such as small, medium, fast, slow and so on, rather than in terms of numbers; ambiguities and contradictions can be easily handled; and uncertainties pose no problems.

In this chapter we will consider fuzzy logic, with a continuous gradation of truth values ranging from false to true. We define the truth of a statement or value as being the confidence we have that the statement or value is correct. Truth is measured numerically; in most fuzzy systems literature, as ranging from zero (false) to one (true). FLOPS uses a different scale; confidences in FLOPS range from 0 (false) to 1000 (true), since this scale economizes computer memory requirements. This difference in scale is sufficiently obvious.


 

I have defined what truth is for a single statement. But now consider the truth of the combination of two statements, A AND B. A and B are both assertions; for example, Ashok is a man, or I don't have much free time this week. In conventional logic, of course both A and B must be either true or false. The statement (A AND B) is true only if both A and B are individually true; otherwise, the statement (A AND B) is false. Now, how do we define the fuzzy truth value of the statement (A AND B) if the fuzzy truth values of A and B separately are known? Fuzzy logic gives a remarkably simple answer to this problem: the truth of (A AND B) together is the minimum of the truth value of A and the truth value of B.

Similarly, consider the statement (A OR B), which in conventional logic is true if statement A or statement B or both are true, and is only false if both A and B are false. In fuzzy logic, the truth of (A OR B) is simply the maximum of the truth value of A and the truth value of B.

It is hard to see the practical importance of these simple rules of logic by themselves. However, most Western reasoning has its foundation in logic; these simple but new rules of logic have great impact on patterns of reasoning. And it is with patterns of reasoning that we are most concerned in constructing expert systems; it is patterns of real-life productive human reasoning that we are trying to emulate. Fuzzy logic gives us the theoretical tools to do this.

Fuzzy Sets

In mathematics, the concept of set is very simple, but very important. A set is simply a collection of things. The things can be most anything you want - numbers, names of autos, you name it. Things either belong to the set or don't belong, similar to the idea in logic that statements are either true or false. In 1965, Lotfi Zadeh proposed the idea of a fuzzy set; a fuzzy set is one to which objects can belong to different degrees, called grades of membership. in FLOPS, we measure the confidence that the member belongs to the fuzzy set as a number ranging from zero (absolutely false) to 1000 (absolutely true). One of my favorite fuzzy sets comes from the TV show MASH:


 

Character 

Fuzzy Sets: 

 

Men 

Athletes 

Hawkeye 

1000 

500 

BeeGee 

1000 

750 

Lt.Col. Penobscot 

1000 

1000 

Hot Lips Hooli han 

0 

950 

Klinger 

900 

250 


 


 

This simple idea of different grades of membership in a fuzzy set is extremely helpful in constructing expert systems. We will be concerned with fuzzy sets of descriptive words, where the grade of membership represents our confidence that the descriptor is true of whatever we are considering. Usually, we will use the term confidence rather than grade of membership. This permits us to use ordinary language in describing things in a precise way.

As an example, consider a fuzzy set speed, with members Slow, Medium and Fast.


    
    


 

Of course, we have to define in some way how to go back and forth between the description of speed in numbers and the description of speed in words. This is done through defining membership functions, which look something like this:


Of course, different experts would have different feelings about what speeds should be classified as Fast, Medium or Slow. Leaving a good deal of overlap on the adjacent membership functions is a very good idea; it lends robustness to the reasoning system. Membership functions need not be made up of straight lines; curvilinear shapes are available.

Other useful fuzzy sets are not descriptions of numbers, but of (in a broad sense) categories. These fuzzy sets are not word descriptors of "how much", but are answers to "what is it?" For example, fuzzy set color might have members Red, Green and Blue. Fuzzy set car might have members Ford, Chevrolet, Toyota and Buick.

In fuzzy sets like speed and color it is very likely that two or more descriptors might have non-zero confidences at the same time; that is fine, since we are seldom certain that one descriptor is entirely right and the others are entirely wrong. These are ambiguities, and as mentioned above they lend strength to the reasoning process. But in other fuzzy sets like car, it is not possible for a car to be both a Buick and a Chevrolet. In this case, if more than one member has a non-zero confidence, we have a contradiction. Contradictions need to be resolved before leaving our program, often by examining more data.

1.3 Fuzzy Numbers.

The final major member of our fuzzy systems arsenal is the fuzzy number. A fuzzy number is simply an ordinary number whose precise value is somewhat uncertain. Here, for example, is a fuzzy two.


Here our confidence that numbers 1.5 or less belong to the fuzzy 2 is zero, as is our confidence that numbers 2.5 or greater belong to the fuzzy 2. Our confidence that 1.6 belongs to the fuzzy 2 is 200; for 1.7, 400; and so on to confidence 1000 for 2. For numbers greater than 2, the confidence declines as the number increases, being 800 for 2.1, 600 for 2.2, and so on to zero confidence for 2.5.

A very convenient way to describe fuzzy numbers is to use modifying words. For example, the fuzzy two shown in Figure 1 could be completely specified by "roughly 2". Other modifying words available are "nearly", "about" and "crudely", with progressively larger uncertainties. These words are called hedges in fuzzy math circles.

With fuzzy numbers, we can make approximate comparisons. It is quite possible, for example, to ask if an input person's age is approximately equal to about 30. This is often very useful when our data or imprecise, or when we don't want the rigidity of accepting a person 30 years old but rejecting one thirty years plus one day old.

A very convenient way to describe fuzzy numbers is to use modifying words. For example, the fuzzy two shown in Figure 2 could be completely specified by "roughly 2". Other modifying words available are "nearly", "about" and crudely, with progressively larger uncertainties. These words are called hedges in fuzzy math circles.

With fuzzy numbers, we can make approximate comparisons. It is quite possible, for example, to ask if an input person's age is approximately equal to about 30. This is often very useful when our data or imprecise, or when we don't want the rigidity of accepting a person 30 years old but rejecting one thirty years plus one day old.