Many everyday concepts, tall, hot, young, have no sharp boundary. Fuzzy sets give a mathematical way to handle such vagueness.
Crisp versus Fuzzy Sets
In a crisp (classical) set an element either belongs or does not: membership is 0 or 1. In a fuzzy set (Zadeh, 1965) membership is a degree between 0 and 1. A fuzzy set A on a universe X is described by its membership function μ_A(x): X → [0, 1]. For "tall", a person of 150 cm may have μ = 0, 170 cm perhaps 0.5, and 190 cm 1. Fuzziness is not probability: probability concerns uncertainty about whether an event occurs, fuzziness concerns the degree to which a vague property holds.
Definition: Fuzzy set. A set whose elements have degrees of membership between 0 and 1, described by a membership function.
Membership Functions
Common shapes: triangular (a, b, c): μ rises linearly from 0 at a to 1 at b and falls to 0 at c; trapezoidal; Gaussian; and sigmoid. For a triangular set "warm" with a = 20, b = 30, c = 40 °C, a temperature of 25 °C has μ = (25 − 20)/(30 − 20) = 0.5.
Operations
For fuzzy sets A and B: union μ_{A∪B}(x) = max(μ_A(x), μ_B(x)); intersection μ_{A∩B}(x) = min(μ_A(x), μ_B(x)); complement μ_{A'}(x) = 1 − μ_A(x). Other properties: support, core, α-cut, height, normal fuzzy sets (height 1). Unlike crisp sets, A ∪ A' need not be the universe and A ∩ A' need not be empty.
Fuzzy Logic and Applications
Linguistic variables (temperature) take linguistic values (cold, warm, hot) defined by fuzzy sets. A fuzzy inference system has four steps: fuzzification (crisp input to membership degrees), rule evaluation (IF temperature is hot AND humidity is high THEN fan speed is fast, with AND as min), aggregation of rule outputs, and defuzzification (producing a crisp output, for example by the centroid method). Fuzzy controllers run washing machines, air-conditioners, camera auto-focus, anti-lock brakes, metro trains and rice cookers.
Table 3.10: Fuzzy set operations
| Operation | Formula | Meaning |
|---|---|---|
| Union | max(μA, μB) | Belongs to A or B |
| Intersection | min(μA, μB) | Belongs to A and B |
| Complement | 1 − μA | Does not belong to A |
Example 3.10: Fuzzy operations
Problem: A = {a: 0.2, b: 0.7, c: 1.0} and B = {a: 0.5, b: 0.3, c: 0.6}. Find the union, intersection and complement of A.
Solution:
- Union by max: a 0.5, b 0.7, c 1.0.
- Intersection by min: a 0.2, b 0.3, c 0.6.
- Complement of A by 1 − μ: a 0.8, b 0.3, c 0.0.
Result: A ∪ B = {0.5, 0.7, 1.0}; A ∩ B = {0.2, 0.3, 0.6}; A′ = {0.8, 0.3, 0.0}.
A = {"a": 0.2, "b": 0.7, "c": 1.0}
B = {"a": 0.5, "b": 0.3, "c": 0.6}
print("union ", {k: max(A[k], B[k]) for k in A})
print("intersection", {k: min(A[k], B[k]) for k in A})
print("complement A", {k: round(1 - v, 1) for k, v in A.items()})
def warm(t, a=20, b=30, c=40):
if t <= a or t >= c:
return 0.0
return (t - a) / (b - a) if t <= b else (c - t) / (c - b)
print("warm(25) =", warm(25), " warm(30) =", warm(30))
Output
union {'a': 0.5, 'b': 0.7, 'c': 1.0}
intersection {'a': 0.2, 'b': 0.3, 'c': 0.6}
complement A {'a': 0.8, 'b': 0.3, 'c': 0.0}
warm(25) = 0.5 warm(30) = 1.0
Common mistakes
- Treating membership degree as probability.
- Using sum or product for fuzzy union and intersection in the standard (Zadeh) form; the standard operators are max and min.
- Expecting A ∪ A′ to be the whole universe.
- Forgetting the defuzzification step in a fuzzy controller.
Key takeaways
- Fuzzy membership is a degree in [0, 1].
- Union = max, intersection = min, complement = 1 − μ.
- Fuzzy inference: fuzzify, evaluate rules, aggregate, defuzzify.
- Fuzziness (vagueness) differs from probability (uncertainty).
Practice questions
- What is a membership function?
- Give the fuzzy union and intersection operators.
- Name two applications of fuzzy logic.
Answers to the practice questions
- A function giving each element's degree of membership in a fuzzy set, from 0 to 1.
- Union is max and intersection is min of the membership values.
- Washing machines and air-conditioner controllers (also camera focus, ABS, metro trains).
Sources
- Official BCA syllabus Artificial Intelligence, course code 26BCA404DS04, Unit III
