1 / 17

Midterm 1 review

Midterm 1 review. Jundong Liu School of EECS liu@cs.ohiou.edu. What is a DFA?. What’s an NFA. What’s the difference between DFAs and NFAs. DFAs: each state + each symbol: one transition NFAs: each state + each symbol: zero, one or more transitions NFAs: transitions may be labeled with e.

Download Presentation

Midterm 1 review

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Midterm 1 review Jundong Liu School of EECS liu@cs.ohiou.edu

  2. What is a DFA?

  3. What’s an NFA

  4. What’s the difference between DFAs and NFAs • DFAs: each state + each symbol: one transition • NFAs: each state + each symbol: zero, one or more transitions • NFAs: transitions may be labeled with e

  5. How to design FAs • Reader as automaton • Remember the states that make difference • NFAs have “intelligence” to select paths.

  6. How do FAs compute? • What’s the meaning of “accept”? • What’s the meaning of “recognize”? • What’re regular languages?

  7. Regular Operations

  8. Operations • With DFAs, how to implement the union operation? What about intersection and complementation? • With NFAs, how to implement union? • With NFAs, how to implement concatenation? • With NFAs, how to implement star?

  9. Equivalence of NFAs and DFAs • How to convert an NFA to a DFA? • States? • Transitions?

  10. Closure property of regular languages • The class of regular languages is closed under • Union • Concatenation • Star • Intersection • Complementation (to prove this, use DFA or NFA?) • Difference • Reversal

  11. Regular expression • What languages do they describe?

  12. Correspondence of RE and FA • How to convert a DFA to a RE? • Convert a DFA into a GNFA • Convert a GNFA into a RE

  13. Non-Regular Languages

  14. Pumping lemma • You cannot control • The Pumping length p • What you need to do – choose w and i

  15. Pumping Lemma • To prove {ww| w can be any string} is not regular, • for the counter example w • Can you choose 0^90^9? • Can you choose 0^p1^p0^2p1^p? • Can you assume x = 0^(p-2), y = 00?

  16. Context-free Grammars • What’s a Context-free grammar? • What’s the language of the grammar? • Design • Recursive structures • Variables as entities • Decompose and union • Ambiguity • CNF (cfg-> cnf won’t show up in the exam)

  17. Pushdown Automaton • What are the components of a PDA? • How to describe a PDA using state diagram? • What’s the meaning of • How does it compute? • How to map a CFG to a PDA? (not in this midterm)

More Related