This is documentation for an obsolete product.

 1.9 Fuzzy Arithmetic 1.9.1 Introduction Fuzzy Logic provides a number of functions for performing fuzzy arithmetic. In this chapter, we will demonstrate these functions and the options associated with each function. This loads the package. In[1]:= The arithmetic operations described in this chapter are designed to work with triangular or trapezoidal fuzzy numbers. The arithmetic functions are a little different than the rest of Fuzzy Logic's functions in that they operate on lists of numbers that represent vertices of fuzzy sets, rather than fuzzy sets themselves. This makes working with these operations a little awkward, but we show a convenient way to work with these functions in this section. For fuzzy arithmetic operations that work on actual fuzzy sets, see Chapter 1.10 Discrete Fuzzy Arithmetic. First we need to set up an appropriate universal space. Since we are working with fuzzy numbers, and since they can be positive or negative, our universal space should be semiotic around zero. The universal space should also be big enough so that the results of the arithmetic operations will still fall within the universal space. We change the default setting for universal space using the SetOptions command. In[2]:= Now that the universal space is defined, we need some fuzzy numbers. As mentioned earlier, these operations work on lists of vertices, so we create two lists now, which represent two triangular fuzzy numbers. In[3]:= In[4]:= We can convert the list of vertices, num1 and num2, into actual fuzzy sets using the FuzzyTrapezoid function. You can look at the results with the FuzzyPlot function. In[5]:= In[6]:= In[7]:= 1.9.2 Fuzzy Arithmetic Functions Fuzzy arithmetic operations. Fuzzy Addition FuzzyPlus[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the sum of the fuzzy numbers represented by the two lists. The fuzzy sum is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use the ReleaseHold function. In[8]:= Out[8]= The result of the fuzzy addition of the two fuzzy numbers is an unevaluated fuzzy trapezoid. To evaluate the result as a normal fuzzy set, you must use Mathematica's ReleaseHold function. Below we plot our two original fuzzy sets with their sum. Notice the use of the ReleaseHold function. In[9]:= Fuzzy Subtraction FuzzyMinus[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the fuzzy difference between the two fuzzy numbers represented by the two lists. The fuzzy difference is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use ReleaseHold. In[10]:= Out[10]= The fuzzy difference between the two fuzzy numbers is returned in the same form as the fuzzy sum. Here we plot the original fuzzy sets with their fuzzy difference. In[11]:= Multiplication by a Constant FuzzyConstantTimes[{a, b, c, d}, k] returns the fuzzy number that is the result of the multiplication of constant k by the fuzzy number represented by the list, {a, b, c, d}. The result is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use ReleaseHold. In[12]:= Out[12]= In[13]:= Fuzzy Image FuzzyImage[{a, b, c, d}] returns the image of the fuzzy number represented by the list {a, b, c, d}. The result is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use ReleaseHold. In[14]:= Out[14]= The image of a fuzzy set is a new fuzzy set that is a mirror image of the first one flipped around zero. Here is a plot of our first fuzzy set and its image. In[15]:= Fuzzy Multiplication FuzzyMultiply[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the product of the fuzzy numbers represented by the two lists. The fuzzy product is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use the ReleaseHold function. In[16]:= Out[16]= The result of the fuzzy multiplication of the two fuzzy numbers is an unevaluated fuzzy trapezoid. To evaluate the result as a normal fuzzy set, we must use the ReleaseHold function. Next we plot the approximate result of the fuzzy product. In[17]:= Fuzzy Division FuzzyDivide[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the division of the fuzzy numbers represented by the two lists. The fuzzy division is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use the ReleaseHold function. In[18]:= Out[18]= The result of the fuzzy division of the two fuzzy numbers is an unevaluated fuzzy trapezoid. To evaluate the result as a normal fuzzy set, we must use the ReleaseHold function. Next we plot the approximate result of the fuzzy division. In[19]:=