SlideShare a Scribd company logo
1 of 15
1
Midterm I review
Reading: Chapters 1-4
2
Test Details
 In class, Wednesday, Feb. 25, 2015
3:10pm-4pm
 Comprehensive
 Closed book, closed notes
3
Syllabus
 Formal proofs
 Finite Automata
 NFA, DFA, -NFA
 Regular expressions
 Regular languages & properties
 Pumping lemma for regular languages
4
Finite Automata
 Deterministic Finite Automata (DFA)
 The machine can exist in only one state at any
given time
 Non-deterministic Finite Automata (NFA)
 The machine can exist in multiple states at the
same time
 -NFA is an NFA that allows -transitions
 What are their differences?
5
Deterministic Finite Automata
 A DFA is defined by the 5-tuple:
 {Q, ∑ , q0,F, δ }
 Two ways to define:
 State-diagram (preferred)
 State-transition table
 DFA construction checklist:
 Associate states with their meanings
 Capture all possible combinations/input scenarios
 break into cases & subcases wherever possible
 Are outgoing transitions defined for every symbol from every state?
 Are final/accepting states marked?
 Possibly, dead/error-states will have to be included depending on
the design.
6
Non-deterministic Finite
Automata
 A NFA is defined by the 5-tuple:
 {Q, ∑ , q0,F, δ }
 Two ways to represent:
 State-diagram (preferred)
 State-transition table
 NFA construction checklist:
 Has at least one nondeterministic transition
 Capture only valid input transitions
 Can ignore invalid input symbol transitions (paths will die implicitly)
 Outgoing transitions defined only for valid symbols from every state
 Are final/accepting states marked?
7
NFA to DFA conversion
 Checklist for NFA to DFA conversion
 Two approaches:
 Enumerate all possible subsets, or
 Use lazy construction strategy (to save time)
 Introduce subset states only as needed
 In your solutions, use the lazy construction procedure by
default unless specified otherwise.
 Any subset containing an accepting state is also
accepting in the DFA
 Have you made a special entry for Φ, the empty
subset?
 This will correspond to the dead/error state
8
 -NFA to DFA conversion
 Checklist for  -NFA to DFA conversion
 First take ECLOSE(start state)
 New start state = ECLOSE(start state)
 Remember: ECLOSE(q) include q
 Then convert to DFA:
 Use lazy construction strategy for introducing subset states only as
needed (same as NFA to DFA), but …
 Only difference : take ECLOSE after transitions and also include those
states in the subset corresponding to your destination state.
 E.g., if q_i goes to {q_j, q_k}, then your subset must be: ECLOSE(q_j) U ECLOSE(q_k)
 Again, check for a special entry for Φ if needed
9
Regular Expressions
 A way to express accepting patterns
 Operators for Reg. Exp.
 (E), L(E+F), L(EF), L(E*)..
 Reg. Language  Reg. Exp. (checklist):
 Capture all cases of valid input strings
 Express each case by a reg. exp.
 Combine all of them using the + operator
 Pay attention to operator precedence
 Try to reuse previously built regular expressions
wherever possible
10
Regular Expressions…
 DFA to Regular expression
 Enumerate all paths from start to every final state
 Generate regular expression for each segment, and
concatenate
 Combine the reg. exp. for all each path using the + operator
 Reg. Expression to  -NFA conversion
 Inside-to-outside construction
 Start making states for every atomic unit of RE
 Combine using: concatenation, + and * operators as
appropriate
 For connecting adjacent parts, use  -transitions
 Remember to note down final states
11
Regular Expressions…
 Algebraic laws
 Commutative
 Associative
 Distributive
 Identity
 Annihiliator
 Idempotent
 Involving Kleene closures (* operator)
12
English description of lang.
 Finite automata  english description
 Regular expression  english description
“English description” should be similar to how we have
been describing languages in class
 E.g., languages of strings over {a,b} that end in b; or
 Languages of binary strings that have 0 in its even
position, etc.
Thumbrule: the simpler the description is, the better.
However, make sure that the description should
accurately capture the language.
13
Pumping Lemma
 Purpose: Regular or not? Verification technique
 Steps/Checklist for Pumping Lemma (in order):
1) Let N  pumping lemma constant
2) Choose a template string w in L, such that |w|≥N.
(Note: the string you choose should depend on N. And the choice of
your w will affect the rest of the proof. So select w judiciously.
Generally, a simple choice of w would be a good starting point. But if
that doesn’t work, then go for others.)
3) Now w should satisfy P/L, and therefore, all three conditions of the
lemma. Specifically, using conditions |xy|≤N and y, try to conclude
something about the property of the xy part and y part separately.
4) Next, use one of these two below strategies to arrive at the
conclusion of xykzL (for some value of k):
 Pump down (k=0)
 Pump up (k >= 2)
Note: arriving at a contradiction using either pumping up OR down
is sufficient. No need to show both.
14
Working out pumping lemma based
proofs as a 2-player game:
 Steps (think of this 2-party game):
Good guy (us) Bad guy (someone else)
Claims L is regular
=> Knows N and has the freedom
to choose any value of N≥1
Builds w using N
(without assuming
any particular value of N)
Comes up with {x,y,z} combination,
s.t. w=xyz
(again, has the freedom to choose
any xyz split, but meeting
the two conditions of P/L:
i.e., |xy|≤N and y)
Tries to break the third condition
of P/L without assuming any
particular {x,y,z} split
• this is done by first pumping down
(k=0)
• if that does not work, then try
pumping up (k≥2)
GOOD LUCK!
15

More Related Content

Similar to Midterm I review: Chapters 1-4, DFAs, NFAs, regular expressions

FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxranjan317165
 
Nondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdfNondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdfSergioUlisesRojasAla
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computationprasadmvreddy
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdfFariyaTasneem1
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite AutomatAdel Al-Ofairi
 
Winter 9 Decidability.pptx
Winter 9 Decidability.pptxWinter 9 Decidability.pptx
Winter 9 Decidability.pptxHarisPrince
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxMeghnadh
 
03-FiniteAutomata.pptx
03-FiniteAutomata.pptx03-FiniteAutomata.pptx
03-FiniteAutomata.pptxssuser47f7f2
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfAmayJaiswal4
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Mohammad Ilyas Malik
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyserArchana Gopinath
 
finiteautomata-160104102657.pptx
finiteautomata-160104102657.pptxfiniteautomata-160104102657.pptx
finiteautomata-160104102657.pptxStudyvAbhi
 
The future of DSLs - functions and formal methods
The future of DSLs - functions and formal methodsThe future of DSLs - functions and formal methods
The future of DSLs - functions and formal methodsMarkus Voelter
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata parmeet834
 

Similar to Midterm I review: Chapters 1-4, DFAs, NFAs, regular expressions (20)

FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
Nondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdfNondeterministic Finite Automata AFN.pdf
Nondeterministic Finite Automata AFN.pdf
 
Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
 
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf@vtucode.in-module-1-21CS51-5th-semester (1).pdf
@vtucode.in-module-1-21CS51-5th-semester (1).pdf
 
Nondeterministic Finite Automat
Nondeterministic Finite AutomatNondeterministic Finite Automat
Nondeterministic Finite Automat
 
Winter 9 Decidability.pptx
Winter 9 Decidability.pptxWinter 9 Decidability.pptx
Winter 9 Decidability.pptx
 
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptxFiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
 
Finite automata
Finite automataFinite automata
Finite automata
 
03-FiniteAutomata.pptx
03-FiniteAutomata.pptx03-FiniteAutomata.pptx
03-FiniteAutomata.pptx
 
deterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdfdeterministicfiniteautomatondfa-181008145215 (1).pdf
deterministicfiniteautomatondfa-181008145215 (1).pdf
 
Lec1.pptx
Lec1.pptxLec1.pptx
Lec1.pptx
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Theory of computation and automata
Theory of computation and automataTheory of computation and automata
Theory of computation and automata
 
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
Finite Automata: Deterministic And Non-deterministic Finite Automaton (DFA)
 
TOC question bank.pdf
TOC question bank.pdfTOC question bank.pdf
TOC question bank.pdf
 
Implementation of lexical analyser
Implementation of lexical analyserImplementation of lexical analyser
Implementation of lexical analyser
 
finiteautomata-160104102657.pptx
finiteautomata-160104102657.pptxfiniteautomata-160104102657.pptx
finiteautomata-160104102657.pptx
 
The future of DSLs - functions and formal methods
The future of DSLs - functions and formal methodsThe future of DSLs - functions and formal methods
The future of DSLs - functions and formal methods
 
NLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State AutomataNLP_KASHK:Finite-State Automata
NLP_KASHK:Finite-State Automata
 
Nondeterministic Finite Automata
Nondeterministic Finite Automata Nondeterministic Finite Automata
Nondeterministic Finite Automata
 

Recently uploaded

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 

Midterm I review: Chapters 1-4, DFAs, NFAs, regular expressions

  • 2. 2 Test Details  In class, Wednesday, Feb. 25, 2015 3:10pm-4pm  Comprehensive  Closed book, closed notes
  • 3. 3 Syllabus  Formal proofs  Finite Automata  NFA, DFA, -NFA  Regular expressions  Regular languages & properties  Pumping lemma for regular languages
  • 4. 4 Finite Automata  Deterministic Finite Automata (DFA)  The machine can exist in only one state at any given time  Non-deterministic Finite Automata (NFA)  The machine can exist in multiple states at the same time  -NFA is an NFA that allows -transitions  What are their differences?
  • 5. 5 Deterministic Finite Automata  A DFA is defined by the 5-tuple:  {Q, ∑ , q0,F, δ }  Two ways to define:  State-diagram (preferred)  State-transition table  DFA construction checklist:  Associate states with their meanings  Capture all possible combinations/input scenarios  break into cases & subcases wherever possible  Are outgoing transitions defined for every symbol from every state?  Are final/accepting states marked?  Possibly, dead/error-states will have to be included depending on the design.
  • 6. 6 Non-deterministic Finite Automata  A NFA is defined by the 5-tuple:  {Q, ∑ , q0,F, δ }  Two ways to represent:  State-diagram (preferred)  State-transition table  NFA construction checklist:  Has at least one nondeterministic transition  Capture only valid input transitions  Can ignore invalid input symbol transitions (paths will die implicitly)  Outgoing transitions defined only for valid symbols from every state  Are final/accepting states marked?
  • 7. 7 NFA to DFA conversion  Checklist for NFA to DFA conversion  Two approaches:  Enumerate all possible subsets, or  Use lazy construction strategy (to save time)  Introduce subset states only as needed  In your solutions, use the lazy construction procedure by default unless specified otherwise.  Any subset containing an accepting state is also accepting in the DFA  Have you made a special entry for Φ, the empty subset?  This will correspond to the dead/error state
  • 8. 8  -NFA to DFA conversion  Checklist for  -NFA to DFA conversion  First take ECLOSE(start state)  New start state = ECLOSE(start state)  Remember: ECLOSE(q) include q  Then convert to DFA:  Use lazy construction strategy for introducing subset states only as needed (same as NFA to DFA), but …  Only difference : take ECLOSE after transitions and also include those states in the subset corresponding to your destination state.  E.g., if q_i goes to {q_j, q_k}, then your subset must be: ECLOSE(q_j) U ECLOSE(q_k)  Again, check for a special entry for Φ if needed
  • 9. 9 Regular Expressions  A way to express accepting patterns  Operators for Reg. Exp.  (E), L(E+F), L(EF), L(E*)..  Reg. Language  Reg. Exp. (checklist):  Capture all cases of valid input strings  Express each case by a reg. exp.  Combine all of them using the + operator  Pay attention to operator precedence  Try to reuse previously built regular expressions wherever possible
  • 10. 10 Regular Expressions…  DFA to Regular expression  Enumerate all paths from start to every final state  Generate regular expression for each segment, and concatenate  Combine the reg. exp. for all each path using the + operator  Reg. Expression to  -NFA conversion  Inside-to-outside construction  Start making states for every atomic unit of RE  Combine using: concatenation, + and * operators as appropriate  For connecting adjacent parts, use  -transitions  Remember to note down final states
  • 11. 11 Regular Expressions…  Algebraic laws  Commutative  Associative  Distributive  Identity  Annihiliator  Idempotent  Involving Kleene closures (* operator)
  • 12. 12 English description of lang.  Finite automata  english description  Regular expression  english description “English description” should be similar to how we have been describing languages in class  E.g., languages of strings over {a,b} that end in b; or  Languages of binary strings that have 0 in its even position, etc. Thumbrule: the simpler the description is, the better. However, make sure that the description should accurately capture the language.
  • 13. 13 Pumping Lemma  Purpose: Regular or not? Verification technique  Steps/Checklist for Pumping Lemma (in order): 1) Let N  pumping lemma constant 2) Choose a template string w in L, such that |w|≥N. (Note: the string you choose should depend on N. And the choice of your w will affect the rest of the proof. So select w judiciously. Generally, a simple choice of w would be a good starting point. But if that doesn’t work, then go for others.) 3) Now w should satisfy P/L, and therefore, all three conditions of the lemma. Specifically, using conditions |xy|≤N and y, try to conclude something about the property of the xy part and y part separately. 4) Next, use one of these two below strategies to arrive at the conclusion of xykzL (for some value of k):  Pump down (k=0)  Pump up (k >= 2) Note: arriving at a contradiction using either pumping up OR down is sufficient. No need to show both.
  • 14. 14 Working out pumping lemma based proofs as a 2-player game:  Steps (think of this 2-party game): Good guy (us) Bad guy (someone else) Claims L is regular => Knows N and has the freedom to choose any value of N≥1 Builds w using N (without assuming any particular value of N) Comes up with {x,y,z} combination, s.t. w=xyz (again, has the freedom to choose any xyz split, but meeting the two conditions of P/L: i.e., |xy|≤N and y) Tries to break the third condition of P/L without assuming any particular {x,y,z} split • this is done by first pumping down (k=0) • if that does not work, then try pumping up (k≥2)

Editor's Notes

  1. School of EECS, WSU
  2. School of EECS, WSU
  3. School of EECS, WSU
  4. School of EECS, WSU
  5. School of EECS, WSU
  6. School of EECS, WSU
  7. School of EECS, WSU
  8. School of EECS, WSU
  9. School of EECS, WSU
  10. School of EECS, WSU
  11. School of EECS, WSU
  12. School of EECS, WSU
  13. School of EECS, WSU
  14. School of EECS, WSU
  15. School of EECS, WSU
  16. School of EECS, WSU
  17. School of EECS, WSU
  18. School of EECS, WSU