Chapter1Section2_F11

Chapter1Section2_F11 - 91.304 Foundations of (Theoretical)...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
91.304 Foundations of (Theoretical) Computer Science Chapter 1 Lecture Notes (Section 1.2: NFA’s) David Martin [email protected] uml edu [email protected] With some modifications by Prof. Karen Daniels Slides also added from http://cis.k.hosei.ac.jp/~yukita/ in some places. This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by- 1 sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ondetermistic Finite Automata Nondetermistic Finite Automata ± A nondeterministic finite automaton can be different from a deterministic one in that r any input symbol nondeterministic one can ² for any input symbol, nondeterministic one can transit to more than one state. ² epsilon transition ( ε ), which “consumes” no input ymbols symbols ± NFA and DFA stand for nondeterministic finite automaton and deterministic finite automaton , respectively. ± NFAs and DFAs are equally powerful, but NFA adds notational power that can simplify descriptions. ² Example: L&P 2 variation on http://cis.k.hosei.ac.jp/~yukita/
Background image of page 2
Nondeterministic Finite Automata ill relax two of these DFA rules: ± Will relax two of these DFA rules: 1. Each (state, char) input must produce xactly one (state) output ea c y oe ( s a e ) o u p u 2. Must consume one character in order to advance state ± The NFA accepts the input if there exists any way of reading the input at winds up in an accepting state that winds up in an accepting state at the end of the string therwise it rejects the input 3 ² Otherwise it rejects the input
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example: NFA N 2 0, 1 Note: no exiting arrow for 0 or 1. q 3 q 1 q 2 1 0, 1 q 4 0,1 Let language A consist of all strings over {0,1} containing a 1 in the third position from the end. N 2 recognizes A . Note : Multiple choice on input 1 from state q 1 makes this an NFA. ater we show a DFA equivalent to this NFA using construction of Thm 1 39 4 Later we show a DFA equivalent to this NFA using construction of Thm. 1.39. variation on http://cis.k.hosei.ac.jp/~yukita/
Background image of page 4
NFA N 1 0, 1 0,1 1 Note: no exiting arrow for 1. Note: no exiting arrow for 0. q 3 q 1 q 2 1 0, ε q 4 Now introduce ε . What language does this NFA accept? 5 variation on http://cis.k.hosei.ac.jp/~yukita/
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
NFA N 1 Execution on input 010110 Source: Sipser Textbook ote pictorial Note pictorial “jump” on ε to next state. This varies slightly from transition function depiction on p. 54. How does 6 N 1 behave on input 01001?
Background image of page 6
Ways to think of NFAs ± NFAs want to accept inputs and will always take the most advantageous lternative(s) alternative(s) ² Because they will accept if there exists ny ay to get to an accepting state at any way to get to an accepting state at the end of the string ² The quickest way there may be just one of many ways, but it doesn’t matter 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2012 for the course CS 91.304 taught by Professor Staff during the Fall '11 term at UMass Lowell.

Page1 / 29

Chapter1Section2_F11 - 91.304 Foundations of (Theoretical)...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online