Theory of Computation Formula Sheet

Formal 5-tuple Deterministic Finite Automata (DFA) definitions, regular expressions, closure properties, and lexical language acceptance.

Core Equations & Variable Definitions

Formal DFA 5-Tuple

M = (Q, \Sigma, \delta, q_0, F), \quad \delta: Q \times \Sigma \to Q

Q: finite states, Sigma: alphabet, delta: transition function, q_0: start state, F: accept states.

Extended Transition & Acceptance

L(M) = \{ w \in \Sigma^* \mid \hat{\delta}(q_0, w) \in F \}

A string w is accepted if its unique state path ends inside F.

Regular Expression Core Operators

R_1 \cup R_2 \; (\text{union}), \quad R_1 R_2 \; (\text{concat}), \quad R^* \; (\text{Kleene star})

Regular expressions, DFAs, and NFAs recognize the exact same class of regular languages.

Subset Construction Bound (NFA to DFA)

|Q_{\text{DFA}}| \le 2^{|Q_{\text{NFA}}|}

Every NFA has an equivalent DFA, though worst-case state count can grow exponentially.

Interactive Theory of Computation Calculators

Common Exam Questions

What is the difference between a DFA and an NFA?

A DFA has exactly one deterministic transition from every state on every alphabet symbol and no epsilon transitions, whereas an NFA may have zero, multiple, or epsilon transitions.

Can a regular expression match balanced nested parentheses?

No. Balanced nesting requires unbounded counting memory, which violates the Pumping Lemma for regular languages and requires a context-free grammar (pushdown automaton).

Are regular languages closed under complement and intersection?

Yes. To complement a DFA, simply swap accepting and non-accepting states; intersection follows from De Morgans law or product-automaton construction.