UTD CS 4384 - Lecture 6 Nondeterministic Finite Automata (NFA)

Unformatted text preview:

Lecture 6 Nondeterministic Finite Automata (NFA)NFASlide 3Slide 4Slide 5Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Theorem 1G(r)Slide 16Slide 17Slide 18Slide 19Slide 20(0+1)*0(0+1)Slide 22Slide 23Lecture 6 Nondeterministic Finite Automata (NFA)NFA Finite ControltapeheadThe tape is divided into finitely many cells. Each cell contains a symbol in an alphabet Σ. a lp habet•The head scans at a cell on the tape and can read a symbol on the cell. In each move, the head move to the right cell or stop there (in a ε-move).a•The finite control has finitely many states which form a set Q. For each move, the state is changed according to the evaluation of a transition function δ : Q x (Σ U {ε}) → 2 (the family of all subsets of Q) QQ•δ(q, a) = {p1, p2} for a in Σ means that if the head reads symbol a and the finite control is in the state q, then the next state should be p1 or p2, and the head moves one cell to the right.pq aap=p1 or p2•δ(q, ε) = {p1, p2} means that if the finite control is in the state q, then the next state can be be p1 or p2, and the head does not move. This move is called a ε-move.pq ap=p1 or p2a•δ(q, a) = Φ means that the NFA is stuck.q a?•There are some special states: an initial state s and a final set F of final states. •Initially, the NTM is in the initial state s and the head scans the leftmost cell. The tape holds an input string. s•When the head gets off the tape, the NFA stops. An input string x is accepted by the NFA if there is a computation path to make the NFA stop at a final state. •Otherwise, the input string is rejected.hx•The NTM can be represented by M = (Q, Σ, δ, s, F) where Σ is the alphabet of input symbols.•The set of all strings accepted by a NFA M is denoted by L(M). We also say that the language L(M) is accepted by M.•The transition diagram of a NFA is an alternative way to represent the DFA.•For M = (Q, Σ, δ, s, F), the transition diagram of M is a symbol-labeled digraph G=(V, E) satisfying the following: V = Q (s = , f = for f \in F) E = { q p | p \in δ(q, a)}. aδ 0 1 ε s p, s s p q s q q q spq0,10100εTheorem 1•Every regular language can be accepted by an NFA.G(r)•For each regular expression r, we can construct a digraph G(r) with edges labeled by symbols and ε as follows.•If r=Φ, then•If r≠Φ, thenΦ*ε ε•(01+111)*•(01)*(111)*•10(0+1)*00•10(0+1)*+(0+1)*00•((01)*(10)*0*)*10(0+1)*+(0+1)*0010(0+1)*(0+1)*001 0(0+1)*00(0+1)*10 ε ε000,10,1εε(0+1)*0(0+1)50,10 0 0 0 0 01 1111Given an NFA M, construct an NFA accepting L(M) .R01001εεεε00011Given an NFA M, construct an NFA accepting L(M) .01001First, turn NFA to DFAand then do.Is it correct?Answer: No!What is the correct


View Full Document

UTD CS 4384 - Lecture 6 Nondeterministic Finite Automata (NFA)

Download Lecture 6 Nondeterministic Finite Automata (NFA)
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 6 Nondeterministic Finite Automata (NFA) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 6 Nondeterministic Finite Automata (NFA) 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?