Fuzzy Sets and Systems 123 (2001) 119 127 www.elsevier.com/locate/fss Fuzzy relational equation with defuzzication algorithm for the largest solution S. Kagei Department of Information and Systems, Faculty of Engineering, Yokohama National University, 79-5 Tokiwadai, Hodogaya-ku, Yokohama 240-8501, Japan Received 30 August 1997; received in revised form 17 November 1999; accepted 12 January 2000 Abstract This paper provides an algorithm for solving a new fuzzy relational equation including defuzzication. An input fuzzy set is rst transformed into an internal fuzzy set by a fuzzy relation, and then an element giving the largest membership value is selected from the support set as an output. Our purpose is to obtain the internal fuzzy relation from pairs of input fuzzy sets and output set-elements. These relational equations are classied into two types, called Type I and Type II in the text, depending on where internal fuzzy sets are defuzzied. Discussions in this paper are done on the largest solutions of these problems. Algorithms to obtain the largest solutions are shown as well as some propositions and numerical examples. c 2001 Elsevier Science B.V. All rights reserved. Keywords: Relational equation; Defuzzication; Largest solution; Identication; Algorithm 1. Introduction Simultaneous fuzzy relational equations are written as q = p R; (1) where p and q are fuzzy sets on X and Y, respectively ( is an index of the equation), R is a fuzzy relation from X to Y to be solved and is a fuzzy composition operator. When the fuzzy set is dened as a mapping from a nonempty set to a complete Brouwerian lattice, the largest solution of R in Eq. (1) was solved by Sanchez [6] in 1976. After that, many works have been done on the fuzzy relational Fax: +81-453381157. E-mail address: kagei@ynu.ac.jp (S. Kagei). equations both in theory and in applications (for example, see [1 3]). The reported works use the fuzzy sets q as output data. However, some systems output defuzzied data (for example, refer to [7,8]). We discuss how to solve the fuzzy relation R when the system includes defuzzication processes. In these systems, membership values have to be compared with each other for the defuzzication of internal fuzzy sets. Therefore, a complete totally ordered set (a complete chain) should be used, instead of a complete Brouwerian lattice, as the range of membership functions. Such a set which appears in practical problems, like a closed interval and a nite set of real numbers, may be embedded into the unit interval [0; 1] with the order of real numbers. Although we employ a subset of the unit interval as the range of membership functions, the argument in this paper can 0165-0114/01/$ - see front matter c 2001 Elsevier Science B.V. All rights reserved. PII: S 0165-0114(00)00039-7
120 S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 be applied to any complete totally orderd set which is isomorphic to a complete subset of the unit interval with the usual order. 2. Combined system of fuzzy relation and defuzzication Let U be a complete subset of the unit interval [0; 1] as a complete totally ordered set with the least element 0 and the greatest element 1. A totally ordered set is a lattice, where the min- and max-operations (meet and join) are given as a b = a and a b = b for a6b. The existence of least upper bound is assured by the completeness. In this paper, a fuzzy set is dened as a mapping from a nonempty set into U. Let p and q be fuzzy sets on nonempty sets X and Y, respectively, and R be a fuzzy relation between X and Y (i.e., a fuzzy set on X Y ). An input fuzzy set p is transformed to an internal fuzzy set q by the fuzzy relation R in the following two steps: (1) For each y in Y, the fuzzy set on X is obtained as p (x) R (x; y): (2) (2) The least upper bound operation is taken over X, q (y) = { p (x) R (x; y)}: (3) On the other hand, defuzzication is to select an element with the largest membership value from the support set. Since the defuzzication process is the last step in ordinary systems, we can consider two types of systems including the fuzzy relation and the defuzzication process: (i) defuzzication of p R in Eq. (2), and (ii) defuzzication of q in Eq. (3). 2.1. Defuzzication of Eq. (2) Assume that, for each y in Y; p (x) R (x; y) takes a largest value at x = x and the element x is output to the input fuzzy set p. Then, x satises the following equations: { p (x) R (x; y)} = p (x ) R (x ;y) for each y in Y: (4) Note that, since x depends on y, a mapping x (y) from Y to X is output for an input p. The problem is to nd the fuzzy relation R (x; y) to satisfy the above equation from the input fuzzy set p and the defuzzi- ed output x (y). Generally, there exist many pairs of inputs p and outputs x. Each instance is distinguished by the sux, like as p and x (a set of is nite in engineering application, but this restriction is not needed in theoretical treatment). Since Eq. (4) can be solved in a same way for each y, it is sucient to solve the following problem for a fuzzy set R (y) on X, called Type I problem in this paper, where R (y) is a fuzzy set on X whose membership values are R (x; y), i.e., R (y)(x) R (x; y). Type I problem: For various pairs (p ;x ) of input fuzzy sets p on X and defuzzied outputs x in X, obtain R (y)(x) such that { p (x) R (y)(x)} = p (x ) R (y)(x ) for all : (5) The superscript of R (y) is omitted in this paper. It should be noted that R is regarded as a fuzzy set on X for Type I problem. 2.2. Defuzzication of Eq. (3) Defuzzication is performed for q (y) in Eq. (3). The output y is an element of Y which gives the largest value of q (y) for all y in Y. For many pairs of inputs and outputs, we reach the following Type II problem. Type II problem: For various pairs of input fuzzy sets p on X and defuzzied outputs y in Y, obtain R (x; y) such that ( ) { p (x) R (x; y)} y Y = { p (x) R (x; y )} for all : (6) Fig. 1 shows block diagrams for these systems. In this gure, the defuzzication process receives a fuzzy set, selects the element with the largest membership value, and outputs it. In Fig. 1(a), Type I problem is solved for each y. p R (y) is a fuzzy set on X whose membership values are given as p R (y)(x) = p (x) R (x; y).
S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 121 3. Largest solution without unique outputs 3.1. Existence of the largest solution Concerning the solution of Type I problem, the following propositions can be shown. Proposition 1. If fuzzy relations R satisfy Eq. (5) ( is an index for distinguishing the solutions); then R also satises Eq. (5). Proof. Taking the least upper bound of Eq. (5) for all, the left-hand side is ( ) { p (x) R (x)} = { p (x) R (x)} Fig. 1. Fuzzy relational systems including defuzzication processes: (a) Type I; (b) Type II. 2.3. Unique output According to Eqs. (5) and (6), it is possible that the defuzzied output is not uniquely determined by R, i.e., the membership value may be the largest at more than one elements. When all defuzzied outputs are uniquely determined, Eqs. (5) and (6) should be replaced as follows: For Type I problem, instead of Eq. (5) p (x) R (x) p (x ) R (x ) for all x x and for all : (7) For Type II problem, instead of Eq. (6) p (x) R (x; y)} { { p (x) R (x; y )} for all y y and for all : (8) In the subsequent part of this paper, we deal with the largest solution of these problems. First, we discuss the case where the outputs are not always uniquely determined. This precondition assures the existence of the largest solution. As shown later, the largest solution does not exist for unique output. We discuss a suciently large solution, called quasi-largest solution in this paper, for unique output. = p (x) R (x) = ( p (x) ( R )(x)): The right-hand side is { p (x ) R (x )} = p (x ) R (x ) Then the proposition is proved. = p (x ) ( R )(x ): From the above proposition, we can conclude the following. Proposition 2. There exists the largest solution for Type I problem. Proof. Since R = (i.e., R (x) = 0 for all x) isasolution of the problem, there exists the largest solution according to Proposition 1. Obviously, the largest solution is unique.
122 S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 Similarly, we can easily show the existence of the largest solution for Type II problem. However, the largest solution is trivial. In fact, R (x; y) = 1 for all x and y satises Eq. (6). For a single pair, the following largest solution for Type I problem can be easily found. Proposition 3. For a fuzzy set p and an element x of X; the largest solution R of Eq. (5) is given as R (x) = p (x) p (x ); (9) where operation is dened as (refer to [6]) ab = { 1 if a6b; b if a b: Proof. From Eq. (5) for a single pair (p;x ), p (x) R (x)6 p (x ) R (x ) for all x X: By setting R (x ) = 1, which is the largest solution, we obtain Eq. (9) for x ( x ) by solving p (x) R (x)6 p (x ). In case that x = x, Eq. (9) also holds true. When membership values are restricted in some intervals, the following largest solution of Type I problem can be found for a single pair. Proposition 4. Assume that 06 R (x)6m x for all x in X; where M x s are constants for each x such that 0 M x 61(M x depends on x but does not on R (x)). The largest solution R of Type I problem for a single pair (p;x ) is given as R (x) =( p (x) { p (x ) M x }) M x : (10) Proof. If 06 R (x)6m x for all, then 06 R (x) 6M x. Therefore, similar to the proof of Proposition 1, it is shown that there exists the largest solution of Eq. (5) under the restriction 06 R (x)6m x. The largest value of R (x )ism x. For x x, solving p (x) R (x)6 p (x ) M x under 06 R (x)6m x, the largest values of R (x) are given by Eq. (10). Eq. (10) can be written as R (x) { Mx if p (x) M x 6 p (x ) M x ; = p (x ) M x if p (x) M x p (x ) M x : (11) 3.2. Algorithm for solving Type I problem In this subsection we assume that the support set has nite elements and the number of pairs (the number of ) is also nite. Let R be the largest solution of Type I problem. For all pairs of (p ;x ), we put R (x) = { p (x) p (x )}: (12) It is clear that R R (i.e., R (x)6 R (x) for all x in X ). However, R is not always a solution, which may be seen in the following example. Example 1. For the following two pairs: p 1 =[0:8 0:7]; x 1 =1 and p 2 =[0:6 0:5]; x 2 =2; the largest solutions for each pair are R 1 =[11]and R 2 =[0:5 1], and we obtain R = R 1 R 2 =[0:5 1]. However, R is not a solution for the pair of p 1 and x1. In this case, the largest solution is R =[0:50:5]. There does not exist any solution to give unique outputs. The largest solution for several pairs cannot be expressed explicitly, but we can develop an algorithm to obtain it. According to Eq. (11), we make R (x) decrease from 1 until R attains to the solution. Algorithm 1. The largest solution of Type I problem: Step 1: Set R (x) = 1 for all x X. Step 2: Repeat the following Steps 2.1 and 2.2 for all pairs (p ;x ).
S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 123 Proposition 5. If a nite number of fuzzy relations R satisfy Eq. (7); then R also satises Eq. (7). The same holds true for Eq. (8). In Type I problem, the following proposition can be proved for a single pair (p;x ). Proposition 6. Assume that 0 M x 61 and 06 R (x) 6 M x for all x in X. R (x) is determined as follows: 1: Select R (x ) such that 0 R (x )6M x. 2: For x not equal to x ; select R (x) as 06 R (x)6m x if p (x) M x b; 06 R (x) b if p (x) M x b; (13) where b = p (x ) R (x ). Fig. 2. Flow diagram for obtaining the largest solution of Type I problem. ( indicates to skip.) Step 2.1: Set b = p (x ) R(x ). Step 2.2: For all x not equal to x, if p (x) R (x) b; then set R (x) =b: Step 3: When no alternation of R (x) in Step 2.2 occurs in a single repetition of Step 2, then stop. Otherwise, repeat Step 2. Note: It may be considered to choose R (x) given by Eq. (12) as an initial value in Step 1. However, we employ the simpler algorithm because the calculation of R (x) is not much dierent from executing Step 2. In Algorithm 1, R (x) decreases in value by taking one of p (x ). Therefore, Step 2 nishes in nite repetitions. Fig. 2 shows this algorithm described in program structure diagrams (PSD) [4,5]. 4. Largest solution with unique outputs 4.1. Properties of solutions In this section, it is required that all defuzzied outputs are uniquely obtained, i.e., the membership function takes the largest value at an only element. Similar to the proof of Proposition 1, we can easily show the following. Then R (x) satises Eq. (7) for the single pair (p;x ). Conversely, all the solutions of Eq. (7) for the single pair under the assumption that 06 R (x)6m x are included in the above solutions. Proof. According to Eq. (13), if p (x) M x b, then p (x) R (x)6 p (x) M x b.if p (x) M x b, then R (x) b and p (x) R (x)6 R (x) b. Therefore, R (x) satises Eq. (7). On the other hand, from Eq. (7), if p (x) b then R (x)6m x, and if p (x) b then R (x) b and R (x)6m x. Therefore, this R (x) satises Eq. (13). 4.2. Quasi-largest solution There does not exist the largest solution to give unique output, because the supremum of the solutions does not always give unique output. However, it may be useful in applications to give some expression for a solution near the supremum. For this purpose, we introduce a symbol b which is smaller than b by an innitesimal. For any b U, b is dened as b b and c6b for any c b and (b ) is dened as (b ) b and c6(b ) for any c b ((b ) ), (((b ) ) ), ::: are dened in the similar way.
124 S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 When U is the unit interval [0; 1], b does not exist. Therefore, b is only symbolically dened. But in some cases (for example, in case that U is a nite set), b exists in U or in [0; 1]. A quasi-largest solution R is dened as a solution expressed with the above symbols such that R R (i.e., R (x)6 R (x) for all x) for any solution R. When b exists, the quasi-largest solution is the largest. But, when b does not exist, R is only a symbolic expression. As a simple example, consider an inequality x y 1 in the unit interval [0; 1]. There does not exist the largest solution, but the quasilargest solution can be written as x =(1 ) and y =1. This means that, for any suciently small ; 0, x =1 and y =1 is a solution ({1 } and {(1 ) } correspond to 1 and (1 ), respectively) and moreover, for any solution x and y, there exist ; 0 such that x x and y y. For a single pair, the quasi-largest solution can be obtained as follows: Proposition 7. Assume that 0 M x 61 and 06 R (x) 6M x for all x in X. The quasi-largest solution R of Type I problem with unique output for a single pair (p;x ) is given as 1. Set R (x )=M x. 2. For x not equal to x ; R (x) =M x if p (x) M x b; R (x) =(b) if p (x) M x b; where b = p (x ) R (x ). 4.3. Algorithm for solving Type I and Type II problems (14) Same as Section 3.2, assume that both the support set and the number of pairs are nite. For Type I problem, an algorithm for unique output can be easily obtained from Algorithm 1. In fact, b is replaced as b in Step 2.2 of Algorithm 1. Therefore, only Step 2.2 should be exchanged by the following: Step 2.2: For all x not equal to x ; if p (x) R (x) b then set R (x) =(b) : Fig. 3. Flow diagram for the largest solution to give unique outputs. (The whole diagram is obtained by replacing Step 2.2 in Fig. 2 with this gure.) Fig. 3 shows a ow chart of the new Step 2.2. Note that, if there does not exist any solution, R (x) decreases to a negative value in this algorithm. For Type II problem, Eq. (8) can be rewritten as p (x) R (x; y) { p (x ) R (x ;y )} x X for all x; all y y and all : (15) Therefore, we have an algorithm. Algorithm 2. The quasi-largest solution of Type II problem with unique outputs: Step 1: Set R (x; y) = 1 for all x X and all y Y. Step 2: Repeat the following Steps 2.1 and 2.2 for all pairs (p ;y ). Step 2.1: Set b = x X { p (x ) R (x ;y )}: Step 2.2: For all x and all y not equal to y ; if p (x) R (x; y) b; then set R (x; y) =(b) : Step 3: When no alternation of R (x; y) in Step 2.2 occurs in a single repetition of Step 2, then stop. Otherwise, repeat Step 2. Practically, b can be expressed as b using a suciently small number, (b ) is expressed as b 2, and so on. It is sucient that N is selected smaller than any positive dierence between p (x), where N is the total number of unknown membership values, i.e., the number of elements in the domain X
for Type I problem and that in the domain X Y for Type II problem. In this case, the above algorithm nishes in nite repetitions, because R decreases in a value greater than for each repetition. Note that, in this argument, the range of membership functions needs to be embedded into a complete Archimedean ordered eld, like as the unit interval [0; 1]. Example 2. Let X and Y be {1; 2} and {1; 2; 3}, respectively. Solve Type II problem for the following two pairs: p 1 =[0:8 0:7]; y 1 =1 and p 2 =[0:6 0:5]; y 2 =2: The quasi-largest solutions can be obtained by Algorithm 2. According to the rst repetition of Step 2, we obtain [ ] 0:6 0:8 R = 0:6 1 1 1 S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 125 and the second repetition gives the quasi-largest solution as [ ] R 0:6 0:7 = 0:6 : 1 0:7 0:7 This suggests that, for any suciently small ; 0, the following R is a solution [ ] R 0:6 0:7 0:6 = 1 0:7 0:7 and, for any solution R, there exist ; 0 such that R R. 5. Numerical example In order to verify that the largest solution approaches the real one, we develop the following examples. First of all, a fuzzy set R ref on X for Type I (or on X Y for Type II) is chosen as a reference (real solution). Fuzzy inputs p are generated in an appropriate manner and the defuzzied elements x (or y ) are determined from R ref and p. Using these pairs (p ;x ) (or (p ;y )), Type I (or Type II) problem is solved using Algorithm 1 (or Algorithm 2). Fig. 4. Membership functions in Example 3: (a) p and x for =1 5. (( ) indicates the point (x ; p R ref (x )).); (b) the largest solution obtained R calc and the reference R ref. Finally, the calculated solution R calc is compared with the reference R ref. Example 3 (Type I problem). Let X ={1; 2;:::;100} and Rref (x) = exp[ (x 50) 2 =500]. To determine fuzzy input p, three random numbers a, b and c are chosen from an uniform distribution in the interval [ 50; 150], and arranged such that a b c. Then the triangular fuzzy set p is made so that its mean value is1atx = b and its support set is [a; c]. From R ref and p, the defuzzied element x is obtained. This step is repeated until the necessary number of pairs are obtained. When a repeated number x appears, the latter pair is discarded. Fig. 4 shows this procedure. In Fig. 4(a), ve triangular fuzzy inputs and R ref are drawn in the interval [0; 100]. Symbols indicate the largest values of p (x) Rref (x) onx. Fig. 4(b) shows the reference fuzzy number R ref and the largest solution R calc calculated by Algorithm 1. White
126 S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 seems to reach the reference fuzzy set Rref at the black points where membership values are suciently large. In this example, the largest solution assures unique outputs. Fig. 5. R calc obtained from the rst nth pairs, ( p ;x ) for =1 n: (a) n = 10; (b) n = 20; (c) n = 50. and black circles indicate the solution of Eq. (5). Black circles show the points where defuzzied outputs are given, which correspond to the black ones in Fig. 4(a). Fig. 5 shows the eect of the number of pairs. When the number of pairs, n, increases, the largest solution Example 4 (Type II problem). Similar to Example 3, we select as a reference 0:5 0:7 0:8 R ref = 0:6 0:6 0:4 : 0:9 0:5 0:3 Fuzzy inputs p are determined from three random numbers uniformly distributed in [0; 1] as p =[abc]. The outputs y are obtained by defuzzing p R ref. The pair (p ;y ) which does not give unique output is discarded. The quasi-largest solutions are obtained for various number of pairs n. A sample of results is for n = 10, 0:733 0:733 1 R = 1 1 1 1 0:858 0:858 for n = 20, 0:733 0:733 1 R = 1 1 1 1 0:778 0:778 for n = 50, 0:712 0:712 0:805 R = 0:728 (0:728 ) (0:728 ) 1 0:525 0:525 and for n = 100, 0:703 0:703 0:805 R = 0:703 0:666 0:666 1 0:510 0:510 It seems that the solution slowly approaches the reference fuzzy relation as the number of pairs increases. 6. Concluding remarks The identication for the combined systems of fuzzy relation and defuzzication are treated in this paper. The internal fuzzy relation is obtained from
S. Kagei / Fuzzy Sets and Systems 123 (2001) 119 127 127 fuzzy input and defuzzied output. These problems are classied into two types, called Type I and Type II in the text. There exists non-trivial largest solution for Type I problem. For Type II the largest solution is trivial. In addition, when unique outputs are required, there does not exist the largest solution, for the set of solutions is not closed set, i.e., the supremum of the solutions does not give unique output. However, a suciently large solution can be expressed symbolically, using a number smaller by an innitesimal. In order to obtain the largest solution (or the quasi-largest solution), Algorithm 1 (Figs. 2 and 3) and Algorithm 2 are proposed. In the case of unique output, the existence of solution is not guaranteed. In this case, the algorithms may result in negative membership values. Moreover, in these algorithms, a small number is used instead of an innitesimal. It is recommended not to make it so small in order to avoid wasting computing time. Defuzzication processes are often utilized in the application of fuzzy method. One of the important problems is how to construct fuzzy relation or inference rules. Therefore, the inverse problem becomes useful in the construction of such systems. However, it is supposed that much information may be lost by defuzzication, especially in Type II problem, which is conrmed in Examples 3 and 4. In fact, the quasilargest solution in Example 4 slowly approaches the reference fuzzy relation. Generally speaking, sucient data may be needed in order to identify internal fuzzy relations. Acknowledgements The author wish to express his gratitude to Professor E. Sanchez for helpful discussions and valuable advice at the University of Marseille. References [1] A. Di Nola, W. Pedrycz, E. Sanchez, S. Sessa, Fuzzy Relational Equations and Their Applications in Knowledge Engineering, Kluwer, Dordrecht, 1989. [2] A. Di Nola, W. Pedrycz, S. Sessa, Equations and relations on ordered structures: mathematical aspects and applications (preface of special issue on fuzzy relations), Fuzzy Sets Systems 72 (1995) 133 134. [3] A. Di Nola, W. Pedrycz, S. Sessa, Equations and relations on ordered structures: Mathematical aspects and applications (preface of special issue on fuzzy relations), Fuzzy Sets Systems 75 (1995) 117 118. [4] ISO 8631, Program constructs and conventions for their representations, 1983. [5] I. Nassi, B. Shneiderman, Flowchart techniques for structured programming, SIGPLAN Notices 8 (1973) 12 26. [6] E. Sanchez, Resolution of composite fuzzy relation equations, Inform. and Control 30 (1976) 38 48. [7] S. Ukai, S. Kaguei, Automatic generation of accompaniment chords using fuzzy inference, J. Jpn. Soc. Fuzzy Theory Systems 3 (1991) 377 381 (in Japanese). [8] S. Ukai, S. Kaguei, Automatic accompaniment performance system using fuzzy inference, Proc. Sino Japan Joint Meeting Fuzzy Sets Systems, Beijing, Vol. E1-5, 1990, pp. 1 4.