📘 PAPER 1: THEORY OF COMPUTATION (MCA546)🔴 UNIT 2: Finite Automata (university of allahabad)


🔴 UNIT 2: Finite Automata

(VERY HIGH EXAM WEIGHT – Definitions + Diagrams + Theorems)


1️⃣ Finite Automata (FA)

A Finite Automaton is a mathematical model of computation used to recognize regular languages.

Formal Definition

A finite automaton is a 5-tuple:

M = (Q, Σ, δ, q₀, F)

Where:

  • Q → Finite set of states

  • Σ → Input alphabet

  • δ → Transition function

  • q₀ → Initial state

  • F → Set of final (accepting) states


2️⃣ Deterministic Finite Automata (DFA)

Definition

A DFA is a finite automaton in which:

Transition Function

δ : Q × Σ → Q


Example

Language: Strings ending with 01

States:

  • q₀ → start

  • q₁ → last symbol was 0

  • q₂ → accept (01 found)


Key Properties

  • Simple and predictable

  • Easy to implement

  • Always deterministic


3️⃣ Non-Deterministic Finite Automata (NFA)

Definition

An NFA allows:

Transition Function

δ : Q × (Σ ∪ {ε}) → 2^Q


Important Fact

Every NFA has an equivalent DFA

(This is a very common exam question)


Difference: DFA vs NFA

DFANFA
One transition per symbolMultiple transitions
No ε-movesε-moves allowed
Faster executionEasier to design
Harder to designSimple construction

4️⃣ ε-Moves (Moves on Empty String)

An ε-move allows the automaton to:

  • Change state without reading any input

Why Needed

  • Simplifies automaton design

  • Useful in regular expression to NFA conversion


5️⃣ Regular Expressions

Definition

A Regular Expression (RE) describes regular languages using symbols and operators.

Operators


Examples

  • (0|1)* → All binary strings

  • 0*1* → Any number of 0s followed by 1s


Equivalence

Regular Expression ⇔ Finite Automaton


6️⃣ Regular Sets (Regular Languages)

A language is called regular if:

  • It can be represented by a DFA

  • Or an NFA

  • Or a Regular Expression


Examples


7️⃣ Relationship with Regular Grammars

Regular Grammar

A grammar is regular if its production rules are of the form:

  • A → aB

  • A → a


Important Relationship


8️⃣ Pumping Lemma for Regular Sets

Purpose

Used to prove that a language is NOT regular


Statement

If L is a regular language, then ∃ a constant p such that any string w ∈ L with |w| ≥ p can be split into:

w = xyz

Such that:

  1. |y| > 0

  2. |xy| ≤ p

  3. xyⁱz ∈ L for all i ≥ 0


Usage

  • Assume language is regular

  • Apply pumping lemma

  • Reach contradiction

  • Conclude: Language is not regular


Common Example

L = {0ⁿ1ⁿ | n ≥ 1} → NOT regular


9️⃣ Closure Properties of Regular Sets

Regular languages are closed under:

  • Union

  • Intersection

  • Complement

  • Difference

  • Concatenation

  • Kleene star

  • Reversal


Meaning

If L₁ and L₂ are regular, then:

➡ Frequently asked in short notes


🔟 Decision Algorithms for Regular Sets

Problems That Are Decidable


Meaning

There exists an algorithm that always terminates and gives correct answer.


1️⃣1️⃣ Minimization of Finite Automata

Goal

Reduce the number of states without changing the language


Steps

  1. Remove unreachable states

  2. Identify equivalent states

  3. Merge equivalent states


Why Important

  • Reduces memory

  • Improves efficiency

  • Asked as long question

Comments

Popular Posts