cse 105
play

CSE 105 THEORY OF COMPUTATION Fall 2016 - PowerPoint PPT Presentation

CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/ T oday's learning goals Sipser Ch 1.1 Design fjnite automata which accept a given language General Properties of Regular Languages Operations on


  1. CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/

  2. T oday's learning goals Sipser Ch 1.1 • Design fjnite automata which accept a given language • General Properties of Regular Languages • Operations on languages • Closure properties

  3. Recall terminology • Alphabet : nonempty fjnite set of symbols • String over an alphabet: fjnite sequence of symbols • Language over an alphabet: some set of strings • DFA over an alphabet: deterministic fjnite automaton • Input: fjnite string over a fjxed alphabet • Output: "accept" or "reject" • L(M) = {w | M accepts w} Start state Accept state • Regular language (triangle/arrow) (double circle) language that is L(M) for some DFA M

  4. Building DFA Typical questions e.g. HW2 Q1c, Q2 Defjne a DFA which recognizes the given language L. or Prove that the (given) language L is regular.

  5. Building DFA Example Defjne a DFA which recognizes { w | w has at least 2 a ’s }

  6. Building DFA Example Defjne a DFA which recognizes { w | w has at most 2 a ’s }

  7. Building DFA Remember States are our only (computer) memory. Design ans pick states with specifjc roles / tasks in mind. “Have not see any of desired pattern yet” “Trap state”

  8. Regular languages: general facts Is there an infjnite regular language? A. No: all regular languages have to be fjnite. B. Yes: all regular sets are infjnite. C. Yes: all infjnite sets of strings over an alphabet are regular. D. Yes: some infjnite sets of strings over each alphabet are regular and some are not. E. I don't know.

  9. Regular languages: general facts Is every fjnite language regular? A. No: some fjnite languages are regular, and some are not. B. No: there are no fjnite regular languages. C. Yes: every fjnite language is regular. D. I don't know.

  10. Regular languages: general facts T rue/ False: each DFA recognizes a unique language. I.e. if two DFA are difgerent (difgerent number of states or difgerent initial state, or difgerent transition function, etc.) then they recognize difgerent languages. A. T rue can you prove it? B. False can you prove it? C. I don't know.

  11. The regular operations Sipser Def 1.23 p. 44 For A, B languages over same alphabet, defjne: These are operations on sets of These are operations on sets of strings! strings!

  12. Closure of … under … • Z under addition. • Set of even ints under multiplication. • {0} * under concatenation. Which of these is true? A. The set of odd integers is closed under addition. B. The set of positive integers is closed under subtraction. C. The set of rational numbers is closed under multiplication. D. The set of real numbers is closed under division. E. I don't know.

  13. Complementation Claim : If A is a regular language, then so is its complement A Same as: If A=L(M) for some DFA M, then A=L(M’) for some (possibly difgerent) DFA M’ Proof Strategy: Show that any DFA M can be transformed into a DFA M’ such that L(M’) = L(M)

  14. For next time Homework 1 due tonight! • Set up course tools: Gradescope, Piazza, JFLAP, ieng6 Next Time: Class of regular languages is closed under complement, union, intersection, and several other operations. It is also closed under concatenation and Kleene star, but harder to prove (next week.)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend