Kleene’s Theorem

Context: FIT2014_MOC · the theorem that regular expressions and finite automata describe exactly the same languages · the hub for the three conversion procedures

Quick Revision

  • 🎯 Objective: any language definable by a regular expression, FA, NFA or GNFA can be defined by any of the others ➔ all four formalisms have identical expressive power.
  • ⚡ Key Constraint: the proof is constructive — it is a cycle of conversions, and each leg is a examinable hand procedure.

📝 The theorem

Theorem (Kleene). Any language which can be defined by

  • a Regular Expression, · a Finite Automaton (FA/DFA), · a Nondeterministic Finite Automaton (NFA), · a Generalised NFA (GNFA)

can be defined by any of the other methods.

  • Consequence ➔ “regular language” is a robust notion: it does not matter which of the four you use to define it.
  • GNFA ➔ an NFA whose transitions may be labelled by regular expressions rather than single letters — the bridge used to get back from automata to expressions.

🔁 The conversion cycle

stateDiagram-v2
    direction LR
    Regexp --> NFA: rewrite edges
    NFA --> FA: subset construction
    FA --> GNFA: add new Start/Final
    GNFA --> Regexp: state elimination
LegProcedureNote
Regexp NFArewrite each edge until every label is a letter or Converting Regular Expressions to NFA
NFA FAsubset construction (sets of NFA states become FA states)NFA to DFA (Subset Construction)
FA GNFAadd a fresh single Start and single Final state joined by FA to Regular Expression (GNFA State Elimination)
GNFA Regexpstate elimination, one state at a timesame note
  • Why a cycle ➔ going all the way round shows each formalism can simulate the next, so all four are equivalent. Any two are connected by following the arrows.

❓ What Kleene’s Theorem does not settle

  • Answered YES ➔ every regex language has an FA; every FA language has a regex. The two circles coincide.
  • Now answeredcan every language be represented by a regular expression or finite automaton?No, on two independent grounds:
  • The final picture is a proper subset of .

⚠️ Common Mistakes

  • 💡 Equivalence is about the language, not the machine ➔ converting changes size and shape drastically (an -state NFA can need DFA states); only the set of accepted strings is preserved.
  • 💡 “Regular” ≠ “any language” ➔ Kleene’s Theorem says the four formalisms agree with each other, not that they cover everything.
  • 💡 GNFA is a proof device ➔ it exists to make the FA regex direction tractable; it is not a separate model you would design from scratch.

🧠 Active Recall