0% found this document useful (0 votes)
46 views2 pages

Notes: Nondeterministic Finite Automata: cs302 Theory of Computation

This document discusses nondeterministic finite automata (NFAs) and provides the following information: 1) It defines an NFA as a 5-tuple (Q, Σ, δ, q0, F) where δ maps state-symbol pairs to a set of states. 2) It describes how to compute the extended transition function δ* for an NFA to determine if a string is accepted. 3) It explains that every NFA has an equivalent deterministic finite automaton (DFA) that recognizes the same language, which can be constructed by considering all state subsets.

Uploaded by

rishi kesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views2 pages

Notes: Nondeterministic Finite Automata: cs302 Theory of Computation

This document discusses nondeterministic finite automata (NFAs) and provides the following information: 1) It defines an NFA as a 5-tuple (Q, Σ, δ, q0, F) where δ maps state-symbol pairs to a set of states. 2) It describes how to compute the extended transition function δ* for an NFA to determine if a string is accepted. 3) It explains that every NFA has an equivalent deterministic finite automaton (DFA) that recognizes the same language, which can be constructed by considering all state subsets.

Uploaded by

rishi kesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

cs302 Theory of Computation UVa Spring 2008

Notes: Nondeterministic Finite Automata


Tuesday, 29 January

Upcoming Schedule
This week: Finish reading Chapter 1
Wednesday, 30 January (9:30-10:30am): Theory Coffee Hours (Wilsdorf Coffee
Shop)
Wednesday, 30 January (6-7pm): Problem-Solving Session (Olsson 226D)
Thursday, 7 February: Problem Set 2 is due at the beginning of class. Problem
Set 2 is longer and harder than Problem Set 1. Don’t wait to get started on it.

Definition: A nondeterministic finite automaton (NFA) is a 5-tuple (Q, Σ, δ, q0 , F ), where Q,


Σ, q0 , and F are defined as they are for a DFA, and δ is defined as:

δ: Q × (Σ ∪ {}) → P(Q) —- a function from a state and alphabet symbol to a


set of states that is a member of P(Q), the power set of Q.

Example 1: Draw a NFA that recognizes the language of all strings in {0, 1}∗ that start and
end with the same symbol.

Computation Model for an NFA


The NFA A = (Q, Σ, δ, q0 , F ) accepts the language L(A) = {w|δ ∗ (q0 , w) ∩ F 6= ∅} where δ ∗ :
Q × Σ∗ −→ P(Q) is the extended transition function defined by:

δ ∗ (q, ) = {q}
For w = ax where a ∈ Σ and x ∈ Σ∗ , δ ∗ (q, ax) = qi ∈δ(q,a) δ ∗ (qi , x)
S

NFA-1
Equivalence of NFAs and DFAs. Show that the set of languages that can be recognized by
some NFA is equal to the set of languages that can be recognized by some DFA.

1. Every DFA has an equivalent NFA. (Proof by construction - trivial.)

2. Every NFA has an equivalent DFA. (Proof by construction below, and in book, Theo-
rem 1.39)

Given N = (Q, Σ, δ, q0 , F ), and NFA recognizing some language A. We prove that every
NFA has an equivalent DFA by showing how to construct a DFA N 0 from N that recognizes
the same language A. N 0 = (Q0 , Σ0 , δ 0 , q00 , F 0 ) defined as:

1. Q0 = P(Q) — we have a state in Q0 to represent each possible subset of states in Q.


The label for each state in Q0 is a set.

2. Σ0 = Σ — the alphabet is the same

3. δ 0 : Q0 ×Σ0 → Q0 is defined to capture all possible states resulting from δ transitioning


0
S
from the input state: δ (R, a) = r∈R E(δ(r, a))

4. q00 = E(q0 )

5. F 0 = {states in Q0 that correspond to subsets of states that include a state in F }

where E : Q0 → Q0 : is the epsilon-transition function defined by:


[
E(q) = q ∪ E(r)
r∈δ(q,)

Convert the NFA from Example 1 into a DFA.

Suppose language A can be recognized by an NFA with n states. What can we say about
the number of states a DFA that recognizes A must have?

Prove that the regular languages


are closed under reversal. That is, if L is a regular lan-
guage, then LR = w|wR ∈ L is a regular language.


NFA-2

You might also like