• Aucun résultat trouvé

ALGEBRA OF FUZZY SETS

Dans le document FUZZY EXPERT SYSTEMS AND FUZZY REASONING (Page 74-82)

4 Fuzzy Logic, Fuzzy Sets, and Fuzzy Numbers: II

4.2 ALGEBRA OF FUZZY SETS

4.2.1 T-Norms and t-Conorms: Fuzzy AND and OR Operators

Given fuzzy sets A, B, C,. . . all fuzzy subsets of X, we wish to compute A<B,B>C, and so on. What we use in fuzzy logic are the generalized AND and OR operators from classical logic. They are called t-norms (for AND) and t-conorms (for OR). We first define t-norms.

A t-norm T is a function from [0, 1][0, 1] into [0, 1]. That is, if z¼T(x, y), then x, y, and z all belong to the interval [0, 1]. All t-norms have the following four properties:

1. T(x, 1)¼x (boundary)

2. T(x, y)¼T( y, x) (commutativity)

3. ify1y2,then T(x,y1)T(x,y2) (monotonicity) 4. T(x, T( y, z))¼T(T(x, y), z) (associativity)

T-norms generalize the AND from classical logic. This means that tv(P AND Q)¼T(tv(P), tv(Q)) for any t-norm and equations (4.1) – (4.3) are all examples of

Fuzzy Expert Systems and Fuzzy Reasoning, By William Siler and James J. Buckley ISBN 0-471-38859-9 Copyright#2005 John Wiley & Sons, Inc.

t-norms. The basic t-norms are

Tm(x, y)¼min(x, y) (4:1)

TL(x, y)¼max(0, xþy1) (4:2)

Tp(x, y)¼xy (4:3)

andT(x, y) defined as x if y¼1, y if x¼1, 0 otherwise.

Tmis called the standard or Zadehian intersection, and is the one most commonly employed;TLis the bounded difference intersection;Tpis the algebraic product; and T is the drastic intersection. It is well known that

T TLTpTm (4:4)

and

TTTm (4:5)

for any t-norm T.

If A and B are fuzzy subsets of universal set X, then C¼A>B is also a fuzzy subset of X and from De Morgan’s theorems (3.8) the membership function of C as

C(x)¼NOTT(NOTA(x), NOT B(x))¼1T(1A(x)), 1B(x)) (4:6) for all x in X. Equation (4.6) defines the membership function for C for any t-norm T.

t-Conorms generalize the OR operation from classical logic. As for t-norms, a t-conorm C(x, y)¼z has x, y, and z always in [0, 1]. The basic properties of any t-conorm C are

1. C(x, 0)¼x (boundary)

2. C(x, y)¼C( y, x) (commutativity)

3. Ify1y2, thenC(x,y1)C(x,y2) (monotonicity) 4. C(x, C(y, z))¼C(C(x, y), z) (associativity) The basic t-conorms are

1: Cm(x, y)¼max(x, y) called standard union (4:7) 2: CL(x, y)¼min(1, xþy) called bounded sum (4:8) 3: Cp(x, y)¼xþyxy called algebraic sum (4:9)

and

4: C(x, y) called drastic union that is defined as:

x if y¼0; y if x¼0; and one otherwise (4:10) It is well known that

CmCpCLC (4:11)

and

CmCC (4:12)

for all t-conorms C.

To computeA<Bfor A and B fuzzy subsets of X, we use a t-conorm. If we let D¼A<B, the we compute the membership function for D as

D(x)¼C(A(x),B(x)) (4:13)

for a t-conorm C, for all x in X.

The complement of a fuzzy set A, writtenAc, is always determined by

Ac(x)¼1A(x) (4:14)

for all x in X.

T-norms and t-conorms are only defined for two variables and in fuzzy expert systems we need to extend them ton variables. Through associativity, the fourth property, we may extend T(x, y) to T(x1,. . .,xn) and C(x, y) to C(x1,. . .,xn) for eachxiin [0, 1], 1in.TmandCmare easily generalized to

Tm(x1,. . .,xn)¼min(x1,. . .,xn) (4:15)

Cm(x1,. . .,xn)¼max(x1,. . .,xn) (4:16)

Next we have forTLandCL

TL(x1,. . .,xn)¼max 0, Xn

i¼1

xinþ1

!

(4:17)

CL(x1,. . .,xn)¼min 1, Xn

i¼1

xi

!

(4:18)

4.2 ALGEBRA OF FUZZY SETS 59

Also, we easily see that

Tp(x1,. . .,xn)¼x1,. . .,xn (4:19)

but the extension ofCpis more complicated. For n¼3, we see that

CP(x1,x2,x3)¼(x1þx2þx3)(x1x2þx1x3þx2x3)þ(x1x2x3) (4:20) and the reader can see what needs to be done for n¼4.

When one computesA>BandA<Bone usually uses a t-norm T forA>Band its dual t-conorm C forA<B. A t-norm T and t-conorm C are dual when

C(x, y)¼1T(1x, 1y)

The usual dual t-norms and t-conorms areTm,CmandTL,CLandTp,CpandT,C. Using the above operators, fuzzy sets do not enjoy all the algebraic properties of regular (crisp) sets. (In Section 4.2.2, we will see that this problem may be avoided by the use of correlation fuzzy logic.) Once you choose a t-norm T for intersection and its dual t-conorm C for union, some basic algebraic property of crisp sets will fail for fuzzy sets. Let us illustrate this fact using Tm,Cm, and TL,CL. For crisp sets, the law of non-contradiction is A>Ac¼1(the empty set) and the law of the excluded middle is A<Ac¼X (the universal set), where A is any crisp subset of X. Using Tm,Cm both of these basic laws can fail. For fuzzy sets, the law of non-contradiction is A>Ac¼1, where now 1 is the fuzzy empty set whose membership function is always zero; the law of the excluded middle would be A<Ac¼X, where X is the fuzzy set whose membership function is always one. In Section 4.2.3, we show that we do not get identically one for Cm. However, in the problems you are asked to verify that the laws of non-contradiction and excluded middle hold if you useTLandCL. But, if you choose to useTLandCL

for fuzzy set algebra, the distributive law fails. This means that for T¼TLfor inter-section and C¼CLfor union, then

A>(B<C)=(A>B)<(A>C) (4:21) for some fuzzy sets A, B, and C (see the Questions, Section 4.8).

4.2.2 Correlation Fuzzy Logic

As we have seen, one must be careful when working with equations in fuzzy sets involving intersection, union, and complementation because the equation may be true for crisp sets but false for fuzzy sets. It would be nice to have a method of doing the algebra of fuzzy sets so that all the basic equations for crisp sets also hold for fuzzy sets. This is true of correlation fuzzy logic. In correlation fuzzy logic you can useTL,CLin certain cases andTm,Cmin other cases.

In the papers Buckley and Siler (1998, 1999), we introduced a new t-normT^and a new t-conormC^, which depend on a parameterrin [21, 1], which is the correlation between the truth values of the operands. For example, to computeD¼A>Bwe use D(x)¼T^(A(x),B(x)) for all x, where the t-norm T^to be used depends on any prior association between A and B. (In most casesrwill demand prior knowledge, but if we are combining A and NOT A prior knowledge is not required; we know that A and NOT A are maximally negatively correlated, and their correlation is21.) Let

a¼tv(A) b¼tv(B)

r¼ prior correlation coefficient between a and b d¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

A specification ofras 1 is equivalent to specifying the standard min– max fuzzy logic. It is possible to specify values for a, b, and r that are incompatible. For example, if a is specified as 0.4 and b as 0.6, a value forrof 1 is not possible. In (4.16),rUandrL are the limits of possible values forr given a and b. In the event that a value of r outside those limits is specified, the possible value of r(rEff) nearest the specified value is used. If a value of r of 1 is specified, this value of rEff will always result in the standard Zadehian min– max logic being used, no matter what values a and b have.

The notion of semantic consistency between fuzzy sets was put forward by Thomas (1995). Up to now, we have considered proposition with a single truth value. We may also have to consider combining fuzzy numbers and membership functions defined on the real line. Let one fuzzy number or membership function be defined by m1(x), and the other bym2(x). In this case, we compute the cross-correlation coefficient using the well-known formula

r¼cov(m1(x),m2(x))= ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi var(m1(x))var(m2(x)) p

by integratingover the area of overlap only. If no overlap,r¼21.

4.2 ALGEBRA OF FUZZY SETS 61

It was shown that

TLT^TM (4:24)

CMC^CL (4:25)

T^¼Tp,C^¼Cp,if r¼0;T^¼TL,C^¼CL,if r¼ 1 (4:26) and

T^¼Tm,C^¼Cm,if r¼1 (4:27) A computer routine in the C language to calculate a AND b and a OR b using correlation logic is

//Function CorrLogic - given a, b and default r, //returns aANDb and aORb

//04-17-2004 WS

#include <math.h>

double min(double x, double y);

double max(double x, double y);

bool CorrLogic (double a, double b, double r, double

*aANDb, double *aORb) f

double std, ru, r1;

if (a < 0||a > 1||b < 0||b > 1||r < -1||r > 1) return false;

std¼sqrt(a*(12a)*b*(12b));

if (std > 0) f

ru¼(min(a, b)2a*b)/std;

rl¼(max(aþb)21, 0)2a*b)/std;

if (r < rl) r¼rl;

else if (r > ru) r¼ru;

g

*aANDb¼a*bþr*std;

*aORb¼aþb2a*b2r*std;

return true;

g

double min(double x, double y)

There are two basic cases where it is obvious what to choose for r. To find A<A,A>A we must use r¼1 since A and A are maximally positively correlated. Then, T¼Tm and C¼Cm so that A<A¼A,A>A¼A. For A<Ac,A>Ac wemustuser¼ 1 because A and Ac are maximally negatively correlated. Then, we have T ¼TL,C¼CL for this value of r so thatA<Ac¼ X,A>Ac¼1and the laws of non-contradiction and excluded middle hold.

We showed that using this new t-norm and t-conorm (correlation logic), and properly choosing the value of the parameter r, all the basic laws of crisp set theory also now hold for fuzzy sets, including the laws of excluded middle and non-contradiction.

We may ask: If we have no knowledge of prior associations between A and B, what should the default logic be? We suggest, on the basis of nearly 20 years of experience, that the Zadehian min – max logic is a desirable default. If we are eval-uating rules with complex antecedents, with any other logic the truth value of an antecedent with several clauses ANDed together tend to drift off to zero as the number of clauses increases; and when aggregating the truth values of a consequent fuzzy set member by ORing them together, the resulting truth value tends to drift up to one. The Zadeh logic, unless combining B and NOT B, passes a pragmatic test;it works, and works well.

4.2.3 Combining Fuzzy Numbers

Since fuzzy numbers are fuzzy sets, we may perform logical operations upon them, such as A>B,A<B,A>Bc, and so on, when A and B are fuzzy numbers.

Consider the fuzzy number A and its complement NOT A in Figure 4.1.

We now construct the intersection A AND NOT A using the conventional min – max logic, Tm, shown in Figure 4.2. Because segments of membership functions coincide in a number of places, the labeling of the graph is a little complicated.

4.2 ALGEBRA OF FUZZY SETS 63

The intersection of A and NOT A is not everywhere zero, as we would expect from the laws of classical logic, but has two sharp peaks with m(2) and m(6) being 0.5. Similarly, the union A OR NOT A is not everywhere one but has two sharp notches, shown in Figure 4.3.

If, however, we useTLrather thanTM, we obtainA>Ac¼1and not Figure 4.2.

To evaluate A<Ac use CL, then A<Ac¼X and we eliminate the notches in Figure 4.3. An occasion when correlation logic is of theoretical importance was caused by a paper by Elkan (1994), which offered a proof that fuzzy logic was only valid for crisp propositions. This paper depended on the fact that standard fuzzy logic, and indeed all multivalued logic, fail to fulfill the laws of excluded middle and non-contradiction. When the appropriate logic is used for combining A and NOT A the excluded middle and non-contradiction laws are obeyed, and Elkan’s proof fails.

Figure 4.1 A fuzzy number A and its complement NOT A.

Figure 4.2 A fuzzy number A, Acand (A AND Ac) using standard min– max fuzzy logic Tm.

Dans le document FUZZY EXPERT SYSTEMS AND FUZZY REASONING (Page 74-82)