Fuzzy relations
Fuzzy relations: definition as fuzzy subsets of Cartesian products, properties (reflexive, symmetric, transitive), operations (inverse, projection, max–min composition), fuzzy equivalence and transitive closure, with worked numerical examples and common mistakes.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Fuzzy relations let engineers model graded connections between items (not just yes/no). You use them in pattern matching, fuzzy inference (as relation composition), similarity clustering, and converting fuzzy rules into relation matrices for fuzzy controllers and hybrid systems.
Key ideas
Inverse relation: For R a fuzzy relation from X to Y, the inverse R^{-1} is a fuzzy relation from Y to X defined by μ_{R^{-1}}(y,x) = μ_R(x,y) for all x∈X, y∈Y.
Projection (domain and range) of a fuzzy relation:
- The domain projection (also called projection on X) of R: μ_{Dom(R)}(x) = sup_{y∈Y} μ_R(x,y).
- The range projection (projection on Y): μ_{Rng(R)}(y) = sup_{x∈X} μ_R(x,y). For finite sets, sup is max.
α-cut of a fuzzy relation: For α∈(0,1], the α-cut R_α is the crisp relation R_α = {(x,y) | μ_R(x,y) ≥ α} (a subset of X×Y). Strong α-cut uses > instead of ≥: R_α^+ = {(x,y) | μ_R(x,y) > α}. Note: if one allows α=0, the weak α-cut convention gives R_0 = X×Y.
Composition (max–min composition): If R is a fuzzy relation from X to Y and S from Y to Z, the max–min composition R∘S is a fuzzy relation from X to Z with μ_{R∘S}(x,z) = sup_{y∈Y} min( μ_R(x,y), μ_S(y,z) ). For finite Y, sup is max and formula becomes max over y of min(·,·).
This composition is the analogue of matrix multiplication in the (max,min) semiring. For finite sets, composition corresponds to an entrywise rule: r∘s (i,k) = max_j min( r(i,j), s(j,k) ). It is associative: (R∘S)∘T = R∘(S∘T), monotone in each argument (if R₁ ⊆ R₂ then R₁∘S ⊆ R₂∘S and S∘R₁ ⊆ S∘R₂), and satisfies (R∘S)^{-1} = S^{-1}∘R^{-1}. The identity relation I_X on X with μ_{I_X}(x,y)=1 if x=y and 0 otherwise is a neutral element: for R:X→Y, R∘I_Y = R and I_X∘R = R (sizes must match).
Properties of fuzzy relations (for a fuzzy relation R on set X):
- Reflexive: μ_R(x,x) = 1 for all x∈X.
- Symmetric: μ_R(x,y) = μ_R(y,x) for all x,y∈X.
- Max–min transitive: μ_R(x,z) ≥ sup_{y∈X} min( μ_R(x,y), μ_R(y,z) ) for all x,z∈X.
Note: Different definitions of transitivity (e.g., sup–t composition with other t-norms) exist; here we use max–min transitivity since it is the common one in courses.
Fuzzy equivalence relation (similarity relation): A fuzzy relation that is reflexive, symmetric and max–min transitive is called a fuzzy equivalence or similarity relation. Its α-cuts are crisp equivalence relations for each α∈(0,1].
Transitive closure (max–min): For a fuzzy relation R on finite X={1..n}, the transitive closure R^+ (smallest max–min transitive fuzzy relation containing R) can be computed by an algorithm analogous to Warshall: Initialize T = R. For k from 1 to n, for all i,j do T(i,j) := max( T(i,j), min( T(i,k), T(k,j) ) ). After k=n, T is transitive and is the transitive closure. If a reflexive–transitive closure R* is required, initialize T := max(R, I) where I is the identity relation on X (ones on the diagonal, zeros elsewhere).
Drawings to include in an exam answer:
- To illustrate a fuzzy relation R from X to Y: draw two lists of points labelled with elements of X (left) and Y (right). Draw arrows from each x to each y and label each arrow with the numeric membership value μ_R(x,y). Also draw the matrix with row and column labels showing the same numbers. This links intuitive picture to matrix form.
Proof sketches (what exams expect):
- Show composition formula for finite sets equals the stated sup–min: start from definition of fuzzy relation on X×Z defined through existential quantification over y with t-norm=min and s-norm=sup; then reduce sup to max for finite Y. State assumptions (finite Y or sup replaced by sup over Y).
- Show Warshall-like algorithm produces transitive relation: each k-step allows two-step chains passing through k to be folded into a single relation using min then max, so after processing all k the inequality for transitivity holds for any intermediate y.
Formulas
μ_R : X×Y → [0,1] — μ_R(x,y) is degree of relation between x and y; dimensionless; applies always.
μ_{R^{-1}}(y,x) = μ_R(x,y) — inverse relation; dimensionless; applies always.
μ_{Dom(R)}(x) = sup_{y∈Y} μ_R(x,y) — domain projection; dimensionless; sup is max for finite Y.
μ_{Rng(R)}(y) = sup_{x∈X} μ_R(x,y) — range projection; dimensionless.
μ_{R∘S}(x,z) = sup_{y∈Y} min( μ_R(x,y), μ_S(y,z) ) — max–min composition; dimensionless; for finite Y replace sup by max.
R_α = { (x,y) ∈ X×Y | μ_R(x,y) ≥ α } — α-cut (crisp relation); dimensionless; α in (0,1].
Warshall update: T(i,j) := max( T(i,j), min( T(i,k), T(k,j) ) ) — used for transitive closure on finite indexed set {1..n}.
Worked examples
Example 1 — Projection and inverse (matrix representation) Given X={x1,x2}, Y={y1,y2,y3} and a fuzzy relation R with matrix (rows x1,x2; columns y1,y2,y3): R = [ 0.8 0.2 0.0 ; 0.5 1.0 0.6 ]
Step 1: Domain projection μ_{Dom(R)}(x1) = max(0.8,0.2,0.0) = 0.8; μ_{Dom(R)}(x2) = max(0.5,1.0,0.6) = 1.0. Step 2: Range projection μ_{Rng(R)}(y1) = max(0.8,0.5) = 0.8; μ_{Rng(R)}(y2) = max(0.2,1.0) = 1.0; μ_{Rng(R)}(y3) = max(0.0,0.6) = 0.6. Step 3: Inverse R^{-1} is the 3×2 matrix (rows y1,y2,y3; cols x1,x2): R^{-1} = [ 0.8 0.5 ; 0.2 1.0 ; 0.0 0.6 ].
Final answers (bold): Domain = { (x1,0.8), (x2,1.0) }, Range = { (y1,0.8), (y2,1.0), (y3,0.6) }, and R^{-1} as above.
Example 2 — Max–min composition (numeric) Let R be 2×3 and S be 3×2: R = [ 0.7 0.4 0.9 ; 0.2 0.8 0.5 ] S = [ 0.6 0.3 ; 0.9 0.1 ; 0.4 0.7 ] Compute T = R∘S (size 2×2) with entries t_{ik} = max_j min( r_{ij}, s_{jk} ).
Compute t_{11} (i=1,k=1): min(0.7,0.6)=0.6; min(0.4,0.9)=0.4; min(0.9,0.4)=0.4; max = 0.6. Compute t_{12} (i=1,k=2): min(0.7,0.3)=0.3; min(0.4,0.1)=0.1; min(0.9,0.7)=0.7; max = 0.7. Compute t_{21} (i=2,k=1): min(0.2,0.6)=0.2; min(0.8,0.9)=0.8; min(0.5,0.4)=0.4; max = 0.8. Compute t_{22} (i=2,k=2): min(0.2,0.3)=0.2; min(0.8,0.1)=0.1; min(0.5,0.7)=0.5; max = 0.5.
Final T = [ 0.6 0.7 ; 0.8 0.5 ]. Bold: T = [0.6 0.7; 0.8 0.5].
Example 3 — Transitive closure (Warshall-like) on 3 elements Let X={1,2,3} and R matrix: R = [ 1.0 0.6 0.0 ; 0.2 1.0 0.5 ; 0.0 0.7 1.0 ] We apply for k=1..3 update T(i,j) := max( T(i,j), min( T(i,k), T(k,j) ) ).
k=1: For pair (2,3): min(T(2,1),T(1,3)) = min(0.2,0.0)=0.0 so no change. For (3,2): min(0.0,0.6)=0.0 no change. Many entries unchanged. T after k=1 is same as R.
k=2: Check (1,3): min(T(1,2),T(2,3)) = min(0.6,0.5)=0.5, so T(1,3)=max(0.0,0.5)=0.5 (updated). Check (3,1): min(T(3,2),T(2,1)) = min(0.7,0.2)=0.2 so T(3,1)=max(0.0,0.2)=0.2. Update others similarly.
k=3: Now using updated T, e.g., (1,1) may get max(1.0, min(T(1,3),T(3,1))=min(0.5,0.2)=0.2) remains 1.0. After k=3 no further increase occurs.
Final transitive closure T = [1.0 0.6 0.5 ; 0.2 1.0 0.5 ; 0.2 0.7 1.0]. Bold: T as given.
(Show each numeric min/max operation in exam answers; I listed key updates only.)
Common mistakes
- Forgetting inverse indexes: μ_{R^{-1}}(y,x) = μ_R(x,y), not μ_R(y,x).
- Not treating α-cut as crisp set: α-cut yields a crisp relation; do not leave it as membership grades.
- Incorrectly applying Warshall: use min for the intermediate chain and max to update; mixing the order gives wrong closure.
For your exam
Typical question types:
- Definitions and properties: define fuzzy relation, inverse, projection, α-cut, fuzzy equivalence; state reflexive/symmetric/transitive definitions.
- Short derivation: derive the max–min composition for finite sets and show matrix form.
- Algorithm derivation: give the Warshall-like algorithm and show one iteration on a 3×3 matrix.
- Numericals: compute projections, compositions, α-cuts, and transitive closures from given matrices.
- Diagrams: draw a bipartite arrow diagram and its matrix.
What a full-marks answer includes:
- Precise definitions with bold/clear notation (μ_R mapping), clear statement of assumptions (finite sets if you replace sup by max), step-by-step numeric computations showing each min and each max, and final matrices with entries rounded as required. For algorithm questions, show initialization and at least one full iteration and argue termination.
Quick check
- State the formula for the (i,k)-entry of the max–min composition T = R∘S for finite sets.
- What is the α-cut of a fuzzy relation R when α=1? (Interpretation.)
- In the Warshall-like transitive closure, when updating T(i,j) using intermediate k, which two operations are used in order?
Answers: 1) t_{ik} = max_j min( r_{ij}, s_{jk} ). 2) R_1 = { (x,y) | μ_R(x,y) = 1 }, the crisp relation of fully related pairs. 3) First take min( T(i,k), T(k,j) ) then take max( current T(i,j), that min ).
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?