NFAvsDFA

NFAvsDFA - Harvard CS 121 and CSCI E-207 Lecture 5: NFAs...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Harvard CS 121 and CSCI E-207 Lecture 5: NFAs and DFAs Closure Properties Harry Lewis September 17 2009 Reading: Sipser, 1.2. Harvard CS 121 & CSCI E-207 September 17, 2009 Announcements Invest in a stapler! About 80% of PS0s were not stapled. That makes us sad, which rhymes with bad, which are the grades we give when sad. Please staple the two parts of psets separately. There will be a math section! Mondays 4:30-5:30, room TBA. If you want to go to a more math-y section instead of your regular section, and havent emailed Victor already, please do so 1 Harvard CS 121 & CSCI E-207 September 17, 2009 Definitions, Through the Looking Glass 2 Harvard CS 121 & CSCI E-207 September 17, 2009 And only one for birthday presents, you know. Theres glory for you! I dont know what you mean by glory, Alice said. Humpty Dumpty smiled contemptuously. Of course you dont till I tell you. I meant theres a nice knock-down argument for you! But glory doesnt mean a nice knock-down argument, Alice objected. When I use a word, Humpty Dumpty said in rather a scornful tone, it means just what I choose it to mean neither more nor less. The question is, said Alice, whether you can make words mean so many different things. The question is, said Humpty Dumpty, which is to be master - - thats all. 3 Harvard CS 121 & CSCI E-207 September 17, 2009 Nondeterministic Finite Automata An NFA is a 5-tuple ( Q, ,,q ,F ) , where Q, ,q ,F are as for DFAs : Q ( { } ) P ( Q ) . When in state p reading symbol , can go to any state q in the set ( p, ) . there may be more than one such q , or there may be none (in case ( p, ) = ). Can jump from p to any state in ( p, ) without moving the input head. 4 Harvard CS 121 & CSCI E-207 September 17, 2009 Computations by an NFA N = ( Q, ,,q ,F ) accepts w * if we can write w = y 1 y 2 y m where each y i { } and there exist r ,...,r m Q such that 1. r = q , 2. r i +1 ( r i ,y i +1 ) for each i = 0 ,...,m- 1 , and 3. r m F ....
View Full Document

Page1 / 25

NFAvsDFA - Harvard CS 121 and CSCI E-207 Lecture 5: NFAs...

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

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