CS 461 – Sept. 16 Review Pumping lemma Applications of FA:

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

Regular operations Sipser 1.1 (pages 44 – 47). CS 311 Fall Building languages If L is a language, then its complement is L’ = {w | w ∉ L} Let A.
Erik Jonsson School of Engineering and Computer Science FEARLESS Engineering CS 5349 – 001 CS 4384 – 001 Automata Theory
Pumping Lemma Problem: Solution:
Lecture 9,10 Theory of AUTOMATA
CS21 Decidability and Tractability
Regular operations Sipser 1.1 (pages 44 – 47). CS 311 Mount Holyoke College 2 Building languages If L is a language, then its complement is L’ = {w |
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Mount Holyoke College 2 Nonregular languages? We now know: –Regular languages may be specified either.
Regular expressions Sipser 1.3 (pages 63-76). CS 311 Mount Holyoke College 2 Looks familiar…
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Formal languages and automata theory Li Fan. Pumping Lemma Let L be a regular set. Then there is a constant n such that if z is any word in L, and |z|>=n,
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf of Monash University.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Limitations.
Regular expressions Sipser 1.3 (pages 63-76). CS 311 Fall Looks familiar…
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.
Homework 4 Solutions.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Extra on Regular Languages and Non-Regular Languages
Properties of Regular Languages
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Closure.
Introduction to CS Theory
CSE 311 Foundations of Computing I Lecture 17 Structural Induction Spring
Chapter 4 Pumping Lemma Properties of Regular Languages Decidable questions on Regular Languages.
CS 3240 – Chapter 4.  Closure Properties  Algorithms for Elementary Questions:  Is a given word, w, in L?  Is L empty, finite or infinite?  Are L.
Class Discussion Can you draw a DFA that accepts the language {a k b k | k = 0,1,2,…} over the alphabet  ={a,b}?
CS355 - Theory of Computation Regular Expressions.
CS 203: Introduction to Formal Languages and Automata
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
CSCI 3130: Formal languages and automata theory Tutorial 3 Chin.
Prime Numbers and Factoring. Which expression is equal to 4x6? (a) 2 × 2 x 2 (b) 2 × 3 × 4 (c) 4 × 5 × 3 (d) 6 × 6.
Nonregular Languages How do you prove a language to be regular? How do you prove a language to be nonregular? A Pumping Lemma.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
CS 461 – Oct. 5 Pumping lemma #2 –Understanding –Use to show a language is not a CFL Next: Applications of CFLs –Expression grammars and Compiling.
CS 44 – Jan. 28 Pumping lemma #2 Applications to compiling.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
© M. Winter COSC/MATH 4P61 - Theory of Computation Pumping Lemma as a game 1.Player 1 picks the language L to be proven nonregular. 2.Player 2 picks.
Dept. of Computer Science & IT, FUUAST Automata Theory 2 Automata Theory III Properties of Regular Languages 1.Closure 2.Union 3.Concatenation 4.Complement(Negation)
MA/CSSE 474 Theory of Computation How many regular/non-regular languages are there? Closure properties of Regular Languages (if there is time) Pumping.
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.
Context-Free Languages
CSE 105 theory of computation
Pumping Lemma.
CSE 105 theory of computation
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
PROPERTIES OF REGULAR LANGUAGES
FORMAL LANGUAGES AND AUTOMATA THEORY
CSE 3813 Introduction to Formal Languages and Automata
CS 461 – Sept. 28 Section 2.2 – Pushdown Automata { 0n 1n }
Intro to Theory of Computation
Lecture5 Non-regular languages
CS 154, Lecture 4: Limitations on DFAs (I),
Infiniteness Test The Pumping Lemma Nonregular Languages
Elementary Questions about Regular Languages
FORMAL LANGUAGES, AUTOMATA, AND COMPUTABILITY
Pumping Lemma September 29, 2006
Chapter 4 Properties of Regular Languages
Are all Languages Regular
CS21 Decidability and Tractability
Non-Regular Languages
Recap lecture 26 Example of nonregular language, pumping lemma version I, proof, examples,
More Applications of the Pumping Lemma
CHAPTER 1 Regular Languages
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

CS 461 – Sept. 16 Review Pumping lemma Applications of FA: How do we show language non-regular? Applications of FA: Scanning (part of compilation) Searching for text, using regular expression

Proving non-regularity It’s like a 2-player game… Adversary picks secret number p. We select any string we want, in terms of p (e.g. 0p1p) Adversary will break up s into xyz subject to constraints. The place to pump has length at least 1. The place to pump appears in the first p positions. Be ready to show that xyiz won’t be in language for some i.

Example languages Bit strings that are palindromes Bit strings with equal # of 0s and 1s. More 0s than 1s. { 0n : n is a perfect square } { 0n : n is prime } { 03n + 2 : n  0 } { 0i 1j : i is even or i  j } Notice that regular sets can’t handle counting or nonlinear patterns.

Consider complement Show L = { 0i 1j : i is even or i  j } is not regular. Let’s use some set theory… L regular iff L’ regular What is L’ ? Hint: Need to consider (0 + 1)* - 0*1*. Language L’ has “and” instead of “or”, so easier to produce a word not in language. 

continued L = { 0i 1j : i is even or i  j } Then L’ is all words with: The definition turned around. Let A = { i is odd and i < j }. Plus all words not of the form 0*1*. Let B = (0 + 1)* - 0*1* = 0*11*0(0 + 1)*. Then, L’ = A union B. Let s = 02p+1 12p+2 and i = 2 and see how it works in pumping lemma…