Sie sind auf Seite 1von 6

Original paper Soft Computing 6 (2001) 412±417 Ó Springer-Verlag 2001

How to make constrained fuzzy arithmetic efficient


M. Navara, Z. ZÏabokrtskyÂ

412
Abstract In the standard fuzzy arithmetic, the vagueness 1. convexity and closedness: for each a 2 …0; 1Š, the a-cut
a
of fuzzy quantities always increases. G. J. Klir [2, 3] sug- A ˆ fx 2 R : A…x†  ag is a closed interval,
gests an alternative ± the constrained fuzzy arithmetic ± 2. boundedness: the support of A, Supp A ˆ fx 2 R : A…x†
which reduces this effect. On the other hand, it signi®- > 0g, is bounded,
cantly increases the complexity of computations in com- 3. normality: the core, 1 A ˆ fx 2 R : A…x† ˆ 1g, is non-
parison to the classical calculus of fuzzy quantities. So far, empty.
little attention was paid to the problems of implementation
If, moreover, the core of A is a singleton, we call A a
of the constrained fuzzy arithmetic, especially to its
fuzzy number. As a consequence of this de®nition, for
computational ef®ciency. We point out the related prob-
each fuzzy interval A there are numbers a; b; c; d 2 R,
lems and outline the ways of their solution. We suggest to
a  b  c  d, such that
decompose the whole expression, classify all its subex-
pressions with respect to their individual computational…a; d†  fx 2 R : A…x† > 0g  ‰a; dŠ ;
complexity and precompute the corresponding subresults
fx 2 R : A…x† ˆ 1g ˆ ‰b; cŠ ;
according to this classi®cation.
A is nondecreasing on ‰a; bŠ ;
Keywords Fuzzy number, Fuzzy interval, Fuzzy arithmetic A is nonincreasing on ‰c; dŠ :

1 In particular, a trapezoidal fuzzy interval A is piecewise


Introduction linear on the above intervals; it is fully determined by the
Modern knowledge-based systems often require work with quadruple ha; b; c; di as follows:
uncertainty information. One of the tools describing 8x a
> when x 2 ‰a; b†,
vagueness of data is fuzzy logic. It uses the real interval [0, <b a
1] as the set of truth values, as well as membership degrees A…x† ˆ 1d x
when x 2 ‰b; cŠ,
of fuzzy sets. Fuzzy logical operations are used to evaluate >
:d c when x 2 …c; dŠ,
logical formulas. 0 otherwise .
Fuzzy quantities are special types of fuzzy subsets of the
If, moreover, b ˆ c, we speak of a triangular fuzzy number
real line. They generalize the classical (crisp) real numbers
parameterized by the triple ha; b; di.
by their ``approximate'' fuzzy extensions. For calculations The mapping hA : ‰0; 1Š ! exp R, de®ned by
with them, several systems of operations were suggested. hA …a† ˆ a A, determines A uniquely, giving the horizontal
We compare here two of them, the standard fuzzy representation of A. (To emphasize the difference, we
arithmetic (developed in [6] and described in full detail in [1,
speak of the representation of a fuzzy set by the mapping
4]) and the constrained fuzzy arithmetic suggested in [2, 3].
A : R ! ‰0; 1Š as the vertical representation.)
The horizontal representation is advantageous for the
1.1 computer implementation. While we usually have to
Basic notions distinguish a ®nite, but very large number of real values,
We deal here with fuzzy subsets of the real line, R, say u, it is usually suf®cient to restrict attention to a much
i.e., with mappings from R to the unit interval ‰0; 1Š  R. smaller number of membership degrees a; let us denote
By a fuzzy quantity (fuzzy interval) we mean a mapping this number by k. For a fuzzy quantity A, each a-cut is
A : R ! ‰0; 1Š satisfying the following three conditions: a closed interval, so its horizontal representation requires
to record only 2k real numbers (bounds of a-cuts). For

M. Navara (&), Z. Zabokrtsky  general shapes of membership functions, the vertical
Center for Machine Perception, representation would require u real numbers (membership
Faculty of Electrical Engineering, degrees).
Czech Technical University, Technicka 2, 166 27 Praha,
Czech Republic 1.2
E-mails: navara@cmp.felk.cvut.cz,
Zdenek.Zabokrtsky@seznam.cz Standard fuzzy arithmetic
The basic aim of the fuzzy arithmetic is to extend the
The authors gratefully acknowledge the support of the project operations ‡; ; ; = to fuzzy intervals. Let
J04/98: 212300013 of the Czech Ministry of Education. ( 2 f‡; ; ; =g. In the standard fuzzy arithmetic (SFA),
the operation ( is extended to fuzzy intervals A; B in the the extension principle since this way we can concen-
following two equivalent ways1 : trate only on the endpoints of intervals instead of
computing the suprema on continuous domains. The
1. In the vertical representation by the extension principle
fuzzy interval task is then decomposed into k crisp
…A(B†…c† ˆ sup minfA…a†; B…b†g ; interval computations on a-levels which are usually
a(bˆc uniformly distributed on the interval ‰0; 1Š. The following
2. In the horizontal representation equalities hold
a
…A(B† ˆ fa(bja; b 2 a …A  B†g :
‰a; bŠ ‡ ‰c; dŠ ˆ ‰a ‡ c; b ‡ dŠ
1.3 ‰a; bŠ ‰c; dŠ ˆ ‰a d; b cŠ
Constrained fuzzy arithmetics 413
Let us quote G. J. Klir who introduced the constrained ‰a; bŠ  ‰c; dŠ ˆ ‰min…a  c; a  d; b  c; b  d†;
fuzzy arithmetic (CFA) [2]: max…a  c; a  d; b  c; b  d†Š
When fuzzy arithmetic is employed for dealing with
fuzzy systems which are viewed as systems of linguistic ‰a; bŠ=‰c; dŠ ˆ ‰min…a=c; a=d; b=c; b=d†;
variables, it is essential to take into account all infor- max…a=c; a=d; b=c; b=d†Š; 0 62 ‰c; dŠ
mation regarding the linguistic variables involved. It is
argued that the standard fuzzy arithmetic does not utilize Then, the result is evaluated the same way as for real
some of the information available. As a consequence, numbers ± that means by decomposition of the whole
it may produce results that are more imprecise than expression into a sequence of binary operations, we just
necessary or, possibly, even incorrect. take care of operators' priority ± for example via a push-
down automation and LL(1) grammar. Finally, the output
For example, we are not satis®ed with the fact that fuzzy set is composed from individual resulting intervals
A A is not equal to crisp zero when applying the stan- which are interpreted as its a-cuts.
dard fuzzy arithmetics, though the linguistic variable A The computational complexity of an interval expression
is connected to one real variable only. Therefore, only is linear with respect to the number of operands n (n ˆ 2
a pair of equal operands instead of any combination of for A ‡ A). The computational complexity of a fuzzy
them should be used. This limitation, called an equality interval expression is then O…k  n†.
constraint, gives the desired result also in the case of But now, the crucial disappointment comes. Since
A=A. G. J. Klir wrote: associativity is not generally guaranteed in CFA, the
. . .the evaluation of any algebraic expression involving evaluation of the expression cannot be decomposed into
arithmetic operations on fuzzy intervals must take into a sequence of binary operations and the computation
account the equality constraint for each group of fuzzy must be done globally.
intervals that are represented by the same symbol. The Moreover, when evaluating endpoints only, we will
elementary fuzzy arithmetic operation ( under the obtain exact result only in the case of functions which
equality constraint E may be expressed for all a 2 …0; 1Š are monotonic on the multidimensional domain com-
by the equation posed of supports of individual operands. (For instance,
a
…A(A†E ˆ fa(aja 2 a Ag when we have a trapezoidal linguistic variable A param-
eterized with h 2; 0; 0; 2i, the support of the expression
See the difference with respect to the standard fuzzy A  A does not contain negative numbers, since we cannot
arithmetic: employ, e.g., the pair 1 and 1 any more in CFA.) It is
a
…A(A† ˆ fa1 (a2 j…a1 ; a2 † 2 a …A  A†g useless to urge that the intent of monotonicity cannot be
accepted.
To avoid any confusion, we should emphasize that
We try to formulate the problem of CFA more clearly.
a
…A(B†CFA ˆ fa1 (a2 j…a1 ; a2 † 2 a …A  B†g On every a-level, we are to ®nd both the minimum and the
is the same in both the constrained and unconstrained maximum of a given expression ± the endpoints of the
fuzzy arithmetics, even in the case when fuzzy sets A and B resulting interval (taking these intervals one after another,
are absolutely equal and have only different names. we will again reconstruct the total result). The domain
The names of variables are used to determine that the of our search is a multidimensional interval, in each
same variable can appear at several positions in the ex- dimension it corresponds to an a-cut of an individual
pression. (Similar situation appears in probability theory, linguistic variable. The total dimension equals the number
where calculations with random variables give different of distinct operands.
results if we know that two variables are the same, hence Discontinuity can be avoided (it appears only when we
with correlation 1.) divide by ``fuzzy zero''), but steep continuous functions
are obtained, e.g., as high order polynomials. Finding their
2 extremes is a task that is not algorithmizable in general.
Why is CFA computationally difficult? The blind search would lead to the complexity of order
First, let us brie¯y discuss how a standard fuzzy expres- n  un , where n is the number of distinct variables in the
sion could be evaluated. We prefer the a-cut method to formula. This situation is unsatisfactory. Therefore we
1
Some problems may arise with division by zero. This case should have to use tools that allow to simplify the calculation at
be avoided. We do not deal with these questions here. least in some cases.
3 1. After parsing (e.g., the standard LR grammar) of the
Our approach string which contains the expression, generate a binary
tree with leaf nodes corresponding to the operands
3.1 (fuzzy variables or constants) and nonleaf nodes
Decomposition corresponding to the basic arithmetic operators.
In [3] G. J. Klir writes that the computation of an ex- 2. In the node corresponding to the subtraction or the
pression in the constrained fuzzy arithmetic must be done division operator, move this operator to the right
globally and cannot be decomposed into a sequence of subtree and change the original node to the commu-
binary operations as in the standard fuzzy arithmetic. tative counterpart of the original operator. Example:
Unfortunately, this assumption forces us to make high A B ˆ A ‡ … B† or A=B ˆ A  …1=B†.
amount of computations when evaluating such an ex- 3. Rebuilt the binary tree into the tree where both
414
pression. But not all of this work is always inevitable. That commutative operators are viewed as n-ary, where n
is why we would like to return at least to the partial de- is as high as possible.
composition in the cases when it does not spoil the result. 4. In each node corresponding to a commutative operator,
Under the term decomposition we understand splitting make a permutation of its sequence of subtrees such
the primary expression into two or more new subexpres- that the subtrees sharing a variable are adjacent.
sions which have mutually disjoint sets of variables. 5. Go through the tree in the top-down direction and
If an expression cannot be further decomposed, we say condense all the subtrees containing the same variable
it is irreducible, otherwise it is reducible. into one single node.
The aim is to decompose the expression into subex-
More advanced methods should make use also of associ-
pressions as small as possible. Instead of the global com-
ativity and distributivity of the operations to ®nd possible
putation of the original expression, only these irreducible
decompositions of this type even when they are not
subexpressions must be computed ``globally''. This is the
possible in the original form.
key point, since the computational cost of the expression
does not grow linearly with the length of the expression in
the constrained fuzzy arithmetic, therefore it is more ad- 3.2
vantageous to evaluate globally individual subexpressions Classification
one after another and then put their subresults together Instead of using a general algorithm for evaluation of any
instead of the global computation of the whole original constrained fuzzy expression, we ®rst classify the expres-
expression. sion and then we use the method which is the most ef®cient
We ®nish the evaluation by putting the subresults for the corresponding class. The following structure of the
together. Since the decomposition guarantees that there is set of all constrained fuzzy expressions was observed:
no equality constraint among the subexpressions, we can  Simple fuzzy expressions (class S) are those which do
use the standard fuzzy arithmetics in this step. not contain any fuzzy variable more than once, no
Example of decomposition: equality constraint can occur and therefore they can be
handled as in the standard (unconstrained) fuzzy
……C  A  …A ‡ B††  C ‡ D†CFA
arithmetic.
ˆ …A  …A ‡ B††CFA …C  C†CFA ‡ D
Example: A ‡ B ‡ 1:
It is not trivial to implement an ef®cient general procedure
 Monotonic equality-constrained fuzzy expression (class
for the maximum decomposition of expressions. On the
M) is monotonic with respect to all variables on the
other hand, at least an imperfect decomposition would be
domain given by the cartesian product of supports of
helpful as well.
all considered fuzzy variables. For each a 2 …0; 1Š, the
We show an easy example of such an imperfect de-
two bounds of the a-cut of the result can be computed
composition procedure. It consists of several steps (Fig. 1):
directly.
Example: 2  A A ‡ B  B  B:
Very often monotonicity is achieved only under some
assumption on the variables (which can be easily
checked).
Example: A  A B=C, where A is nonnegative and
02SuppB
j [ SuppC.
The computational complexity is the same as for
standard fuzzy arithmetic ± it grows linearly with the
length of the expression.
 For the vertex equality-constrained fuzzy expressions
(class V) the following holds: For each expression E in
V with variables A1 ; . . . ; An and b 2 …0; 1Š, the bounds
of the interval b E are of the form E…~ Q a~
x†, where x is a
vertex of the multidimensional
Q interval in A i for
Fig. 1. The effect of permutation and condensation some a 2 ‰b; 1Š or ~x 2 in 1 Ai .
Example: …p  A ‡ q  B†  …p  A ‡ q  B†; where p; q 2 R: Fortunately, polynomials of small orders do not pro-
duce signi®cant errors. On the contrary, a polynomial of
This class still admits an effective calculation by a
high order with malicious parameters could severely en-
method which we call the vertex algorithm [5]. The only
danger the correctness of the result when using small k.
problem remains with the 1-cuts (=cores); here the
But the computational cost of the solution which would
global search has to be performed. (For fuzzy numbers,
®nd their extremes reliably would be probably signi®-
the cores are singletons and no problem arises.)
cantly higher. We can only believe that such polynomials
 Equality-constrained fuzzy expressions (class G) form
usually do not occur in the area of practical fuzzy appli-
the most general class satisfying no special assump-
cations. The higher degree of a polynomial may occur, the
tions.
higher number of a-cuts is to be used.
Obviously, S  M  V  G. All these four classes are Let us describe the vertex algorithm for evaluating an
415
closed under decomposition. expression f …~
x† in details:
1. Let a :ˆ 1; choose k as the number of a-cuts; D :ˆ k 1 1
3.3
(the step for decreasing a)
Vertex algorithm
2. By some iterative method ®nd or estimate values of
The class V is the largest class from our hierarchy where
variables MAX and MIN as maximum and minimum of
an ef®cient evaluation is still possible. It is broader than
the given function in the domain given by cores of the
the class M, since for some nonmonotonic expressions
fuzzy intervals which were used as operands, and save
the extreme values can be found on the vertices of the
them as two ordered pairs, hMIN; 1i and hMAX; 1i
multidimensional intervals determined by the a-cuts.
3. Let a :ˆ a D
Trying to facilitate the computation, we returned to the
4. Construct the set S :ˆ f~
x1 ;~
x2 ; . . . ;~
x2n g of all vertices of
method of examining only the endpoints. Instead of
the multidimensional crisp interval corresponding to
searching in the multidimensional interval, we compare
the new a-cuts (n is the number of distinct variables)
only the values in its vertices. For k (the number of a-
5. Let
cuts) suf®ciently large, we may expect that the expression !
satisfying the requirements of the class V is ``almost'' [
monotonic between the borders of two successive a-cuts. MAX :ˆ max f …~
x† [ fMAXg
If the continuous function is not monotonic over the ~
x2S
whole domain, it is at least piecewise continuous. 6. Let
Increasing k, we get closer and closer to the endpoints !
[
of these pieces. MIN :ˆ min f …~
x† [ fMINg
Naturally, this expectation decays in the case when ~
x2S
there is some constant segment of the membership func- 7. Save couples hMAX; ai and hMIN; ai
tion of any operand within the support of this operand. 8. If a > 0 goto 3
This cannot happen if we take into account only trape- 9. Reconstruct the resulting fuzzy set from the saved
zoidal fuzzy sets (including special cases ± fuzzy numbers, couples
real numbers and crisp intervals). Then the only regions
of nonzero constant membership functions are the cores. Under some special circumstances (hardware implemen-
Unfortunately, it is a very frequent case that ``something tation, real-time software application, lazy programmer)
happens'' in the cartesian product of cores, e.g., A  A it may happen that the second step brings unpleasant
when A is the trapezoidal fuzzy number h 2; 1; 1; 2i; we complications. We may avoid them by admitting only
do not want to loose this sort of CFA expressions. The fuzzy operands with singleton cores ± fuzzy numbers.
conclusion is that the extensive search of extremes in the The asymptotic computational complexity of the
cartesian product of the cores should be performed as above algorithm is O…k  2n †. The good news is that the
well. complexity is proportional to the desired resolution.
Now, if we proceed in the top-down direction along the From the theoretical point of view, the bad news is the
membership value axis (a is decreasing), we can approx- exponential growth with respect to the number of dis-
imate both extremes of the current multidimensional tinct fuzzy operands (occurrence of crisp real numbers
interval as the maximum or minimum of values at all its as operands does not make it worse, at least asymptoti-
vertices and the extremes from the preceding a-cut, which cally). It is the penalty caused by the fact that the com-
is a subset of the current one. Only the multidimensional putation must be done globally and cannot be further
interval formed by the cores of individual fuzzy intervals decomposed.
should be explored in a more exhaustive way, because it
has no preceding subset. 3.4
In contrast to the evaluation of expressions from the Class G
class M, this is really an approximation. When increasing k There is still the sound kernel of the class G which with-
for expressions from the class M, we only get more stands all our simplifying attacks. There are two remaining
``points'' for the horizontal representation, all of them possibilities, both of them are very unpleasant. Either we
being exact. But when computing an expression from the can use some sophisticated symbolic method with all its
class V which contains higher order polynomials, the implementation dif®culties or we can waste time with an
resulting ``points'' could be inexact for ®nite k. iterative search.
When performing the iterative search, we start from 1- Appendix
cuts and proceed to lower cuts, using the extremes already Implementation of the vertex algorithm
calculated. For each a-cut, a < 1, we search for new ex- For the implementation we have chosen Matlab 5.3. If the
tremes only on the boundary of the respective multidi- computation is fast enough in Matlab, it should be suf®-
mensional interval and compare them to the extremes ciently fast everywhere. Matlab eases the visualization of
already calculated. The complexity can be of order un . fuzzy sets, it also allows very elegant processing of vertices
In the search for local extremes on the boundary of each of a multidimensional interval by its vector operators.
a-cut, we can use the local extremes from the next higher a- The whole system consists of several m-®les which can
cut as initial values. An extensive search for global extremes be downloaded in the zipped form from
could be performed after several a-cuts. If new local ex-
http : ==cmp:felk:cvut:cz=enavara=cfa
tremes are found for this a-cut, we return to the preceding
416
a-cuts for veri®cation, otherwise we take the preceding or
results as de®nite and proceed to the next lower a-cut.
ftp : ==cmp:felk:cvut:cz=pub=cmp=articles=navara=cfa
However, the decomposition sometimes allows to avoid
the search in a high-dimensional space at all even if the
expression does not belong to the class V. Let us The most important are the following:
demonstrate it on this example: the expression  view.m enables a user-friendly parameterization of six
E ˆ ……1 …A 1†  …A 1††  B†CFA linguistic variables denoted by a; b; . . . ; f . Single-arrow
with triangular fuzzy numbers A ˆ B parameterized by buttons change the corresponding parameter by 0.1,
h0; 1; 2i is decomposed into three irreducible subformulas: double-arrow buttons increase or decrease it by 1.
1, …A 1†  …A 1† and B. The ®rst subexpression is con-  cfa.m serves for fuzzy expression evaluation. The user
stant (class S), the second one belongs to the class V and the can observe the result in the classical fuzzy arithmetic
vertex algorithm can be applied to it, the third one is again as well as in the constrained fuzzy arithmetic. He/she
in the class S. If we proceed along the a-axis in the top- can also change the number of a-cuts. The HTML
down direction, we can easily determine the bounds of the document which includes the expression, the images
corresponding a-cuts. After putting the subresults together, with all operands, and with both resulting curves can be
we obtain E with Supp E ˆ …0; 2†. This result could not be automatically exported. The outcoming ®le
achieved by applying the vertex algorithm to the whole index.html with all related JPEGs is saved in the
expression. The expression E belongs only to the class G, subdirectory export.
not to the class V, although all its irreducible components When solving the generally problematic second step of the
belong to the class V. What is important, the computational algorithm ± ®nding the global optimum in multidimen-
complexity of E is not higher than that of the class V. The sional interval given by cores of operands ± we use Matlab
conclusion is that after combining the vertex algorithm standard function fmins.
with the decomposition into irreducible expressions the A sample session in Matlab may look like this:
region of solvable problems again slightly grows.
>> cdc : nProjectsnCfa
Let us modify the latter expression:
F ˆ ……1 …A 1†  …A 1† ‡ B B ‡ C†  B†CFA : >> view
Although it is equivalent to >> view . . .several views for parameterization can be
used simultaneously in order to make all used operands
……1 …A 1†  …A 1† ‡ C†  B†CFA ; visible. After executing them, the user should push the
here the previous trick cannot be applied since F is irre- button Init in order to initiate the parameterization.
ducible. It seems we will have to explore a continuous >> cfa . . . and now the user is free to make experi-
three-dimensional space. Luckily, we know that the ments.
expression is increasing with respect to B and C. Hence, If it is required to compute and display either the
instead of a time-consuming search in the whole volume of constrained or the standard arithmetic result, it is possible
this three-dimensional interval, we have to search along its to set variables constrained or unconstrained to 0 (or
edges in direction A only. We did not eliminate the search inversely to 1, when turning it on) in the Matlab command
in the continuous space, but we reduced the problem by line. The following statement switches off the constrained
two dimensions. half of a process:
4 >> constrained ˆ 0
Conclusion When it is desirable to change the number of a-cuts, we
The performance of the constrained fuzzy arithmetic with can set the variable cutsN.
an acceptable ef®ciency is a highly nontrivial task. We
suggested several hints that simplify the calculations for >> cutsN ˆ 8
some classes of expressions. An ef®cient implementation Tests of speed gave the following results: For 10 a-cuts and
would require special procedures for various types of 6 different fuzzy operands, we have 10  26 evaluations in
expressions like in symbolic integration. The whole task the cycle between steps 3 and 8, altogether with the
could lead to programs using an approach similar to that overhead this takes not more than 4 s in Matlab on a
of computer algebra systems. 400 MHz PC. Unfortunately, during the second step of the
algorithm ± the exploration of the central core ``hyper- 2. Klir GJ (1997) The role of constrained fuzzy arithmetic in
block'' ± the fmins function takes more than 1 min. This engineering, Ayyub BM and Gupta MM (Eds), Uncertainty
is still the bottleneck of our implementation. Fortunately, Analysis in Engineering and Sciences: Fuzzy Logic, Statistics,
and Neural Network Approach, Dordrecht, Kluwer, 1±19
it does not degrade the algorithm, it only shows that 3. Klir GJ, Pan Y (1998) Constrained fuzzy arithmetic: basic
Matlab function fmins is not feasible for our purpose. questions and some answers, Soft Comput 2: 100±108
Using the function minimize in Maple Release 5, we get 4. Mares M (1994) Computation over Fuzzy Quantities, CRC
the output value in less than 0:5 s. Press, Boca Raton
We are aware that the ``unconstrained'' procedure is not 5. ZÏabokrtsky Z (2000) Constrained Fuzzy Arithmetic: Engineer's
very optimized in our implementation. It is included only View. Research Report CTU±CMP±2000±03, Center for
for the sake of comparison of outputs. Machine Perception, Czech Technical University, Prague,
Czech Republic
6. Zadeh LA (1975) The concept of a linguistic variable and its 417
References applications to approximate reasoning, Part I, II, III, Inform
1. Kaufmann A, Gupta MM (1991) Introduction to Fuzzy Arith- Sci 8: 199±251, 301±357, 9: 43±80
metic Theory and Applications, International Thomson
Computer Press, London

Das könnte Ihnen auch gefallen