0% found this document useful (0 votes)
21 views44 pages

ISC Unit I Topic-3

Uploaded by

Bipin Bhadra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views44 pages

ISC Unit I Topic-3

Uploaded by

Bipin Bhadra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Soft Computing UNIT -I

Introduction to Soft Computing

4th Semester CSE (AR-21)

1 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Lecture -1

Outline of the Lecture

 Introduction of Fuzzy Logic

 Crisp Set Theory

 Fuzzy Set Theory

2 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Logic
 Fuzzy logic was first developed by L.A. Zadeh in the mid-1960s
for representing some types of “approximate” knowledge that
cannot be represented by conventional, crisp methods.
 In the crisp Boolean logic, truth is represented by the state 1 and
false by the state 0. Boolean algebra and crisp logic have no
provision for approximate reasoning.
 Fuzzy logic is an extension of crisp bivalent (two-state) logic in
the sense that it provides a platform for handling approximate
knowledge.
 Fuzzy logic is based on fuzzy set theory, A fuzzy set is
represented by a membership function.
 A particular “element” value in the range of definition of the fuzzy
set will have a grade of membership which gives the degree to
which the particular element belongs to the set.
3 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024
Soft Computing Fuzzy Logic

Fuzzy Logic
Fuzzy logic (FL) is an essential component of soft computing.
FL is a mathematical language to express something which is
meaningful to others.
Like FL, there are some other mathematical languages:
Relational algebra
Boolean logic
Predicate logic or algebra
Fuzzy Set/Algebra
So FL essentially combined the different algebra like: Relational
Algebra + Boolean Algebra + Predicate Algebra

4 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Set Theory

Fuzzy:
Dictionary meaning of fuzzy is Not Clear, Noisy etc.
Ex: Is the picture on this slide is CLEAR?/FUZZY
Ex: image is NOISY/FUZZY
Ex: when we distinguish the regions / circle of boundary regards
separation are clear/not clear/fuzzily

Antonym of fuzzy is CRISP


Ex: when we distinguish the regions / circle of boundary strongly
through which if we can easily distinguish regions clearly then
boundary is crisp

5 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Crisp Logic

Crisp Logic Vs Fuzzy Logic :

Yes / No

CRISP ANSWER

True / False

Here, If we ask something and answer to that question and if it has the
clear meaning then we can say answer has Crisp answer. Usually
express either Yes/No or True /False.

6 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Crisp Logic

Fuzzy Logic Vs Crisp Logic:

Here, we have to identify a liquid (milk, water, Juice, sprite) if the


question is: is liquid colorless?
Ans: Yes / No [Crisp Answer]

MILK YES
WATER
A Liquid CRISP
JUICE
SPRITE NO

Is liquid
colorless?

7 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Logic

Fuzzy Logic Vs Crisp Logic:


• Here, is the person is Honest? All answer for question seems to
be correct and acceptable / rejectable.
Extreme
Note: Answer to Crisp is either 100 / 0 Honest
But answer to Fuzzy is between 100 to 0.
Very
Ankit Honest
Rajesh
Honest
Santosh Fuzzy
at Time
Kabita
Salmon
Dishonest

Is person Extremely
honest ? Dishonest

8 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Logic

Fuzzy Logic Vs Crisp Logic:

1. Identify the Fuzzy / Crisp.


2. World is better describe FUZZILY.
3. Is CAR CLOSE?
4. How is WEATHER today?
5. Roll number 19CSE001 is male.
6. Grade of students.
7. Result of students.
8. GIETU is an University?

9 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing
1."World is better described FUZZILY." - This statement is fuzzy because it uses the
term "fuzzily," indicating a degree of uncertainty or imprecision in describing the world.
2."Is CAR CLOSE?" - This statement is crisp because it asks for a clear and specific
answer about the proximity of a car. The question is not vague or uncertain.
3."How is WEATHER today?" - This statement is fuzzy because it involves a subjective
assessment of the weather, which can vary from person to person. The term "how" suggests
a qualitative and uncertain aspect.
4."Roll number 19CSE001 is male." - This statement is crisp because it provides a clear
and specific classification (male) based on the given roll number.
5."Grade of students." - This statement is fuzzy because it does not specify a particular
grade and leaves room for a range or imprecision in the grading system.
6."Result of students." - This statement is fuzzy because it does not provide specific
details about the results, leaving room for various interpretations or gradations.
7."GIETU is an University?" - This statement is crisp because it seeks a straightforward
and definitive answer to the question of whether GIETU is a university or not.
10 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024
Soft Computing

Crisp Sets(CS)-
• Universe of Discourse-
• The universe of discourse (universal set) is the set which, with reference to a
particular context contains all possible elements having the same characteristics
and from which sets can be formed.
• The universal set is denoted by E
• Eg- The universal set of all students in a university, The universal set of all
numbers in Euclidean space.
• Set-
• A set is a well defined collection of objects.
• Here well defined means the object either belongs to or does not belongs to the
set.
• Given a set A whose objects are a1,a2,a3,…..an, we write A as A={a1,a2,a3…
an}---------Here a1,a2….are called the members of the set.
• Eg- { Gandhi, Bose, Nehru}
• A set may also be defined based on the properties the members have to satisfy.
In such a case, a set A is defined as A={x | P(x) }, where P(x) stands for the
property P to be satisfied by the member x. This is read as ‘A is the set of all X
such that P(x) is satisfied’
• Eg1-{x | x is an odd number}
• Eg2-{y | y>0 and y mod 5=0}

11 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing
• Venn Diagram-
• These are pictorial representations to denote a set
• Eg- Given a set A defined over a universal set E, the Venn Diagram for A and E will
be like this-

A E
• If E represents the set of university students, A represents the set of female
students.
• Membership-
• An element x is said to be a member of set A if x belons to set A.
• The membership is indicated by “ ∈” and pronounced as “belongs to”.
• Thus x ∈ A means x belons to A and x ∉ A means x does not belons to A.
• Eg- A={4,5,6,7,8,10}………for x=3 and y=4, we have x ∉ A and y ∈ A.
• Cardinality-
• The numbers of elements in a set is called its cardinality.
• Cardinality of set A is denoted as n(A) or |A| or #A
• If A={4,5,6,7}..then |A|=4

12 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing
• Family of sets-
• A set whose members are set themselves are referred to as family of sets.
• Null set/Empty Set-
• A set that does not contain any element is called an empty set or a null set. An empty
set is denoted using the symbol '∅'. It is read as 'phi'. Example: Set X = {}. It is also
called a void set or null set.
• Singleton Set-
• A singleton set is a set containing a single element. A singleton set is also called a unit
set since there’s only one element present in the set.
• A singleton set P having only one element p is written as P={p} then |P|=1
• Subset –
• A subset of a set A is any set B such that every element of B is also an element of A. B
⊂A
• The symbol – “⊂” stands for ‘is a subset of’ or ‘is contained in.’
• Each set is unconditionally a ⊂ of itself, i.e. A ⊂ A
• The empty or null or void set φ has no elements, therefore, φ is a ⊂ of every set
• Superset-
• A given sets A and B on E the universal set, A is said to be superset of a set B if every
element of B is contained in A. A ⊃ B
• Power set-
• A power set of a set A is the set of all possible subsets that are derivable from set A
including null set. P(A) has cardinality of |P(A)|=2 to the power |A|.
• A={1,2}----P(A)={{1},{2},{1,2}, ∅}

13 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Crisp Set Theory

Crisp Set(CS):-
Ex: X = Crisp Set and denotes entire population of India
H = Another set denotes all Hindu population
M = Another set denotes all Muslim population

Universe of discourse X

H
M

Here, all the sets are of finite numbers of individuals. Such a set called
Crisp Set. And X is universe of discourse (region)

14 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Set Theory

Fuzzy System(FS):-
• If we describe a system in the way how Fuzzy decides, then the
system is called FUZZY SYSTEM.
• FS contains:
 Fuzzy Elements
 Fuzzy Sets (One or more fuzzy elements)
 Fuzzy Rules ( Many fuzzy sets connected)
 Fuzzy Implications (Many fuzzy rules)

15 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Set Theory

Fuzzy Set (FS):


Let us discuss about fuzzy set.
Ex:
E = All students in IT.
S = All Good students.
S = {(s, g) | s E and g(s) is a measurement of goodness of the student
s.
Example:
S = {(Rajat, 0.8), (Kabita, 0.7), (Salman, 0.1), (Ankit, 0.9)} etc.

16 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Set Theory

Fuzzy Set (FS):-


Otherwise :
Salman, if he is a good student, then Ankit is also a good student but
Salman being a good student his score is 0.1 and Ankit’s score is 0.9.

So, the difference between two is basically how they have their own
membership values that means 0.1, 0.9 etc. at the end but all them
belongs to good student.

Although Salman may score less and Ankit may score highest here, all
belongs to good student.

17 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Crisp & Fuzzy Set

NOTES :
• A crisp set is a fuzzy set but a fuzzy set is not crisp set.
• In fuzzy set membership value is mentioned between 0 & 1 both
inclusive.
• In case of crisp set the elements are with extreme values of degree
of membership namely either 1/0
Crisp Set Fuzzy Set
1. S = {s | s A} 1. F = (s, μ) | s A and μ(s) is the
2. It is a collection of elements. degree of s.
3. Inclusion of an element s A 2. It is collection of ordered
into S is crisp, that is, has strict pairs.
boundary yes or no. 3. Inclusion of an element s A into
F is fuzzy, that is, if present, then
with a degree of
membership.
18 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024
Soft Computing Basic Terminology & Notation

Definition 1: Membership function (and Fuzzy set)


• If X is a universe of discourse and x X, then a fuzzy set A in X is
defined as a set of ordered pairs, that is
• A = {(x, μA(x) ) | x X} where μA(x) is called the membership
function for the fuzzy set A.

Note:
μA(x) map each element of X onto a membership grade (or
membership value) between 0 and 1 (both inclusive).

Question:
How (and who) decides μA(x) for a Fuzzy set A in X?

19 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy & Crisp Degree of Membership

Degree of Membership:
Example: How Course evaluation in Crisp / Fuzzy Way?

Crisp Graph

Fuzzy Graph

20 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy Membership

Degree of Membership:
• For Definition refer to hand written note-
• The way through which membership value can be decided and we
can decide these membership values for each element that belongs
to fuzzy set.
• How to decide the degree of memberships of elements in a fuzzy
set?
City Bangalore Bombay Hyderabad Kharagpur Madras Delhi
DoM 0.95 0.90 0.80 0.01 0.65 0.75

How the cities of comfort can be judged?


• So once we normalize population feedback and opinion into the
values into this then it gives us fuzzy value.

21 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Examples of Fuzzy Set

 Though fuzzy sets model vagueness, it need s to be realized that the


definition of sets varies accordingly to the context in which it is
used.
 Eg- The fuzzy linguistic term “tall” could have one kind of fuzzy
set while referring to the height of a building and another fuzzy set
while referring to the height of human beings
 High Temperature
 Low Pressure
 Colour of Apple
 Sweetness of Orange
 Weight of Mango
 Note: Degree of membership values lie in the range [0...1].

22 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Discrete Membership Values

Example:
X = All cities in India
A = City of comfort
A={(Bhopal,0.2),(New Delhi, 0.7), (Bangalore, 0.7), (Chennai, 0.9),
(Hyderabad, 0.3), (Kolkata, 0.1)}

• The membership values may be of discrete values.

A fuzzy set with discrete value of μ


23 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024
Soft Computing Discrete Membership Values

• Either elements or their membership values (or both) also may


be of discrete values.
• A ={(0,0.1),(1,0.30),(2,0.78)……(10,0.1)}
• Note : X = discrete value

Number of children (X)


How you measure happiness ??
A = “Happy family”

24 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Continuous Membership Values

• The membership values may be of continuous values

25 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing

FUZZY
TERMINOLOGIES

26 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Support

Support: The support of a fuzzy set A is the set of all points x X


such that μA(x) > 0
• Support( A ) = { x | μA(x) > 0, x ∈ X }

27 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Core

Core: The core of a fuzzy set A is the set of all points x in X such that
μA(x) = 1
• Core( A ) = { x | μA(x) = 1, x ∈ X }

28 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing

• Height of Fuzzy Set: It is defined as the largest


membership value of the elements contained in that set. It
may not be 1 always. If the core of the fuzzy set is non-
empty, then the height of the fuzzy set is 1.

29 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing

• Boundary- It comprises those elements x of the universe


such that 0 < μA(x) < 1

• Boundary( A ) = { x | 0 < μA(x) < 1 , x ∈


X}

30 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Normality

Normality : A fuzzy set A is a normal if its core is non-empty. In other


words, we can always find a point x X such that μA(x) = 1.
• In other words, a fuzzy set is normal if its height is 1

31 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Crossover Point

Crossover point : A crossover point of a fuzzy set A is a point x X at


which μA(x) = 0.5.
That is Crossover (A) = {x| μA (x) = 0.5}.

32 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Bandwidth

Bandwidth :
• For a normal and convex fuzzy set, the bandwidth (or width) is
defined as the distance the two unique crossover points:
• Bandwidth (A) = | x1 - x2 | ,where μA(x1) = μA(x2) = 0.5

33 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Singleton

Fuzzy Singleton : A fuzzy set whose support is a single point in X


with μA(x) = 1 is called a fuzzy singleton.
That is |A| = {x | μA(x) = 1}.

34 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Symmetry

Symmetry :
A fuzzy set A is symmetric if its membership function around a
certain point x = c, namely μA(x + c) = μA(x - c) for all x X.

35 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing α – cut and strong α – cut

α-cut and strong α-cut :


• The α-cut of a fuzzy set A is a crisp set defined by
• Aα = { x | μA(x) α }
• Strong α-cut is defined similarly :
• A'α = { x | μA(x) > α }
• Note : Support(A) = A'0 and Core(A) = A1.
•The set Aα=0.2 contains all the
elements from x1 to xn, including
both end values
•The set Aα=0.5 contains all the
elements from x2 to xm, including
both end values
•The set Aα=1.0 contains all the
elements from x3 to xk, including
both end values
36 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024
Soft Computing Convexity

Convexity :
• Fuzzy Set A is convex if μA( λx1 + (1 – λ) x2)) ≥ min(μA(x1) , μA(x2)),where
x1, x2 ∈ X.
• In other words, for any elements x, y and z in a fuzzy set A, the relation
x < y < z implies that: μA(y) ≥ min (μA(x), μA(z)). If this condition holds
for all points, the fuzzy set is called a convex fuzzy set.

37 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Open and Closed
A fuzzy set A is
Open left-
As the name suggests, open left fuzzy sets have all the elements on left after a
certain point have a membership value of 1, and all the elements on the right
side after a certain point have a membership value of 0.
If = 1 and = 0

Open right:
Open right fuzzy sets have all the elements on left after a certain point have a
membership value of 0, and all the elements on the right side after a certain point
have a membership value of 1.
If = 0 and = 1

Closed-
Closed fuzzy sets have all the elements on the left or right side after a certain point have
a membership value of 0.
If = 0= 0

38 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing

39 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Cardinality
Scalar Cardinality-
Scalar cardinality is defined by the summation of membership values of all
elements in the set. For the data given in the table,
| A | = Σx ∊ X { μA(x) }

Relative Cardinality-
|| A || = | A | / | X |

40 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing

Scalar- |Senior| = 0.3 + 0.9 + 1 + 1 = 3.2


Relative- || Senior || = 3.2 / 9 = 0.356

41 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy vs. Probability

Fuzzy Logic: Fuzzy logic deals with ambiguity and vagueness. When
we say about certainty of a thing.

Example: A patient come to the doctor and he has to diagnose so that


medicine can be prescribed. Doctor prescribed a medicine with
certainty 60% that the patient is suffering from flue. So, the disease
will be cured with certainty of 60% and uncertainty 40%. Here, in
stead of flue, other diseases with some other certainties may be.

Probability: Probability deals with uncertainty and likelihood. When


we say about the chance of an event to occur

Example: India will win the T20 tournament with a chance 60%
means that out of 100 matches, India own 60 matches.

42 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Fuzzy vs. Probability

 A bottle of liquid has a probability of


½ of being rat poison and ½ of being
pure water.
1

 A second bottle’s contents, in the


fuzzy set of liquids containing lots of
rat poison, is ½.
2

 The meaning of ½ for the two bottles clearly differs significantly


and would impact your choice should you be dying of thirst.
 50% probability means 50% chance that the water is clean.
 50% fuzzy membership means that the water has poison.

43 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024


Soft Computing Prediction vs. Forecasting

The Fuzzy vs. Probability is analogical to Prediction vs. Forecasting

Prediction : When you start guessing about things.

Forecasting : When you take the information from the past job and
apply it to new job.

The main difference:


Prediction is based on the best guess from experiences.

Forecasting is based on data you have actually recorded and packed


from previous job.

44 Department of CSE, GIET University, Gunupur Saturday, May 4, 2024

You might also like