Unit 4 of 4 · M.Sc IT Sem 4

Unit 4: Fuzzy systems and genetic algorithms

Artificial Intelligence & Soft Computing notes · PTU syllabus (PGCA1926)

3 min read10 topics10 exam questions
On this page
  1. Unit summary
  2. Fuzzy set theory: fuzzy vs crisp sets
  3. Fuzzy set operations
  4. Fuzzy relations and max–min composition
  5. Fuzzification, fuzzy rules and defuzzification
  6. Fuzzy decision making and control
  7. Genetic algorithms: history and basics
  8. The genetic algorithm cycle
  9. Encoding and fitness functions
  10. GA operators: reproduction, crossover and mutation
  11. Convergence and hybrid systems
  12. Key terms
  13. Quick revision
  14. Important questions

Unit summary

Fuzzy logic reasons with degrees of truth, and genetic algorithms evolve solutions. This unit covers fuzzy set theory, fuzzy versus crisp sets, fuzzy relations, fuzzification, min–max composition, defuzzification, fuzzy rule-based systems, fuzzy decision making and control, the history of genetic algorithms, encoding, fitness functions, reproduction, crossover and mutation, convergence and hybrid systems.

After this unit you can

  • Perform fuzzy set operations and max–min composition
  • Fuzzify, apply rules and defuzzify
  • Design fuzzy rule-based and control systems
  • Apply genetic algorithm operators and explain hybrid systems

PTU syllabus topics

  • Fuzzy set theory
  • fuzzy vs crisp sets
  • fuzzy relations
  • fuzzification
  • min-max composition
  • defuzzification
  • fuzzy logic and rule-based systems
  • fuzzy decision making and control
  • genetic algorithm history
  • encoding methods
  • fitness functions
  • GA operators (reproduction, crossover, mutation)
  • convergence
  • introduction to hybrid systems
CycleGenetic algorithm cycle
Genetic algorithm cycle
1Initial population
2Fitness evaluation
3Selection
4Crossover
5Mutation
  1. 1. Initial population: Random encoded solutions
  2. 2. Fitness evaluation:
  3. 3. Selection: Fitter survive
  4. 4. Crossover: Combine parents
  5. 5. Mutation: Random changes
1

Topic 1

Fuzzy set theory: fuzzy vs crisp sets

In a classical (crisp) set, membership is 0 or 1. In a fuzzy set, membership is a degree between 0 and 1 — useful for vague ideas like "tall" or "hot".

ComparisonCrisp vs fuzzy sets
Crisp set
Fuzzy set

Membership

0 or 1

Any value from 0 to 1

Example

Age ≥ 18 is adult

Height 175 cm is "tall" to degree 0.7

Used in

Classical logic

Washing machines, AC control, decision support

2

Topic 2

Fuzzy set operations

Key formulasFuzzy operations
  • Union

    μA∪B(x) = max(μA(x), μB(x))

  • Intersection

    μA∩B(x) = min(μA(x), μB(x))

  • Complement

    μA′(x) = 1 − μA(x)

  • Difference

    μA−B(x) = min(μA(x), 1 − μB(x))

Example

A = {0.2/x1, 0.7/x2, 1/x3}, B = {0.5/x1, 0.4/x2, 0.6/x3}: A ∪ B = {0.5, 0.7, 1}; A ∩ B = {0.2, 0.4, 0.6}; A′ = {0.8, 0.3, 0}.

3

Topic 3

Fuzzy relations and max–min composition

  • A fuzzy relation R on X × Y assigns each pair a membership grade; it is written as a matrix.
Key formulasMax–min composition
  • Definition

    T = R ∘ S, with μT(x, z) = max over y of min(μR(x, y), μS(y, z))

Example

R = [0.6 0.3; 0.2 0.9] and S = [1 0.5; 0.8 0.4]: T11 = max(min(0.6, 1), min(0.3, 0.8)) = 0.6; T12 = max(min(0.6, 0.5), min(0.3, 0.4)) = 0.5; T21 = max(0.2, 0.8) = 0.8; T22 = max(0.2, 0.4) = 0.4. T = [0.6 0.5; 0.8 0.4].

4

Topic 4

Fuzzification, fuzzy rules and defuzzification

ProcessFuzzy inference system (Mamdani)
  1. 1Fuzzification

    Convert crisp inputs to membership degrees using membership functions

  2. 2Rule evaluation

    IF temperature is high AND humidity is high THEN fan speed is fast (AND = min)

  3. 3Aggregation

    Combine rule outputs (max)

  4. 4Defuzzification

    Convert the fuzzy output to a crisp value

ComparisonDefuzzification methods
Rule
Notes

Centroid (centre of gravity)

z = Σ μ(z) z ÷ Σ μ(z)

Most common; smooth

Mean of maximum

Average of z values with maximum membership

Simple

Max membership (height)

z with the highest membership

Fast; ignores shape

Weighted average

For symmetric output sets

Used in Sugeno systems

Example

Output fan speeds 20, 50, 80 with memberships 0.2, 0.6, 0.3: weighted average = (4 + 30 + 24) ÷ 1.1 ≈ 52.7.

  • Membership functions: triangular, trapezoidal, Gaussian.
5

Topic 5

Fuzzy decision making and control

  • Fuzzy decision making combines fuzzy goals and constraints (decision = goals ∩ constraints) and picks the alternative with the highest membership.
  • Fuzzy control: controllers for washing machines (load and dirt → wash time), air conditioners, anti-lock brakes, metro trains (Sendai subway) and cameras — robust with simple rules from expert knowledge.
6

Topic 6

Genetic algorithms: history and basics

  • Introduced by John Holland (1975) and popularised by David Goldberg (1989), inspired by natural selection: a population of candidate solutions evolves through selection, crossover and mutation.
7

Topic 7

The genetic algorithm cycle

CycleGenetic algorithm
Genetic algorithm
1Initial population
2Fitness evaluation
3Selection
4Crossover
5Mutation
  1. 1. Initial population: Random candidate solutions
  2. 2. Fitness evaluation:
  3. 3. Selection: Fitter individuals chosen
  4. 4. Crossover: Combine parents
  5. 5. Mutation: Small random changes

Genetic algorithms are used for optimisation problems where the search space is huge — scheduling, design and feature selection.

8

Topic 8

Encoding and fitness functions

ComparisonEncoding methods
Representation
Suits

Binary encoding

Bit strings — 01101

Numeric optimisation, knapsack

Value (real) encoding

Real numbers or symbols

Weights of neural networks

Permutation encoding

Orderings — 3 1 4 2

Travelling salesperson, scheduling

Tree encoding

Program trees

Genetic programming

  • Fitness function: measures how good a solution is — e.g., f(x) = x² for maximisation, or total distance (to minimise) for a route.
9

Topic 9

GA operators: reproduction, crossover and mutation

Key termsGA operators
Roulette-wheel selection
Probability proportional to fitness
Tournament and rank selection
Pick the best of a random group; select by rank
Elitism
Copy the best individuals unchanged
Single-point crossover
Swap tails after a random point
Two-point and uniform crossover
Swap middle segments or each bit with probability 0.5
Bit-flip mutation
Flip bits with a small probability (about 0.01)
Swap mutation
Exchange positions in permutations

Example

Maximise f(x) = x² for x in 0–31 (5-bit strings). Population 01101 (13, f = 169), 11000 (24, 576), 01000 (8, 64), 10011 (19, 361); total 1,170. Selection probabilities 0.14, 0.49, 0.05, 0.31. Crossing 01101 and 11000 after bit 4 gives 01100 and 11001 (25, f = 625) — the best improves from 576 to 625.

10

Topic 10

Convergence and hybrid systems

  • Convergence: the population becomes similar and best fitness stops improving; stop after a fixed number of generations, a target fitness, or no improvement for several generations. Premature convergence to a local optimum is avoided by mutation, diversity and suitable selection pressure.
ComparisonHybrid systems
Combination
Example

Neuro-fuzzy

Neural learning tunes fuzzy membership functions and rules

ANFIS

Genetic-fuzzy

GA optimises fuzzy rules and membership functions

Tuned controllers

Neuro-genetic

GA chooses network weights or architecture

Neuro-evolution

Key terms

Fuzzification
Converting crisp inputs into membership degrees
Max–min composition
Combining fuzzy relations by max of mins
Defuzzification
Converting a fuzzy output into a crisp value
Crossover
Combining parts of two parents to form offspring
Hybrid system
System combining two or more soft computing methods

Quick revision

  • Crisp vs fuzzy; union max, intersection min, complement 1 − μ.
  • Fuzzy relations; max–min composition.
  • Fuzzification, rules, aggregation, defuzzification (centroid, mean of max, weighted average); fuzzy control.
  • GA history; binary, value, permutation, tree encoding; fitness.
  • Selection, crossover, mutation, elitism; convergence; neuro-fuzzy, genetic-fuzzy, neuro-genetic.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Distinguish crisp and fuzzy sets.
  2. Q2.Find the complement of {0.3/a, 0.9/b}.
  3. Q3.What is max–min composition?
  4. Q4.Name two defuzzification methods.
  5. Q5.What is roulette-wheel selection?
  6. Q6.What is premature convergence?

Long-answer questions

  1. Q1.Explain fuzzy set operations and fuzzy relations with examples.
  2. Q2.Explain a fuzzy inference system with fuzzification and defuzzification.
  3. Q3.Explain the genetic algorithm with encoding, fitness and operators.
  4. Q4.Solve a function maximisation problem using a genetic algorithm.

Stuck on this unit?

Message SBS on WhatsApp for help with Artificial Intelligence & Soft Computing, or to ask about studying M.Sc IT at Synetic.

WhatsApp us