Exploring the concepts of fuzzy logic in real-world applications.
What do you think as a tech guy is the easiest way to learn the fuzzy logic? Just Goooooooooooooogle it! So that's what I did!

Meaning Of Fuzzy

Meaning Of Logic
But both of these do not represent the meaning, so I then searched for Fuzzy Logic as:

Meaning Of Fuzzy Logic
So, basically, fuzzy logic means something that makes the computer behave like a human brain.
But how? Right!
So, let's understand that with the help of an example of Instagram.
How many of you use Instagram?
I think a lot! Right!
One day I was scrolling Instagram like you, and my IG Algo knows that:
And based upon that, I get videos like:
Now, when IG wants to push a new video, a pic, or a reel in my feed, of course, it will have to think about what is engaging and interesting to me and show that on the feed, right?
And to solve this problem, here comes our hero: FUZZY LOGIC!

And based upon the percentage, it shows me the reel like a cat video having food and a meme as:
*Disclaimer: The videos displayed are not mine and are the property of their respective copyright holders.
But now the new question that comes to my mind is how we got the %age right?

Working of Instagram
And to do that again our HERO comes and based upon the various factors like watch time on the app, my likes, my comments, my followings and all that combine which are called as knowledge base which includes fuzzy rule base and and database and based upon the Algo decide and creates a fuzzy values for the content to be served and this loop goes on.
Now, our next topic is :
Before understanding the fuzzy set, lets understand the topic of crisp set, which is nothing but a nornal set as:
A = ❴ 1,2,3,4,5,6......... ❵
Set of NumbersAnd, it is part of the Universe of Discourse of Numbers as:

Universe of discourse of Numbers
Likewise, We can have the Universe of Discourse of Cats:

Universe of Discourse of Cats
Okay! Let us see the fuzzy sets: so fuzzy sets are similar crisp ones but they have values between 0 and 1 and these are generated from the crisp set with the help of membership function.
μA❨x❩
Crisp to Fuzzy Set
Fuzzy value tell us how much an element/ notation belongs to a set or not!

Crisp vs Fuzzy Set
Now, Lets us talk about the operations on the Fuzzy Set as:
| Operation | Formula (Membership Function μ_A(x)) |
|---|---|
| Union (A ∪ B) | μA ∪ B(x) = max(μA(x), μB(x)) |
| Intersection (A ∩ B) | μA ∩ B(x) = min(μA(x), μB(x)) |
| Complement (¬A) | μ¬A(x) = 1 - μA(x) |
So, the above operations can be done on the website as :
Let's us talk about the membership functions:
Membership functions are the one which make the find the fuzziness of a value and define the fuzzy set. The values represented by the membership functions are between 0 and 1 (including both 0 and 1)
we can represent a fuzzy set as, the ordered pair of the element and its membership value:
A = {( x , μA(x) ) | x ∈ X }
Membership Function

Values of Crisp Membership vs Fuzzy Membership
Now, our last topic is Composition:
Composition refers to a mathematical operation that combines two fuzzy relations to form a new relation. It essentially captures how the relations interact with each other, enabling us to analyze multi-step relationships.

Composition of Fuzzy Relations
Let's understand with the help of an example:
Suppose we have to go to from Chandigarh to Delhi via Karnal and we will decide the route based upon the road quality and for that we will assign each path a fuzzy value.

Chandigarh To Delhi Via Karnal
Now we have different options of going from the Chandigarh as A to Delhi as C

Route from A to C
And if we represent this in the form of Relational Matric we can represent it as:
| B | D | E | |
|---|---|---|---|
| A | 0.8 | 0.6 | 0.5 |
From A to Diff. Routes
| B | D | E | |
|---|---|---|---|
| C | 0.7 | 0.5 | 0.4 |
From Diff. Routes to C
| Route | First Link | Second Link | Minimum |
|---|---|---|---|
| A → B → C | 0.8 | 0.7 | 0.7 |
| A → D → C | 0.6 | 0.5 | 0.5 |
| A → E → C | 0.5 | 0.4 | 0.4 |
Maximum value of all minimums: 0.7. Best route: A → B → C.
| Route | First Link | Second Link | Product |
|---|---|---|---|
| A → B → C | 0.8 | 0.7 | 0.56 |
| A → D → C | 0.6 | 0.5 | 0.3 |
| A → E → C | 0.5 | 0.4 | 0.2 |
Best route: A → B → C, with a fuzzy value of 0.56.
The composition result tells us the overall quality of the route from City A to City C, considering intermediate cities. This can help decide which route to take when there are multiple options, ensuring the smoothest journey.
The above calculations can be done using the values as well as below:
Thanks for reading the article. If you want to contribute you can connect me here
Design & Developed by Rahul Kumar Pahwa
© 2026. All rights reserved.