# TOC 2027 Rank-Decider: Myhill-Nerode Minimal DFA Proofs, Inherent Ambiguity & Reductions
Exam: GATE Computer Science & Information Technology (GATE CS)
Subject: Theory of Computation
Canonical URL: https://gateandnet.com/exams/gate-cs/theory-of-computation/myhill-nerode-inherent-ambiguity-and-reductions

> Computing exact minimal DFA state counts via Myhill-Nerode distinguishing extensions, Deterministic vs Nondeterministic CFL traps, inherently ambiguous languages, and RE vs co-RE reductions.

## 1. High-Yield Language Classification Cheat-Table (GATE 2026–2027 MSQ Goldmine!)

| Formal Language $L$ | Exact Tightest Class | Why? |
| :--- | :--- | :--- |
| $\{a^n b^m : n, m \ge 0\}$ or $\{w \in \{0,1\}^* : \#_0(w) \equiv \#_1(w) \pmod 3\}$ | **Regular** | Bounded finite modular memory ($3$ states) |
| $\{w c w^R : w \in \{a,b\}^*\}$ or $\{a^n b^n : n \ge 1\}$ | **DCFL** (Deterministic CFL) | Center marker `c` / transition $a \to b$ tells DPDA unambiguously when to pop! |
| $\{w w^R : w \in \{a,b\}^*\}$ (Even Palindromes without center marker) | **CFL \setminus DCFL** | NPDA must nondeterministically guess midpoint! |
| $\{a^i b^j c^k : i = j \text{ or } j = k\}$ | **CFL \setminus DCFL** *(Inherently Ambiguous!)* | Every CFG for it has two parse trees on $a^n b^n c^n$! |
| $\{a^n b^n c^n : n \ge 0\}$ or $\{w w : w \in \{a,b\}^*\}$ or $\{a^{p} : p \text{ prime}\}$ | **CSL \setminus CFL** (Recursive!) | Violates CFL Pumping Lemma, decidable in linear space |
| $L_{\text{halt}} = \{\langle M, w \rangle : M \text{ halts on } w\}$ | **RE \setminus REC** | TM accepts if halts; complement $\overline{L_{\text{halt}}}$ is **NOT even RE**! |
| $L_{\text{eq}} = \{\langle M_1, M_2 \rangle : L(M_1) = L(M_2)\}$ or $L_{\text{total}} = \{\langle M \rangle : L(M) = \Sigma^*\}$ | **Neither RE nor co-RE** | Requires infinitely many halting checks ($\Pi_2^0$-complete)! |

## Solved Practice Questions & PYQs

### [GATE CS 2027 Expected MSQ | MSQ]
Let $L_1$ be a **Context-Free Language (CFL)** and $L_2$ be a **Regular Language** over $\Sigma = \{a, b\}$. Which of the following languages are **GUARANTEED to be Context-Free**?
**Correct Answer:** A,B,D
**Solution:** - **A (True):** CFLs are closed under **intersection with Regular languages** (product construction of PDA $\times$ DFA).
- **B (True!):** Regular languages are closed under complement ($\overline{L_2}$ is Regular!), so $L_1 \cap \overline{L_2}$ is CFL $\cap$ Regular $=$ **CFL**!
- **C (False):** Taking $L_2 = \emptyset$ gives $\overline{L_1}$, and CFLs are **NOT** closed under complement!
- **D (True):** Every Regular language is a CFL, and CFLs are closed under concatenation.

### [GATE CS 2026–27 Expected | MCQ]
Suppose language $A$ is **known to be Undecidable** and we construct a computable many-one reduction $A \le_m B$. What can we conclude with $100\%$ certainty about $B$?
**Correct Answer:** B
**Solution:** If $B$ were decidable, composing the reduction $f$ with $B$’s decider would decide $A$ — contradiction! Thus **$B$ is guaranteed Undecidable** (though $B$ may or may not be RE).
