Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

A Primer on Fuzzy Logic

Throughout this chapter, we’ve dealt with propositions. Of course, the propositions had truth values of either 0 or 1. This precision is essential when dealing with mathematical entities like algebraic expressions, geometric shapes, or some other construct.

What happens when we deal with statements such as

“It is cold.”?

Depending on who you ask, you may get definite answers such as “yes” or “no.” Other people may qualify their answer. Some people might say “it’s only a little cold” or “it’s slightly less than lukewarm.” Fuzzy logic gives us a way to deal with statements like “it is cold” that allow for uncertainty or imprecision in the answer.

Fuzzy Truth Values

The key insight to dealing with imprecise statements is to understand how to quantify answers.

Example 1.12.1

Consider the statement

“it is cold.”

If it happens to be absolute zero (0 degrees kelvin), then we could certainly say that the truth value of the above statement is 1.

But, what happens when the day is sort of below lukewarm? If we feel like the temperature is right on the cusp between hot and cold, we may describe the temperature as “halfway” between cold and hot.

Notice though that halfway is the same thing as saying 50%, which in decimal form is 0.5. Maybe we just say that the (fuzzy) truth value of the statement “it is cold” is equal to 0.5.

Going off this strategy, if we were in the north pole, we may say that the statement “it is cold” has a fuzzy truth value of 0.9.

Likewise, if we were to somehow be able to stand on the surface of the sun without perishing, we may say that the fuzzy truth value of the statement “it is cold” may be equal to 0.00000001, or some other number super close to 0 such as 10-10000.

Consider a proposition p that has a fuzzy truth value. We have that

0 ≤ p ≤ 1

where 0 represents complete falsity, and 1 represents complete truth.

Figure 1.12.1: The range of values for fuzzy truth values.

In Example 1.12.1, we allowed for a range of possible numbers for our fuzzy truth values. We still allowed for the numbers 0 (representing complete falsity) and 1 (representing complete truth.) But now, we’re also including every number between 0 and 1. As such, we have that

0 ≤ fuzzy truth value ≤ 1.

The name “fuzzy” really just comes from the fact that certain situations are unclear or fuzzy. Some statements are context-sensitive, so using a range of values gives us the flexibility to deal with in a meaningful way.

Fuzzy Negation, Fuzzy Conjunction, and Fuzzy Disjunction

With the basic idea now firmly in grasp, we start to look at the normal logical operations of negation, conjunction, and disjunction using fuzzy logic.

Example 1.12.2

Reconsider the statement “it is cold.”

Naturally, we may want to consider a statement like “it is hot” to be the opposite of “it is cold.” So when we consider the temperature of absolute zero, we’d have that

“it is cold” = 0
“it is hot” = 1.

But for the north pole, we’d again probably have something akin to

“it is cold” = 0.9.

But then what about “it is hot?” What is the opposite value of 0.9? Remember that we have to stay in the range from 0 to 1 inclusive. Well, perhaps since 0.9 is 0.1 away from 1, perhaps we should say that “it is hot” has a fuzzy truth value that is 0.1 away from 0. As such, we would have that

“it is hot” = 0.1.

Another way to think of this is that 0.9 is 90% of the interval from 0 to 1. So perhaps we say the remaining 10% goes to the statement “it is hot.”

In other words,

“it is cold” + “it is hot” = 1.

That of course means that

“it is hot” = 1 – “it is cold.”

Using the ¬ symbol from propositional logic, we have that

“it is hot” = ¬”it is cold,”

finally giving us that

¬”it is cold” = 1 = “it is cold.”

For a fuzzy proposition p, we denote the negation of p as ¬p, and we say that

¬p = 1 – p.

Figure 1.12.2: The negation of a fuzzy proposition.

The example suggests that to find the fuzzy truth value of a proposition’s negation, we simply subtract the proposition’s fuzzy truth value from 1. To denote the negation of a proposition, we still use the ¬ symbol, and so we have that

¬p = 1 – p

for any proposition p with fuzzy truth values.

Notice this also holds for normal propositional logic as well:

p = 1, ¬p = 1 – 1 = 0
p = 0, ¬p = 1 – 0 = 1

Example 1.12.3

Consider the following propositions:

α:“The North Pole is cold.”
β:“Canada is cold.”

Suppose we have that α = 0.9 and that β = 0.7.

Consider the statement “The North Pole and Canada are cold” which we could represent as α ∧ β. What is the fuzzy truth value of α ∧ β? Remember that for propositional logic, both statements must be true in order for the conjunction to be true.

One way to look at this scenario is that any false propositions in a conjunction force the value of the conjunction to be 0. False propositions drag down the value of the conjunction. As such, the propositional conjunction can be thought of the minimum value of any proposition within the conjunction.

As such, we could say that

α ∧ β = min(α, β) = min(0.9, 0.7) = 0.7.

Analogously, for disjunction, we could simply take the maximum value:

α ∨ β = max(α, β) = max(0.9, 0.7) = 0.9.

For fuzzy propositions a and b, we have that the fuzzy conjunction, denoted ∧, is given by

a ∧ b = min(a, b).

Likewise, the fuzzy disjunction, denoted ∨, is given by

a ∨ b = max(a, b).

Figure 1.12.3: The fuzzy conjunction, and fuzzy disjunction, of a and b.

We can compare the fuzzy conjunction and disjunction to the propositional conjunction and disjunction using truth values of 0 and 1 to see that the exact same results are gained either way:

pqp ∧ q
(Propositional)
p ∧ q
(Fuzzy)
0000
0100
1000
1111
Comparing the propositional conjunction to the fuzzy conjunction.
pqp ∨ q
(Propositional)
p ∨ q
(Fuzzy)
0000
0111
1011
1111
Comparing the propositional disjunction to the fuzzy disjunction.

The Fuzzy Exclusive-Or

Now that we’ve got a handle on the fuzzy negation, conjunction, and disjunction, we’re ready to start figuring out the other fuzzy operators. Specifically, we can look at the exclusive-or operation. Recall from this section that the exclusive-or operation can be restated using only the negation, conjunction, and disjunction operators like so:

p ⊻ q = (¬p ∧ q) ∨ (p ∧ ¬q).

To get the fuzzy counterpart of the exclusive-or operation, we just take the fuzzy counterparts of negation, conjunction, and disjunction:

p ⊻ qReason
=(¬p ∧ q) ∨ (p ∧ ¬q)p ⊻ q = (¬p ∧ q) ∨ (p ∧ ¬q)
=max(¬p ∧ q, p ∧ ¬q)p ∨ q = max(p, q)
=max(min(¬p, q), min(p, ¬q))p ∧ q = min(p, q)
=max(min(1 – p, q), min(p, 1 – q))¬p = 1 – p

This leads us to the following result:

p ⊻ q = max(min(1 – p, q), min(p, 1 – q)).

Notice here, that we are simply using equals = signs instead of double headed arrows ⟺. Here, we are simply trying to get the numerical values for each kind of proposition.

The Fuzzy Implication and Fuzzy Biconditional

Just like with the exclusive-or, there are also fuzzy counterparts to the implication and biconditional. We start by looking at the fuzzy implication.

Recall from this section that

p → q ⟺ ¬p ∨ q.

We thus get the following result:

p → qReason
=¬p ∨ qp → q ⟺ ¬p ∨ q
=max(¬p, q)p ∨ q = max(p, q)
=max(1 – p, q)¬p = 1 – p

This gives us the following result:

p → q = max(1 – p, q).

Recall from this section that we have the following logical equivalency:

p ↔ q ⟺ (p ∧ q) ∨ (¬p ∧ ¬q).

Let’s do the same thing we’ve been doing thus far:

p ↔ qReason
=(p ∧ q) ∨ (¬p ∧ ¬q)p ↔ q ⟺ (p ∧ q) ∨ (¬p ∧ ¬q)
=max(p ∧ q, ¬p ∧ ¬q)p ∨ q = max(p, q)
=max(min(p, q), min(¬p, ¬q))p ∧ q = min(p, q)
=max(min(p, q), min(1 – p, 1 – q))¬p = 1 – p

Let a and b be fuzzy propositions, we have that

a → b = max(1 – a, b)

and

a ↔ b = max(min(a, b), min(1 – a, 1 – b))

Figure 1.12.4: The fuzzy implication, and the fuzzy biconditional.

This is the final result we get:

p ↔ q = max(min(p, q), min(1 – p, 1 – q)).

With this, we have the basic operations for fuzzy logic in place.

Applications of Fuzzy Logic

Fuzzy logic has a wide range of applications, some of which are briefly discussed here.

  • Home Appliance Enhancement
    • Many home appliances can incorporate fuzzy logic to help them maximize utility while minimizing energy usage. Some notable examples include washing machines being able to automatically adjust their internal settings based on how much clothing is being washed, and how dirty that clothing is.
  • Automotive System Performance
    • Self-driving is only one of many systems in a vehicle that can make use of fuzzy logic. Other systems that are enhanced with fuzzy logic include the anti-lock braking system, and the automatic transmission system.
  • Consumer Electronics
    • In addition to perfectly cooking rice, fuzzy logic is incorporated into more and more consumer electronics products. Digital cameras and smartphones make heavy use of fuzzy logic throughout the entire operative process.
  • Traffic Control Systems
    • Modern traffic systems can make use of fuzzy logic to help optimize traffic flow by adjusting traffic light timing based on real-time sensory data.
  • Finance and Investment
    • Investment firms can use fuzzy logic to optimize portfolio performance, and credit firms can assess credit-worthiness using fuzzy logic as well.
  • Medicine
    • Modern medicine can make heavy use of fuzzy logic when it comes to disease identification and treatment planning. The entire diagnostic process can be enhanced based on models using fuzzy logic.
  • Robotics
    • Modern robots have sophisticated algorithms for controlling navigation, gripping, and general transportation systems based on fuzzy logic.
  • Process Control
    • Many industrial systems can be made to automatically increase performance given certain environmental constraints. Fuzzy logic is widely used throughout in regulating many aspects of these industrial systems, including temperature and quality control.