1 Problems of the day: 1. Let P= {(b, acbb), (aac, a), (b, ca)}. Prove that P has a match. 2. How many ways can aab be factored as x y z such that |y|≥

Slides:



Advertisements
Similar presentations
Chapter Three: Closure Properties for Regular Languages
Advertisements

Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
3.2 Pumping Lemma for Regular Languages Given a language L, how do we know whether it is regular or not? If we can construct an FA to accept the language.
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY (For next time: Read Chapter 1.3 of the book)
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
1 More Properties of Regular Languages. 2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
Fall 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
1 More Applications of the Pumping Lemma. 2 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we.
Courtesy Costas Busch - RPI1 Non-regular languages.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Lecture 8 Sept 29, 2011 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
FSA Lecture 1 Finite State Machines. Creating a Automaton  Given a language L over an alphabet , design a deterministic finite automaton (DFA) M such.
1 Regular Languages Finite Automata eg. Supermarket automatic door: exit or entrance.
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
1 Non-regular languages. 2 Regular languages Non-regular languages.
1 A Single Final State for Finite Accepters. 2 Observation Any Finite Accepter (NFA or DFA) can be converted to an equivalent NFA with a single final.
1 Proof of the Day: Let P= {(b, acbb), (aac, a), (b, ca)}. 1.Prove that P has a match. 2. Find Q which is P encoded in binary. 3.What match of Q corresponds.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
1 Let L= { w= u v : u  {a, b}*, v  {c, d}* and |u|= |v|} 1.Design a context-free grammar that generates L. 2.Use your grammar and the construction from.
1 For each language, give a regular expression that generates the language and a DFA that accepts it. L 1 = { w  {0, 1}* : has both 00 and 11 as substrings}
1 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
1 Problem of the Day: Factor (ab) k as xyz in all ways such that y ≠ ε.
1 Assignment #1 is due on Friday. Any questions?.
1 String v is a prefix of w if w= v y for some string y. String v is a suffix of w if w= x v for some string x. String v is a substring of w if there are.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
Properties of Regular Languages
CSCI 2670 Introduction to Theory of Computing September 13.
CS 203: Introduction to Formal Languages and Automata
1 For each language, give a DFA that accepts it. L 1 = { w  {a, b}* : w at most 2 a’s} L 2 = { w  {0, 1}* : has both 00 and 11 as substrings} L 3 = {
Lecture 2 Overview Topics What I forgot from last lecture Proof techniques continued Alphabets, strings, languages Automata June 2, 2015 CSCE 355 Foundations.
1 Find as many examples as you can of w, x, y, z so that w is accepted by this DFA, w = x y z, y ≠ ε, | x y | ≤ 7, and x y n z is in L for all n ≥ 0.
Recap: Transformation NFA  DFA  s s1s1... snsn p1p1 p2p2... pmpm >...  p1p1  p2p2  pipi s e s1s1 e s2s2 e sisi >
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
Nonregular Languages How do you prove a language to be regular? How do you prove a language to be nonregular? A Pumping Lemma.
Equivalence with FA * Any Regex can be converted to FA and vice versa, because: * Regex and FA are equivalent in their descriptive power ** Regular language.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
CSE 311 Foundations of Computing I Lecture 15 Strong Induction and Recursive Definitions Spring
1 Use the pumping theorem for context-free languages to prove that L= { a n b a n b a p : n, p ≥ 0, p ≥ n } is not context-free. Hint: For the pumping.
Formal Language & Automata Theory
Non-regular languages
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
L1= { w  {a,b}* : w consists of all strings that begin with an even number of a's followed by an odd number of b's. } L2= { w  {a,b}* : the number of.
PROPERTIES OF REGULAR LANGUAGES
CSE 105 theory of computation
Single Final State for NFA
Elementary Questions about Regular Languages
Non-regular languages
More Applications of the Pumping Lemma
Convert to a DFA: Start state: Final States: State Symbol Read- Q E(Q)
Design NDFA’s which accept:
CSCI 2670 Introduction to Theory of Computing
Convert to a DFA: Start state: Final States: P Symbol Q E(Q) a b.
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSCE 355 Foundations of Computation
CSE 105 theory of computation
Presentation transcript:

1 Problems of the day: 1. Let P= {(b, acbb), (aac, a), (b, ca)}. Prove that P has a match. 2. How many ways can aab be factored as x y z such that |y|≥ 1? Write down all possibilities: x y z ε a ab ….

2 Announcements Assignment #2: Due at beginning of class Friday Oct. 8. Midterm is in class on Fri. Oct. 22. Make sure you sign the attendance sheet every class. Either when you come in or if you are late and I have collected it, sign at the end of class.

3 Theorem: If L is a regular language, then L is L(M) for some DFA M. Proof: By showing how to construct a NDFA for L. Last lecture, we proved by construction that for every NDFA, there is an equivalent DFA. So this indirectly gives a construction for a DFA.

4 Regular expressions over Σ: [Basis] 1. Φ and σ for each σ  Σ are regular expressions. [Inductive step] If α and β are regular expressions, then so are: 2. ( αβ) 3. (α ⋃ β) and 4. α * Note: Regular expressions are strings over Σ ⋃ { (, ), Φ, ⋃, * } for some alphabet Σ.

5 Theorem: If L is accepted by a DFA M, then there is a regular expression which generates L. There is a proof which constructs a regular expression from the DFA in the text (in the proof of Theorem 2.3.2). I expect you to know that this theorem is true but you are not responsible for the proof. Conclusion: A language is regular if and only if it is accepted by a finite automaton.

6 The set of S= { L : L is L(M) for some DFA M} is closed under complement. Let M 1 = (K 1, Σ, δ 1, s 1, F 1 ) accept L 1. Proof: A construction for a new DFA M= (K, Σ, δ, s, F) which accepts the complement of L 1. Regular languages are also closed for intersection (assignment #2).

7 CSC 320: Lecture 12 Pigeons and the Pumping Lemma

8 Outline: 1.Another elementary proof technique- the pigeonhole principle. This is critical for proving the Pumping Lemma for regular languages ( a tool for proving that a language is not regular) 2. Introduction to the pumping lemma.

9 The Pigeonhole Principle Given two natural numbers n and m with n > m, if n items are put into m pigeonholes, then at least one pigeonhole must contain more than one item. Picture from: Wikipedia, the free encyclopedia

10 From: Dan Rice’s Sudoku Blog If there's only one place (the pigeonhole) to put a number (the pigeon), it must go there. The number 6 must go in the green square. OPEN: are there any uniquely completable squares with only 16 entries filled in?

11 Application: Show that in any group of people there are at least two people with the same number of acquaintances. Note: we are assuming that if Sue is acquainted with Joe then Joe is acquainted with Sue.

12 Colossal Cave Adventure (from Wikipedia) In the mid 1970s, programmer, caver, and role-player William Crowther developed a program called Colossal Cave Adventure. The game used a text interface to create an interactive adventure through a spectacular underground cave system. Crowther's work was later modified and expanded by programmer Don Woods, and Colossal Cave Adventure became wildly popular among early computer enthusiasts, spreading across the nascent ARPANET throughout the 1970s. A big fan of Tolkien, Woods introduced additional fantasy elements, such as elves and a troll. Adventure was the first game to feature objects that could be picked up, used, and dropped (and that could be carried by a non-player character).

13 You are in a maze of twisty little passages, all alike. If the maze has n rooms and each one has trails exiting to the N, S, W, E. How many trails must be traversed before some room is visited more than once?

14 The Pumping Lemma for Regular Languages: If L is a language accepted by a DFA with k states, and w  L, |w| ≥ k, then there exists x, y, z such that 1. w = x y z, 2. y ≠ ε, 3. | x y | ≤ k, and 4. x y n z is in L for all n ≥ 0.

15 Factor a r b 3r as x y z in all possible ways where y ≠ε.