Skip to main content

4. Review DFA & NFA

13/02/23

DFANFA
States0000000000
Initial State1Several
TransitionFor every state, there is exactly 1 condition for each symbolSeveral or none
Final StateSeveral or noneSeveral or none
RunOne (initial)Several
LanguageThe token in final stateA token in a final state

Maths

DFANFA
StatesQ a finite stateQ a finite state
Initial Stateq0:Qq_0:QS:QpropS : Q\to prop
Transitionδ:QΣQδ:Q\to\Sigma\to Qδ:QΣQpropδ:Q\to\Sigma\to Q \to prop
Final StateF:QpropF:Q\to propF:QpropF:Q\to prop
Run??:QΣQ??:Q\to\Sigma*\to Q??:QΣQprop??:Q\to\Sigma*\to Q \to prop
LanguageThe token in final stateA token in a final state

Theorem 1 (Easy)

For every DFA A there is a NFA NA that accepts the same language LA=L(NA)LA=L(NA) Needs a lemma NA=(Q,Σ,δNNA = (Q,\Sigma,δ_N SNgg=(δqx=q)S_N g * g' = (δqx=q') Sq=(q=q?)S q = (q=q_?)

Theorem 2

For every NFA A=(Q,Σ,δ,S,F)A=(Q,\Sigma,δ,S,F) there is a DFA DA that recognises the same language LA=L(D(A))LA=L(D(A)) PQ=Qprop QBoolPQ=Q\to prop ~ Q\to Bool