0% found this document useful (0 votes)
38 views23 pages

CS-850: Advanced Theory of Computation: Adnan Rashid

This document summarizes key concepts from a lecture on Non-deterministic Finite Automata (NFAs) including: (1) NFAs can express languages more easily than Deterministic Finite Automata (DFAs); (2) the transition function δ defines the resulting states reached from an input; and (3) the language accepted by an NFA M consists of strings w where the transition function reaches an accepting state from the starting state with input w. Students are assigned exercises on DFAs/NFAs due before the next class.
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)
38 views23 pages

CS-850: Advanced Theory of Computation: Adnan Rashid

This document summarizes key concepts from a lecture on Non-deterministic Finite Automata (NFAs) including: (1) NFAs can express languages more easily than Deterministic Finite Automata (DFAs); (2) the transition function δ defines the resulting states reached from an input; and (3) the language accepted by an NFA M consists of strings w where the transition function reaches an accepting state from the starting state with input w. Students are assigned exercises on DFAs/NFAs due before the next class.
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/ 23

CS-850: Advanced

Theory of Computation
(Spring 2020)

Lecture 5
Adnan Rashid

Adnan Rashid Advanced Theory of Computation 1


NFA vs DFA
▪ NFAs are interesting because we can express
languages easier than DFAs

NFA M1 DFA M 2

L( M1 ) = {a} L( M 2 ) = {a}
Adnan Rashid Advanced Theory of Computation 2
Transition Function 

resulting states reached


by following one transition
with input symbol

 (q, x ) = q1 , q2 ,, qk 

Adnan Rashid Advanced Theory of Computation 3


Reachable States
States reachable from q0 scanning 1

 (q0 , 1) = q1

Adnan Rashid Advanced Theory of Computation 4


Reachable States
States reachable from q1 scanning 0
 (q1,0) = {q0 , q2}

Adnan Rashid Advanced Theory of Computation 5


Reachable States
▪ States reachable from q0 with one transition
scanning no input symbol

 (q0 ,  ) = {q2 }

Adnan Rashid Advanced Theory of Computation 6


Reachable States

States reachable from q2 scanning


 (q2 ,1) = 

Adnan Rashid Advanced Theory of Computation 7


Extended Transition
*
Function 
Similar to  but applied on strings

 (q0 , a) = q1
*

Adnan Rashid Advanced Theory of Computation 8


Reachable States
States reachable from q0 scanning aa

 (q0 , aa) = q4 , q5 


*

Adnan Rashid Advanced Theory of Computation 9


Reachable States

States reachable from q0 scanning ab

 (q0 , ab) = q2 , q3 , q0 


*

Adnan Rashid Advanced Theory of Computation 10


Walk of Transitions
Generally, q   * (q, w) implies that
there is a walk from q to q with a label w

w =  1 2  k

Adnan Rashid Advanced Theory of Computation 12


Language for an NFA M
▪ The language accepted by M is:
L(M ) = w1 , w2 ,..., wn 
• Where for each wm

 * (q0 ,w m ) = {qi ,..., qk , , q j }

• and there is some qk  F (accepting state)

Adnan Rashid Advanced Theory of Computation 13


Accepted Strings
 (q0 ,wm )
*

qk  F
wm  L(M )

Adnan Rashid Advanced Theory of Computation 14


Accepted Strings
F = q0 ,q5

Adnan Rashid Advanced Theory of Computation 15


Accepted Strings
F = q0 ,q5

Adnan Rashid Advanced Theory of Computation 16


Accepted Strings
F = q0 ,q5

Adnan Rashid Advanced Theory of Computation 17


Accepted Strings
F = q0 ,q5

Adnan Rashid Advanced Theory of Computation 18


Accepted Strings
F = q0 ,q5

L(M ) = ab  ab {aa}


* *

Adnan Rashid Advanced Theory of Computation 19


NFA Accepted Languages

NFAs accept the Regular Languages

Adnan Rashid Advanced Theory of Computation 20


Formal Definition of NFAs
M = (Q, ,  , q0 , F )
Q : Set of states, i.e. q0 , q1, q2 
  : Input aplhabet, i.e.     = a, b   
 : Transition function  : Q    → P(Q)
q0 : Initial state
F : Accepting states

Adnan Rashid Advanced Theory of Computation 21


Assignment 1
▪ Solve Exercise 1.1 to 1.7 (on DFA/NFA) from the
Sipser’s book and submit assignments to your CR

• Wednesday, 12/02/2020, before the start of class

Adnan Rashid Advanced Theory of Computation 22


Assignment Starting with
Following

Adnan Rashid Advanced Theory of Computation 23


Thank you!

Adnan Rashid Advanced Theory of Computation 24

You might also like