THEORY OF COMPUTATION/Student Engineering Notebook
Page 04·notes
REGULAR LANGUAGE PROPERTIES & PUMPING LEMMA—~28 MIN READ

Decision Properties & Algorithms for Regular Languages

“Emptiness, finiteness, membership, and equivalence decision procedures for regular sets.”

1.Complete Decidability of Regular Language Properties

A decision property is an algorithmic question: 'Does a given language satisfy property P?' with a guaranteed YES/NO termination.

Every fundamental property of Regular Languages is DECIDABLE:

1. Membership (w \in L):

- Run string w on the DFA. If it terminates in a final state, YES; otherwise NO. Complexity: O(|w|).

2. Emptiness (L = \emptyset):

- Perform BFS or DFS from the start state q_0. If NO accepting state is reachable, L is empty. Complexity: O(|V| + |E|).

3. Finiteness (Is L finite?):

- Eliminate unreachable states and dead states. If the remaining transition graph contains a directed cycle, L is infinite. If acyclic, L is finite! Complexity: O(|V| + |E|).

4. Equivalence (L_1 = L_2):

- Construct the symmetric difference: L_{\Delta} = (L_1 \cap \overline{L_2}) \cup (\overline{L_1} \cap L_2).

- L_1 = L_2 \iff L_{\Delta} = \emptyset. Test emptiness on L_{\Delta}!

5. Subset / Containment (L_1 \subseteq L_2):

- L_1 \subseteq L_2 \iff L_1 \cap \overline{L_2} = \emptyset. Test emptiness of L_1 \cap \overline{L_2}!

WORKED EXAM ANALYSIS · STEP-BY-STEP DERIVATION

2. GATE Worked Numerical: Equivalence via Symmetric Difference

⚠️ Pitfall Warning:

To test if two DFAs accept the same language, you do NOT have to test infinitely many strings. Minimize both DFAs and check graph isomorphism, or test emptiness of their symmetric difference!

Problem: Let M1 and M2 be two DFAs over {0, 1}. Describe the exact algorithmic procedure to decide whether L(M1) = L(M2).

Step 1: Construct complement of M2: Invert accepting and non-accepting states of M2 to obtain M2_bar.

Step 2: Construct product automaton for L1 cap L2_bar: States are Q1 x Q2, accepting states are F1 x (Q2 \ F2).

Step 3: Construct product automaton for L1_bar cap L2: Accepting states are (Q1 \ F1) x F2.

Step 4: Combine both product automata via union: This yields the symmetric difference L_diff = (L1 \ L2) union (L2 \ L1).

Step 5: Apply Graph Reachability (BFS/DFS) on L_diff starting from (q01, q02):

If any accepting state is reachable: L_diff != empty set ==> L1 != L2 (Output: NO).

If no accepting state is reachable: L_diff = empty set ==> L1 = L2 (Output: YES).

WORKED NUMERICAL · STUDENT DERIVATION✎ Key Takeaway: Emptiness, finiteness, membership and equivalence are all decidable for regular languages.

Worked example: is a DFA's language infinite?

Problem Statement:
A DFA has n states. How can you decide whether its language is infinite?
Step 1: Use the pumping argument

Any accepted string of length ≥ n passes through some state twice, giving a loop that can be pumped forever.

Step 2: Bound the search

If L is infinite, it contains a string with length between n and 2n − 1: take the shortest one of length at least n, and pump down once.

Step 3: The test

Check every string with length from n to 2n − 1. Or, in graph terms, look for a cycle on some path from the start to an accepting state.

Final Answer:L is infinite iff it accepts some string of length n to 2n − 1
STUDENT PRACTICE · CONCEPT DRILL

Practice: test yourself

Original practice questions in the GATE style, with worked explanations. Not past-paper questions.

Problem 1 · FOUNDATION

Is it decidable whether two DFAs accept the same language?

Problem 2 · GATE-LEVEL

How do you decide whether L(D) is empty for a DFA D?

Problem 3 · TRICKY

Is it decidable whether L(D) = Σ* for a DFA D?

SOURCE TRANSPARENCY & CITATIONS

Primary Academic References & Exam Sources

Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.

Curated University Lecture Series
Introduction to Automata Theory, Languages, and Computation (3rd Edition) ·
LECTURE SERIES
RECOMMENDED YOUTUBE EDUCATORS & FULL-COURSE PLAYLISTS

Curated for clarity, rigorous numerical solving, and semester excellence:

Gate Smashers · Theory of Computation↗Instructor: Varun Singla · Covers: DFA/NFA, minimization, CFG, PDA, Turing machines, decidability

GATE-focused with clear minimal DFA construction and language classification.

Open YouTube↗
Knowledge Gate · TOC for GATE↗Instructor: Sanchit Jain · Covers: Regular expressions, pumping lemma, closure properties, Rice's theorem

Exam-pattern oriented with closure table drilling and decidability proofs.

Open YouTube↗
Ravindrababu Ravula · TOC Lectures↗Instructor: Ravindrababu Ravula · Covers: Formal proofs, Myhill-Nerode theorem, undecidability reductions

Mathematically rigorous treatment for high-rank GATE aspirants.

Open YouTube↗