CSE-41XX
CS-4101 AI

Lecture 08.2: Fuzzy Expert Systems

Handling vagueness and ambiguity using Fuzzy Logic, membership functions, and the four steps of Fuzzy Inference.

In classical Boolean logic, everything is crisp: a statement is either True (11) or False (00). However, human experts rarely think in binary. An expert might say:

"Though the power transformer is slightly overloaded, I can keep this load for a while."

While another human expert easily understands this statement, a knowledge engineer faces immense difficulty representing such vague and ambiguous terms in traditional binary computer logic.

Fuzzy Logic, introduced by Lotfi Zadeh (Professor and Head of Electrical Engineering at UC Berkeley) in his landmark 1965 paper "Fuzzy sets", resolves this challenge by formalizing fuzziness—mirroring the intrinsic way people think, make decisions, and interpret natural language qualifiers.


Crisp Sets vs. Fuzzy Sets

Unlike two-valued Boolean logic, fuzzy logic is multi-valued, dealing in Degrees of Membership where truth values range continuously in the interval [0.0,1.0][0.0, 1.0].

Logical Value Range: Crisp vs. Fuzzy

  • Boolean (Crisp) Logic: Binary step-threshold (Black or White, {0,1}\{0, 1\}).
  • Fuzzy Logic: Continuous multi-valued spectrum (Shades of Grey, [0.0,1.0][0.0, 1.0]).

The Boundary Problem: Degree of Membership of 'Tall Men'

Consider evaluating a group of individuals to determine whether they belong to the set of "Tall Men". Under a crisp definition, anyone 180 cm\ge 180\text{ cm} is considered tall (11), and anyone <180 cm< 180\text{ cm} is not (00).

NameHeight (cm)Crisp Membership (μCrisp\mu_{\text{Crisp}})Fuzzy Membership (μFuzzy\mu_{\text{Fuzzy}})
Chris20811.00
Mark20511.00
John19810.98
Tom18110.82
David17900.78
Mike17200.24
Bob16700.15
Steven15800.06
Bill15500.01
Peter15200.00

[!IMPORTANT] The Crisp Boundary Paradox: Under crisp logic, Tom (181 cm) is tall (11), whereas David (179 cm) is NOT tall (00), despite a negligible 2 cm height difference. Fuzzy set theory eliminates this artificial boundary by assigning Tom a membership degree of 0.820.82 and David 0.780.78.


Set Representation & Zadeh's Notation

1. Mathematical Definitions

  • Crisp Set: Membership function μA(x)\mu_A(x) is strictly binary:

μA(x)={1if xA0if xA\mu_A(x) = \begin{cases} 1 & \text{if } x \in A \\ 0 & \text{if } x \notin A \end{cases}

  • Fuzzy Set: Membership function μA(x)\mu_A(x) is a continuous mapping:

μA(x)[0.0,1.0]\mu_A(x) \in [0.0, 1.0]

2. Zadeh's Notation for Discrete Fuzzy Sets

A discrete fuzzy set AA is represented using Zadeh's Notation:

A=i=1nμi/xi=μ1/x1+μ2/x2++μn/xnA = \sum_{i=1}^{n} \mu_i / x_i = \mu_1/x_1 + \mu_2/x_2 + \dots + \mu_n/x_n

[!CAUTION] Zadeh Notation Interpretation:

  • The slash / is not division; it links membership degree μi\mu_i to element xix_i (degree/element\text{degree} / \text{element}).
  • The + and \sum symbols represent set union, not arithmetic addition.
  • Crisp Example: Acrisp={0/152+0/167+1/198}{198}A_{\text{crisp}} = \{0/152 + 0/167 + 1/198\} \equiv \{198\}
  • Fuzzy Example: Afuzzy={0.0/152+0.15/167+0.98/198}A_{\text{fuzzy}} = \{0.0/152 + 0.15/167 + 0.98/198\}

3. Multi-Membership Example: Body Temperature

A patient with a body temperature of 38C38^\circ\text{C} can belong to multiple fuzzy sets concurrently:

low temp={(1,35),(1,36),(0,37)}\text{low temp} = \{ (1, 35), (1, 36), (0, 37) \} normal temp={(0,36),(1,36.8),(0,37.2)}\text{normal temp} = \{ (0, 36), (1, 36.8), (0, 37.2) \} raised temp={(0,37),(1,37.8),(0.9,38),(0.39,39.2)}\text{raised temp} = \{ (0, 37), (1, 37.8), (0.9, 38), (0.39, 39.2) \} strong fever={(0,37.5),(0.5,39.5),(0.9,41)}\text{strong fever} = \{ (0, 37.5), (0.5, 39.5), (0.9, 41) \}

At 38C38^\circ\text{C}, the patient has raised temperature to degree 0.90.9 and strong fever to degree 0.10.1.


Linguistic Variables and Values

  • Linguistic Variable: A variable whose values are words or natural language phrases (e.g., Project Funding, Project Staffing, Risk).
  • Linguistic Value: The fuzzy set labels qualifying the linguistic variable.
Linguistic VariableTypical Linguistic Values (Fuzzy Sets)
Project Funding (xx)Inadequate (A1A_1), Marginal (A2A_2), Adequate (A3A_3)
Project Staffing (yy)Small (B1B_1), Large (B2B_2)
Risk Level (zz)Low (C1C_1), Normal (C2C_2), High (C3C_3)

The Four Steps of Fuzzy Inference

Fuzzy inference formulates a mapping from crisp inputs to a crisp output through four sequential steps:


Step-by-Step Benchmark: Project Risk Evaluation (2 Inputs, 1 Output)

Rules in the Knowledge Base

Rule IDAbstract FormulationConcrete Problem Formulation
Rule 1IF xx is A3A_3 OR yy is B1B_1 THEN zz is C1C_1IF project_funding is adequate OR project_staffing is small THEN risk is low
Rule 2IF xx is A2A_2 AND yy is B2B_2 THEN zz is C2C_2IF project_funding is marginal AND project_staffing is large THEN risk is normal
Rule 3IF xx is A1A_1 THEN zz is C3C_3IF project_funding is inadequate THEN risk is high

Step 1: Fuzzification

Given crisp numerical inputs x1x_1 (project_funding) and y1y_1 (project_staffing), we determine their degree of membership in each linguistic fuzzy set:

  • Project Funding (x1x_1):
    • μA1(x1)=0.5\mu_{A1}(x_1) = 0.5 (inadequate)
    • μA2(x1)=0.2\mu_{A2}(x_1) = 0.2 (marginal)
    • μA3(x1)=0.0\mu_{A3}(x_1) = 0.0 (adequate)
  • Project Staffing (y1y_1):
    • μB1(y1)=0.1\mu_{B1}(y_1) = 0.1 (small)
    • μB2(y1)=0.7\mu_{B2}(y_1) = 0.7 (large)

Step 2: Rule Evaluation

We evaluate rule antecedents using standard fuzzy logic operators:

  • Fuzzy Disjunction (OR / Optimistic): Evaluated using the maximum operator (max\max).

ABmax(A,B)A \vee B \triangleq \max(A, B)

  • Fuzzy Conjunction (AND / Pessimistic): Evaluated using the minimum operator (min\min).

ABmin(A,B)A \wedge B \triangleq \min(A, B)

Evaluating Rule Antecedents:

  1. Rule 1 (Disjunction): IF xx is A3A_3 (0.00.0) OR yy is B1B_1 (0.10.1):

μRule 1(z)=max[μA3(x),μB1(y)]=max[0.0,0.1]=0.1    Risk is Low (C1) to degree 0.1\mu_{\text{Rule 1}}(z) = \max[\mu_{A3}(x), \mu_{B1}(y)] = \max[0.0, 0.1] = 0.1 \quad \implies \text{Risk is Low } (C_1) \text{ to degree } 0.1

  1. Rule 2 (Conjunction): IF xx is A2A_2 (0.20.2) AND yy is B2B_2 (0.70.7):

μRule 2(z)=min[μA2(x),μB2(y)]=min[0.2,0.7]=0.2    Risk is Normal (C2) to degree 0.2\mu_{\text{Rule 2}}(z) = \min[\mu_{A2}(x), \mu_{B2}(y)] = \min[0.2, 0.7] = 0.2 \quad \implies \text{Risk is Normal } (C_2) \text{ to degree } 0.2

  1. Rule 3 (Single Antecedent): IF xx is A1A_1 (0.50.5):

μRule 3(z)=μA1(x)=0.5    Risk is High (C3) to degree 0.5\mu_{\text{Rule 3}}(z) = \mu_{A1}(x) = 0.5 \quad \implies \text{Risk is High } (C_3) \text{ to degree } 0.5


Step 3: Aggregation

Aggregation is the process of unifying the outputs of all fuzzy rules into a single aggregate fuzzy set. Applying the evaluated antecedent truths to their respective consequent membership curves yields an overall risk output profile:

  • Low Risk (C1C_1) to degree 0.10.1
  • Normal Risk (C2C_2) to degree 0.20.2
  • High Risk (C3C_3) to degree 0.50.5

Step 4: Defuzzification

Defuzzification converts the aggregate output fuzzy set into a single crisp numerical value.

Using the Centroid Method (finding the center of gravity of the combined area under the curve), the aggregate fuzzy risk profile is converted into a definitive risk index:

Crisp Output Risk=67.4%\text{Crisp Output Risk} = \mathbf{67.4\%}


Concluding Remarks

Fuzzy Expert Systems bridge the gap between human natural reasoning and precise computer algorithms. While traditional rule-based systems require rigid binary boundaries, fuzzy systems accommodate vagueness and linguistic terms seamlessly. However, designing fuzzy systems requires careful domain expertise to define membership function shapes and rule sets appropriately.

On this page