Lecture 02

Finite Automata

Recall: Goal. Determine which decision we can solve

Thesis 1: "Decision Problem" \(\Longleftrightarrow\) Languages

Thesis 2: "Solving a Language" \(\Longleftrightarrow\) Finite Automata

Define: A (deterministic) finite automaton is a 5-tuple (\(Q,\Sigma,\delta,q_0,F\))

Define: A finite automaton accepts \(w\in\Sigma^n\) (\(n\geq 0\)) iff there is a sequence of states \(r_0,...,r_n\) such that

  1. \(\forall i\in[n]=\{1,2,...,n\}\) \(r_i=\delta (r_{i-1},w_i)\)
  2. \(r_n\in F\)
  3. \(r_0=q_0\)

Define The empty string is denoted by \(\epsilon\)

Observation: \(L_{\epsilon}=\{\epsilon\}\), \(L_{\emptyset}=\emptyset\), \(L_{\epsilon}\neq L_{\emptyset}\)

Example

  1. \(L=\{w|\)last char of \(w\) is 1\(\}\)
  2. \(L=\{w|\)next-to-last char of \(w\) is 1 \(\}\)
  3. \(L=\{w|w\) has the same number of \(01\) and \(10\) substrings\(\}\)

Define A language \(L\) is regular iff it is recognized by some finite automaton

Non-deterministic Finite Automata

Define A non-deterministic finite automaton is a 5-tuple (\(Q,\Sigma,\delta,q_0,F\))

Define The NFA accepts \(w\in\Sigma^n\) iff \(\exists r_0,...,r_n\in Q\) such that

  1. \(r_0=q_0\)
  2. \(r_n\in F\)
  3. \(\forall i\in[n], r_i\in\delta(r_{i-1},w_i)\)

Theorem Every language that can be recognized by an NFA is regular

Proof Given an NFA \(N\) we can build a DFA \(M\) that recognizes the same languages