This is documentation for an obsolete product.
Current products and services

 Documentation /  Fuzzy Logic /  Demonstration Notebooks /

Fuzzy Logic ControlDigital Fuzzy Sets and Multivalued Logic

2.6 Fuzzy Numbers

2.6.1 Introduction

This notebook deals with discrete fuzzy arithmetic operations. We'll be using Fuzzy Logic, along with standard Mathematica functions.

This loads the package.


2.6.2 Creating Fuzzy Numbers

When working with fuzzy numbers and performing fuzzy arithmetic, we should use a large universal space because the intervals over which fuzzy numbers are defined widen as arithmetic operations are performed. Also, like traditional numbers, fuzzy numbers can be negative or positive, so the universal space should be symmetric around zero. Taking this into consideration, we investigate fuzzy arithmetic with a universal space from -100 to 100. We change the default universal space to this range with the following command.


The following function is used to create fuzzy numbers. The function accepts an integer as its argument and returns a triangular fuzzy set centered around the integer. This is a common representation of a fuzzy number.


We can create a set of fuzzy numbers by using the function we just defined and Mathematica's Table function. Here we create fuzzy numbers ranging from NegSIX (Negative Six) to SIX.


2.6.3 Fuzzy Arithmetic

Shortening Arithmetic Names

The Fuzzy Logic package comes with a number of convenient functions for performing discrete arithmetic, but the names of these functions are quite long. To save some typing, we rename the functions here to shorten their names.


Using Infix Form

When performing arithmetic operations, it is traditional to write out the operation from left to right, with the sign for the operation to be performed located between the two numbers on which it is to be performed. To simulate the traditional form, we use Mathematica's infix form in the following examples. Instead of surrounding the operands with square brackets and the function name (e.g., Func[A, B]), the infix form locates the function name between the operands and surrounds the operand with tildes (e.g., A~Func~B). Let's look at the following example to see how this works. In this example, we perform fuzzy addition on the fuzzy numbers NegFOUR and THREE.



After defuzzifying the result with the MeanOfMax method, we see that the result is a fuzzy number centered around -1. This is the answer we would expect to get when performing the operation -4 + 3.


Example 1

The following example demonstrates the fuzzy equivalent of the operation: (5 - (-1)) * (-3)


By using the MeanOfMax defuzzification, we receive -18, which would be the solution to the equivalent nonvisual operation.


Example 2

In this example, we perform the fuzzy equivalent of the operation: -(5 + 3 - 4).


After defuzzification, we receive the expected result of -4.



A. Kaufmann and M. M. Gupta, Introduction to Fuzzy Arithmetic Theory and Application, Van Nostrand Reinhold, New York, 1991.

Z. Wang and G. J. Klir, Fuzzy Measure Theory, Plenum Press, New York, 1992.

Fuzzy Logic ControlDigital Fuzzy Sets and Multivalued Logic