Skip to main content

10.3 Master Decision & Closure Properties Matrix Across All 4 Chomsky Classes

📚Module 01Topic 1.1⏱️5 min read
🎯High-Yield For:Semester Exams • GATE CSE • Technical Interviews

💡 Core Intuition:​

Across the previous nine modules, you explored machines of increasing memory capability: from memoryless Finite Automata, to stack-augmented Pushdown Automata, bounded Linear Bounded Automata, and finally unconstrained Turing Machines.

With each jump in architectural power, a fundamental computational trade-off emerges: as a machine's representational expressive power increases, its algorithmic predictability collapses.

🍳 The Everyday Analogy:​

Think of the six language classes as six different legal contracts:

  • A Simple Parking Ticket (Regular Language): So rigid and standardized that an automated scanner can answer every legal question instantly (Is it paid? Is it duplicate? Does it contradict another ticket?). Every question is completely decidable.
  • A Residential Lease Agreement (DCFL / CFL): Contains nested clauses and matching conditions (like balanced parentheses). You can still easily check if a tenant violated a specific rule in polynomial time, but comparing two leases to see if they grant identical legal rights is impossible to solve with a universal algorithm.
  • A Sovereign Nation's Constitution (CSL / REC / RE): Infinitely expressive and capable of self-reference. You can simulate and enact any law, but determining whether an arbitrary law will ever lead to a constitutional crisis (the Halting Problem) is mathematically impossible for any algorithm to decide in advance.

💻 Bridging to Computer Science​

In software engineering, compiler construction, and static code verification, knowing the exact boundary between decidable and undecidable problems dictates what developer tools can physically achieve:

  • Linters and Lexers operate strictly on Regular Expressions because equivalence and emptiness are decidable in polynomial time—enabling automated regex minimization and dead-rule pruning.
  • Parsers operate on Deterministic Context-Free Grammars (LR/LALR) because membership is solvable in linear time (O(n)O(n)), and equivalence between DPDA grammars is decidable.
  • Program Analyzers and Security Scanners attempt to prove properties of arbitrary Turing-complete code (Recursive / RE), which immediately runs into undecidability via Rice's Theorem.

🏛️ The 6 Core Language Classes: The Architectural Spectrum​

Before presenting the decision and closure matrices, we establish the strict subset containment hierarchy connecting all six formal language families:

REG⊊DCFL⊊CFL⊊CSL⊊REC⊊RE\text{REG} \subsetneq \text{DCFL} \subsetneq \text{CFL} \subsetneq \text{CSL} \subsetneq \text{REC} \subsetneq \text{RE}

The Expressive Power vs. Algorithmic Predictability Dilemma

The fundamental computational law: every increase in machine memory reduces the set of decidable questions

High Predictability

Low Expressive Power (REG & DCFL)

⚡
Dominant Architecture / DomainFinite Automata & Deterministic PDA
  • •Memory is either finite (REG) or deterministic pushdown (DCFL).
  • •Membership is ultra-fast: O(n) linear scan.
  • •Equivalence is decidable: you can algorithmically verify if two specifications are identical.
  • •Cannot express arbitrary cross-serial dependencies or unrestricted counting.
"Complete algorithmic transparency at the expense of memory expressiveness."
High Expressive Power

Universal Computation (REC & RE)

🔮
Dominant Architecture / DomainTuring Machines & Unrestricted Grammars
  • •Memory is an infinite read/write tape capable of universal simulation.
  • •Can express any algorithm computable by modern supercomputers.
  • •Equivalence, emptiness, and disjointness are provably undecidable.
  • •Rice's Theorem proves that all non-trivial semantic properties are undecidable.
"Infinite expressive capability at the cost of total algorithmic undecidability."

📊 Master Decision Properties Matrix​

A decision property asks whether an algorithm exists that takes a formal language description (automaton or grammar) as input and outputs a definitive YES or NO in finite time for all instances.

The standard decision problems studied in formal language theory include:

  1. Membership (w∈Lw \in L): Given string ww and language LL, does ww belong to LL?
  2. Emptiness (L=∅L = \emptyset): Does LL contain zero strings?
  3. Finiteness (∣L∣<∞|L| < \infty): Is the number of strings in LL finite?
  4. Equivalence (L1=L2L_1 = L_2): Do two language descriptions accept the exact same set of strings?
  5. Subset / Containment (L1⊆L2L_1 \subseteq L_2): Is every string in L1L_1 also in L2L_2?
  6. Disjointness (L1∩L2=∅L_1 \cap L_2 = \emptyset): Do L1L_1 and L2L_2 share zero common strings?
  7. Universality (L=Σ∗L = \Sigma^*): Does LL contain every possible string over alphabet Σ\Sigma?
  8. Ambiguity: Does a given grammar generate at least one string with two distinct parse trees?
  9. Regularity: Is the language of a given grammar or automaton regular?
Decision PropertyRegular (DFA/NFA)DCFL (DPDA)CFL (NPDA/CFG)CSL (LBA)REC (Halting TM)RE (Turing Machine)
Membership (w∈Lw \in L)Decidable (O(n)O(n))Decidable (O(n)O(n))Decidable (O(n3)O(n^3) CYK)Decidable (PSPACE)Decidable (Halts)Undecidable (Semi-decidable)
Emptiness (L=∅L = \emptyset)Decidable (BFS / Graph Reachability)Decidable (CFG Generation)Decidable (CFG Generation)UndecidableUndecidable (Rice's Theorem)Undecidable (Rice's Theorem)
**Finiteness ($L< \infty$)**Decidable (Cycle detection)Decidable (CNF cycle test)Decidable (CNF cycle test)Undecidable
Equivalence (L1=L2L_1 = L_2)Decidable ((L1∩L2‾)∪(L1‾∩L2)=∅(L_1 \cap \overline{L_2}) \cup (\overline{L_1} \cap L_2) = \emptyset)Decidable (Sénizergues' Theorem)Undecidable (Reduction from PCP)UndecidableUndecidable (Rice's Theorem)Undecidable (Rice's Theorem)
Subset (L1⊆L2L_1 \subseteq L_2)Decidable (L1∩L2‾=∅L_1 \cap \overline{L_2} = \emptyset)UndecidableUndecidable (Reduction from PCP)UndecidableUndecidable (Rice's Theorem)Undecidable (Rice's Theorem)
Disjointness (L1∩L2=∅L_1 \cap L_2 = \emptyset)Decidable (Product DFA Emptiness)UndecidableUndecidable (Reduction from PCP)UndecidableUndecidable (Rice's Theorem)Undecidable (Rice's Theorem)
Universality (L=Σ∗L = \Sigma^*)Decidable (L‾=∅\overline{L} = \emptyset)Decidable (L‾=∅\overline{L} = \emptyset via DPDA complement)Undecidable (Reduction from PCP valid computations)UndecidableUndecidable (Rice's Theorem)Undecidable (Rice's Theorem)
Ambiguity of GrammarDecidable (Convert to DFA)Decidable (DPDA is unambiguous)Undecidable (Reduction from PCP)UndecidableUndecidableUndecidable
Regularity of LanguageTrivially Decidable (Always YES)Decidable (Stearns' Theorem)Undecidable (Reduction from PCP)UndecidableUndecidable (Rice's Theorem)Undecidable (Rice's Theorem)

The Decidability Breakdown Across Core Subsystems

Key algorithmic techniques behind the decidability results in the master matrix

🎯

Regular Decidability Engine

All Problems Decidable
  • Emptiness & Finiteness reduce to Breadth-First Search (BFS) reachability on directed graphs.
  • Equivalence and Subset reduce to DFA product construction and complementation.
  • All 9 decision properties are decidable in polynomial time.
📥

DCFL Equivalence Breakthrough

Sénizergues' Theorem (1997)
  • While DCFL subset is undecidable, DPDA equivalence is decidable.
  • Géraud Sénizergues proved DPDA equivalence decidable, winning the Gödel Prize.
  • Universality is decidable for DCFL because DCFLs are closed under complementation.
🌳

CFL Decision Boundaries

CYK Algorithm & PCP
  • Membership is decidable in O(n³) via the Cocke-Younger-Kasami (CYK) dynamic program.
  • Emptiness and Finiteness are decidable by pruning non-generating and unreachable non-terminals.
  • Universality, Equivalence, Subset, Disjointness, and Ambiguity are all undecidable via PCP reduction.
⚖️

Universal Turing Machine Wall

Rice's Theorem & Halting
  • Membership for RE is semi-decidable: accepts if in language, loops forever otherwise.
  • For REC and RE, every non-trivial semantic language question is provably undecidable.
  • No algorithm can inspect a general Turing machine and determine if its language is empty or finite.

🔀 Master Closure Properties Matrix​

A language class C\mathcal{C} is closed under an operation ⊙\odot if, whenever languages L1,L2∈CL_1, L_2 \in \mathcal{C}, the resulting language L1⊙L2L_1 \odot L_2 also belongs to C\mathcal{C}.

The standard operations tested in computability theory include:

  1. Union (L1∪L2L_1 \cup L_2)
  2. Intersection (L1∩L2L_1 \cap L_2)
  3. Complementation (L‾=Σ∗∖L\overline{L} = \Sigma^* \setminus L)
  4. Set Difference (L1∖L2=L1∩L2‾L_1 \setminus L_2 = L_1 \cap \overline{L_2})
  5. Concatenation (L1⋅L2L_1 \cdot L_2)
  6. Kleene Star (L∗L^*)
  7. Reversal (LRL^R)
  8. Homomorphism (h(L)h(L))
  9. ϵ\epsilon-Free Homomorphism (hϵ-free(L)h_{\epsilon\text{-free}}(L))
  10. Inverse Homomorphism (h−1(L)h^{-1}(L))
  11. Intersection with Regular Language (L∩RL \cap R, where R∈REGR \in \text{REG})
OperationRegularDCFLCFLCSLRecursive (REC)Recursively Enumerable (RE)
Union (L1∪L2L_1 \cup L_2)YESNOYESYESYESYES
Intersection (L1∩L2L_1 \cap L_2)YESNONOYESYESYES
Complementation (L‾\overline{L})YESYESNOYES (Immerman-Szelepcsényi)YESNO
Set Difference (L1∖L2L_1 \setminus L_2)YESNONOYESYESNO
Concatenation (L1⋅L2L_1 \cdot L_2)YESNOYESYESYESYES
Kleene Star (L∗L^*)YESNOYESYESYESYES
Reversal (LRL^R)YESNOYESYESYESYES
Arbitrary HomomorphismYESNOYESNO (Can erase tape space)NOYES
ϵ\epsilon-Free HomomorphismYESNOYESYESYESYES
Inverse HomomorphismYESYESYESYESYESYES
Intersection with Regular (L∩RL \cap R)YESYESYESYESYESYES
Architecture Flow

The Immerman-Szelepcsényi Theorem: CSL Complement Closure

The historic 1987 resolution showing non-deterministic space is closed under complementation

❓Open Problem

The LBA Complement Question

For 23 years (1964-1987), it was unknown if CSL is closed under complementation.

→
Inductive Counting
⚡Core Breakthrough

Count Reachable Configurations

Nondeterministic algorithm counts reachable states at distance k using only O(n) space.

→
Witness Generation
🏆Decisive Result

NSPACE(s(n)) = co-NSPACE(s(n))

Proved that CSL is closed under complementation, earning the 1995 Gödel Prize.


🧱 The Fundamental Algebraic Counter-Examples​

To master closure properties, you must memorize the canonical counter-examples that demonstrate non-closure across the hierarchy:

Why DCFL is Not Closed Under Union​

Consider two deterministic context-free languages:

L1={anbncm∣n,m≥1}∈DCFLL_1 = \{ a^n b^n c^m \mid n, m \ge 1 \} \in \text{DCFL} L2={anbmcm∣n,m≥1}∈DCFLL_2 = \{ a^n b^m c^m \mid n, m \ge 1 \} \in \text{DCFL}

Both are accepted by deterministic pushdown automata because the matching condition is fixed in advance (anbna^n b^n for L1L_1, and bmcmb^m c^m for L2L_2).

However, their union is:

L=L1∪L2={anbpcq∣(p=n)∨(p=q)}L = L_1 \cup L_2 = \{ a^n b^p c^q \mid (p = n) \lor (p = q) \}

When a machine reads anbpa^n b^p, it cannot deterministically predict whether it must check p=np = n or wait to match p=qp = q against cqc^q later. Therefore, L1∪L2∈CFL∖DCFLL_1 \cup L_2 \in \text{CFL} \setminus \text{DCFL}.

Why CFL is Not Closed Under Intersection​

Using the exact same languages L1L_1 and L2L_2:

L1∩L2={anbncn∣n≥1}L_1 \cap L_2 = \{ a^n b^n c^n \mid n \ge 1 \}

Matching three independent counts requires tracking two counts simultaneously, which exceeds the single-stack capability of a PDA. Therefore, L1∩L2∉CFLL_1 \cap L_2 \notin \text{CFL}, proving CFL is not closed under intersection.

Why CFL is Not Closed Under Complementation​

By De Morgan's Law:

L1∩L2=L1‾∪L2‾‾L_1 \cap L_2 = \overline{\overline{L_1} \cup \overline{L_2}}

If CFL were closed under complementation, then since CFL is closed under union, it would necessarily be closed under intersection. Because intersection closure fails, CFL cannot be closed under complementation.

Why RE is Not Closed Under Complementation​

Recall the Halting Problem language:

LHP={⟨M,w⟩∣M halts on input w}∈REL_{HP} = \{ \langle M, w \rangle \mid M \text{ halts on input } w \} \in \text{RE}

By Post's Complementation Theorem:

(L∈RE∧L‾∈RE)  ⟺  L∈REC(L \in \text{RE} \land \overline{L} \in \text{RE}) \iff L \in \text{REC}

Since LHP∉RECL_{HP} \notin \text{REC}, its complement LHP‾\overline{L_{HP}} cannot be in RE. Therefore, RE is not closed under complementation.


🏭 Real-World Production Context: Compiler & Tooling Design​

The mathematical boundaries codified in these two master matrices directly govern the architecture of software infrastructure:

Real-World Software Subsystems Mapped to Chomsky Classes

How engineering frameworks exploit formal language boundaries for performance and correctness

Regular (DFA / NFA)

Lexical Analyzers & Network Packet Filters

⚡

Tools like Flex, Ripgrep, and Linux eBPF socket filters compile regular expressions directly into DFAs. Because DFA equivalence and emptiness are decidable in polynomial time, routers and search engines automatically simplify rules and prove zero false-positive dead paths.

Flex LexerRipgrep EngineLinux eBPF Packet FilterNginx URL Router
↓Token Stream Passes to Parser
DCFL (Deterministic PDA)

Programming Language Compilers (LR / LALR)

🌳

Production compilers (Bison, GCC, Rustc, Clang) restrict syntax to DCFL subclasses (LR(1), LALR(1)). This guarantees deterministic O(n) parsing time with zero backtracking, while ensuring unambiguous syntax trees.

Rustc GrammarClang AST ParserBison / Yacc GeneratorsJSON Deserializers
↓Syntax Tree Passes to Semantic Analyzer
Undecidable Boundary (RE / Turing Complete)

Static Program Analyzers & Proof Assistants

🛡️

Compilers attempting whole-program optimization (dead code elimination, memory safety proofs, termination verification) hit the Rice's Theorem wall. Production tools (SonarQube, Coverity, LLVM Opt) must use sound approximations and heuristic thresholds rather than exact algorithms.

LLVM Dead-Code EliminatorRust Borrow CheckerSonarQube Static AnalyzerValgrind Memory Engine

📐 Numerical Applications & Worked Examples​

Example 1: Multi-Class Intersection & Closure Deduction​

Problem Statement:
Let L1L_1 be a Regular Language, L2L_2 be a Deterministic Context-Free Language (DCFL), and L3L_3 be a Context-Free Language (CFL). Determine the tightest language classification for each of the following composite expressions:

  1. E1=L2∩L1E_1 = L_2 \cap L_1
  2. E2=L3∖L1E_2 = L_3 \setminus L_1
  3. E3=L1∖L2E_3 = L_1 \setminus L_2

Step-by-Step Solution:

  • Analysis of E1=L2∩L1E_1 = L_2 \cap L_1:

    • L2L_2 is accepted by a DPDA M2=(Q2,Σ,Γ,δ2,q02,Z0,F2)M_2 = (Q_2, \Sigma, \Gamma, \delta_2, q_{02}, Z_0, F_2).
    • L1L_1 is accepted by a DFA M1=(Q1,Σ,δ1,q01,F1)M_1 = (Q_1, \Sigma, \delta_1, q_{01}, F_1).
    • We construct a product DPDA M=M2×M1M = M_2 \times M_1 where the stack is controlled strictly by M2M_2 and the state space is Q2×Q1Q_2 \times Q_1. Because M1M_1 is deterministic and consumes symbols in lockstep without stack operations, the product automaton remains completely deterministic.
    • Therefore, E1E_1 is guaranteed to be a DCFL.
  • Analysis of E2=L3∖L1E_2 = L_3 \setminus L_1:

    • By set theory:
E2=L3∖L1=L3∩L1‾E_2 = L_3 \setminus L_1 = L_3 \cap \overline{L_1}
  • Because L1L_1 is Regular, its complement L1‾\overline{L_1} is also Regular.

  • The intersection of any Context-Free Language (L3L_3) with a Regular Language (L1‾\overline{L_1}) is always a Context-Free Language (via PDA ×\times DFA product construction).

  • Therefore, E2E_2 is guaranteed to be a CFL.

  • Analysis of E3=L1∖L2E_3 = L_1 \setminus L_2:

    • By set theory:
E3=L1∖L2=L1∩L2‾E_3 = L_1 \setminus L_2 = L_1 \cap \overline{L_2}
  • Because L2L_2 is a DCFL, and DCFL is closed under complementation, L2‾\overline{L_2} is also a DCFL.
  • We already proved in part 1 that the intersection of a Regular Language with a DCFL is a DCFL.
  • Therefore, E3E_3 is guaranteed to be a DCFL.

Example 2: Decidability of Cross-Class Subsets​

Problem Statement:
Analyze the decidability of the following three containment queries:

  1. Given a Context-Free Grammar GG and a DFA MM, is L(G)⊆L(M)L(G) \subseteq L(M) decidable?
  2. Given a DFA MM and a Context-Free Grammar GG, is L(M)⊆L(G)L(M) \subseteq L(G) decidable?
  3. Given two DPDAs M1M_1 and M2M_2, is L(M1)⊆L(M2)L(M_1) \subseteq L(M_2) decidable?

Step-by-Step Solution:

  • Case 1: L(G)⊆L(M)L(G) \subseteq L(M):
    • Recall the set identity:
A⊆B  ⟺  A∩B‾=∅A \subseteq B \iff A \cap \overline{B} = \emptyset
  • Applied to our query:
L(G)⊆L(M)  ⟺  L(G)∩L(M)‾=∅L(G) \subseteq L(M) \iff L(G) \cap \overline{L(M)} = \emptyset
  • MM is a DFA, so its complement L(M)‾\overline{L(M)} is easily constructed by swapping final and non-final states, resulting in a regular language.

  • L(G)L(G) is a CFL. The intersection of a CFL and a Regular Language (L(M)‾\overline{L(M)}) is a CFL.

  • Emptiness of a Context-Free Language is decidable in polynomial time (by checking if the start symbol can generate a string of terminals).

  • Therefore, L(G)⊆L(M)L(G) \subseteq L(M) is DECIDABLE.

  • Case 2: L(M)⊆L(G)L(M) \subseteq L(G):

    • In this case:
L(M)⊆L(G)  ⟺  L(M)∩L(G)‾=∅L(M) \subseteq L(G) \iff L(M) \cap \overline{L(G)} = \emptyset
  • But CFL is not closed under complementation. L(G)‾\overline{L(G)} is not necessarily a CFL.
  • Furthermore, if we choose MM such that L(M)=Σ∗L(M) = \Sigma^*, the query simplifies to:
Σ∗⊆L(G)  ⟺  L(G)=Σ∗(Universality Problem for CFG)\Sigma^* \subseteq L(G) \iff L(G) = \Sigma^* \quad \text{(Universality Problem for CFG)}
  • The Universality problem for CFGs is provably undecidable via reduction from the Post Correspondence Problem (PCP).

  • Therefore, L(M)⊆L(G)L(M) \subseteq L(G) is UNDECIDABLE.

  • Case 3: L(M1)⊆L(M2)L(M_1) \subseteq L(M_2) for DPDAs:

    • Although DPDA equivalence (L(M1)=L(M2)L(M_1) = L(M_2)) is decidable by Sénizergues' Theorem, DPDA subset (L(M1)⊆L(M2)L(M_1) \subseteq L(M_2)) is undecidable.
    • Any algorithm deciding subset for DPDAs could decide whether Σ∗⊆L(M)\Sigma^* \subseteq L(M), which can encode the undecidable valid computation history of a Turing machine.
    • Therefore, L(M1)⊆L(M2)L(M_1) \subseteq L(M_2) is UNDECIDABLE.

Example 3: Verifying Rice's Theorem on Boundary Properties​

Problem Statement:
For a given Turing Machine MM, determine whether each of the following properties is Decidable, Undecidable but Semi-Decidable (RE), or Non-RE:

  1. P1P_1: Does MM halt on the empty string ϵ\epsilon within 1000 steps?
  2. P2P_2: Is L(M)L(M) a regular language?
  3. P3P_3: Does L(M)L(M) contain at least one string of length greater than 5?

Step-by-Step Solution:

  • Analysis of P1P_1 (Halts on ϵ\epsilon within 1000 steps):

    • This is a syntactic / bounded runtime property, NOT a semantic property of L(M)L(M).
    • An algorithm can simply simulate MM on ϵ\epsilon step-by-step using a universal step-counter up to 1000 transitions.
    • If MM halts within 1000 steps, return YES. If it reaches step 1001 without halting, return NO.
    • Because the simulation is strictly bounded, the algorithm always terminates.
    • Therefore, P1P_1 is DECIDABLE.
  • Analysis of P2P_2 (L(M)L(M) is regular):

    • This is a semantic property because it depends solely on L(M)L(M): if L(M1)=L(M2)L(M_1) = L(M_2), then either both are regular or neither is regular.
    • It is non-trivial:
      • There exists a TM MregM_{reg} where L(Mreg)=(0+1)∗L(M_{reg}) = (0+1)^* (Regular   ⟹  \implies YES).
      • There exists a TM MnonregM_{nonreg} where L(Mnonreg)={0n1n∣n≥0}L(M_{nonreg}) = \{ 0^n 1^n \mid n \ge 0 \} (Non-regular   ⟹  \implies NO).
    • By Rice's Theorem (Part 1), P2P_2 is undecidable.
    • By Rice's Theorem (Part 2), since the set of languages having property P2P_2 contains infinite languages without containing all of their finite sub-languages, it is not recursively enumerable.
    • Therefore, P2P_2 is NON-RE (Undecidable and Not Semi-Decidable).
  • Analysis of P3P_3 (L(M)L(M) contains a string of length >5> 5):

    • Semantic and non-trivial   ⟹  \implies undecidable by Rice's Theorem.
    • Is it semi-decidable (RE)?
      • A dovetailing Turing Machine can enumerate all strings w∈Σ∗w \in \Sigma^* with ∣w∣>5|w| > 5.
      • For each string, simulate MM for kk steps across all candidate strings.
      • If MM accepts any string of length >5> 5, the simulator detects it and immediately halts and outputs YES.
      • If MM contains no such string, the simulation runs forever.
    • Because a semi-decision procedure exists, P3P_3 is RE (Semi-Decidable, but Undecidable).

🎯 Exam & Interview Pitfall Check​

Core Conceptual Questions
  1. Why is DPDA equivalence decidable while CFL equivalence is undecidable?

    • Answer: DPDAs have a single deterministic computation path for every input string. This mathematical rigidity allows configurations to be structured as deterministic transition graphs where equivalence can be verified through bisimulation (Sénizergues' Theorem). General CFGs permit non-deterministic branching and ambiguity, enabling them to encode the search space of the Post Correspondence Problem (PCP), making equivalence undecidable.
  2. Why does ϵ\epsilon-free homomorphism preserve CSL, while arbitrary homomorphism does not?

    • Answer: A Linear Bounded Automaton is constrained to O(n)O(n) tape space where n=∣w∣n = |w|. If a homomorphism hh is arbitrary, it can map long strings to the empty string ϵ\epsilon (erasing symbols). This drastically shrinks the input string length while requiring the LBA to simulate a computation that originally needed much more tape space, breaking the O(n)O(n) bound and generating unrestricted RE languages. ϵ\epsilon-free homomorphisms guarantee ∣h(w)∣≥∣w∣|h(w)| \ge |w|, keeping tape usage strictly bounded.
Common Interview Traps
  • Trap: Assuming Subset is Decidable whenever Equivalence is Decidable:
    • For DPDAs, equivalence (L1=L2L_1 = L_2) is decidable, but subset (L1⊆L2L_1 \subseteq L_2) is undecidable! Never assume the two have identical decidability status.
  • Trap: Forgetting that Intersection with Regular Preserves Class:
    • Students often panic when seeing L∩RL \cap R for DCFL, CFL, or CSL. Remember the Golden Rule: Intersection with a Regular Language (L∩RL \cap R) preserves EVERY class in the Chomsky hierarchy (REG, DCFL, CFL, CSL, REC, RE).
  • Trap: Conflating Rice's Theorem with Syntax Checks:
    • Rice's Theorem applies strictly to semantic properties (L(M)L(M)). Questions about machine syntax ("Does MM have 5 states?", "Does MM move left on blank?") are trivial syntactic inspections and are completely decidable.

💬

Discussion & Doubts