Formal Languages The Pumping Lemma for CFLs

Similar documents
Applications of Regular Closure

CD5080 AUBER RECAPITULATION. Context-Free Languages. Models of Computation, Languages and Automata. S asb. S bsb

Review of CFGs and Parsing I Context-free Languages and Grammars. Winter 2014 Costas Busch - RPI 1

Content. Languages, Alphabets and Strings. Operations on Strings. a ab abba baba. aaabbbaaba b 5. Languages. A language is a set of strings

Namely, for regular languages L1. Concatenation. Regular Languages. Star operation L 1. Complement. For regular language L the complement L is regular

MATH 118 HW 7 KELLY DOUGAN, ANDREW KOMAR, MARIA SIMBIRSKY, BRANDEN LASKE

Course Material. CS Lecture 1 Deterministic Finite Automata. Grading and Policies. Workload. Website:

Discrete Mathematics I Tutorial 12

Sequence and Series of Functions

The limit comparison test

f(bx) dx = f dx = dx l dx f(0) log b x a + l log b a 2ɛ log b a.

In an algebraic expression of the form (1), like terms are terms with the same power of the variables (in this case

M098 Carson Elementary and Intermediate Algebra 3e Section 10.2

The Reimann Integral is a formal limit definition of a definite integral

MATH 104 FINAL SOLUTIONS. 1. (2 points each) Mark each of the following as True or False. No justification is required. y n = x 1 + x x n n

10.5 Power Series. In this section, we are going to start talking about power series. A power series is a series of the form

Approximate Integration

Section IV.6: The Master Method and Applications

SUTCLIFFE S NOTES: CALCULUS 2 SWOKOWSKI S CHAPTER 11

 n. A Very Interesting Example + + = d. + x3. + 5x4. math 131 power series, part ii 7. One of the first power series we examined was. 2!

Project 3: Using Identities to Rewrite Expressions

Topic 4 Fourier Series. Today

Fig. 1. I a. V ag I c. I n. V cg. Z n Z Y. I b. V bg

Summer MA Lesson 4 Section P.3. such that =, denoted by =, is the principal square root

degree non-homogeneous Diophantine equation in six unknowns represented by x y 2z

USA Mathematical Talent Search PROBLEMS / SOLUTIONS / COMMENTS Round 4 - Year 13 - Academic Year solutions edited by Erin Schram

Numbers (Part I) -- Solutions

POWER SERIES R. E. SHOWALTER

( a n ) converges or diverges.

SUTCLIFFE S NOTES: CALCULUS 2 SWOKOWSKI S CHAPTER 11

Week 13 Notes: 1) Riemann Sum. Aim: Compute Area Under a Graph. Suppose we want to find out the area of a graph, like the one on the right:

Lecture 38 (Trapped Particles) Physics Spring 2018 Douglas Fields

INFINITE SERIES. ,... having infinite number of terms is called infinite sequence and its indicated sum, i.e., a 1

ALGEBRA II CHAPTER 7 NOTES. Name

, we would have a series, designated as + j 1

GRAPHING LINEAR EQUATIONS. Linear Equations. x l ( 3,1 ) _x-axis. Origin ( 0, 0 ) Slope = change in y change in x. Equation for l 1.

The Elementary Arithmetic Operators of Continued Fraction

Repeated Root and Common Root

The total number of permutations of S is n!. We denote the set of all permutations of S by

ELEG 3143 Probability & Stochastic Process Ch. 5 Elements of Statistics

Linford 1. Kyle Linford. Math 211. Honors Project. Theorems to Analyze: Theorem 2.4 The Limit of a Function Involving a Radical (A4)

1. (25 points) Use the limit definition of the definite integral and the sum formulas to compute. [1 x + x2

Context-free grammars and. Basics of string generation methods

Taylor Polynomials. The Tangent Line. (a, f (a)) and has the same slope as the curve y = f (x) at that point. It is the best

Applied Databases. Sebastian Maneth. Lecture 16 Suffix Array, Burrows-Wheeler Transform. University of Edinburgh - March 10th, 2016

Similar idea to multiplication in N, C. Divide and conquer approach provides unexpected improvements. Naïve matrix multiplication

Convergence rates of approximate sums of Riemann integrals

APPLICATION OF DIFFERENCE EQUATIONS TO CERTAIN TRIDIAGONAL MATRICES

Infinite Series Sequences: terms nth term Listing Terms of a Sequence 2 n recursively defined n+1 Pattern Recognition for Sequences Ex:

Chapter 7 Infinite Series

Unit 1. Extending the Number System. 2 Jordan School District

General properties of definite integrals

MTH 146 Class 16 Notes

MATH 104: INTRODUCTORY ANALYSIS SPRING 2009/10 PROBLEM SET 8 SOLUTIONS. and x i = a + i. i + n(n + 1)(2n + 1) + 2a. (b a)3 6n 2

ECE Spring Prof. David R. Jackson ECE Dept. Notes 20

is infinite. The converse is proved similarly, and the last statement of the theorem is clear too.

Fourier Series. Topic 4 Fourier Series. sin. sin. Fourier Series. Fourier Series. Fourier Series. sin. b n. a n. sin

1.3 Continuous Functions and Riemann Sums

n 2 + 3n + 1 4n = n2 + 3n + 1 n n 2 = n + 1

Fourier Series and Applications

Linear Programming. Preliminaries

Eigenfunction Expansion. For a given function on the internal a x b the eigenfunction expansion of f(x):

A general theory of minimal increments for Hirsch-type indices and applications to the mathematical characterization of Kosmulski-indices

LEVEL I. ,... if it is known that a 1

CS 275 Automata and Formal Language Theory

Convergence rates of approximate sums of Riemann integrals

Mathematical Induction (selected questions)

PROGRESSIONS AND SERIES

SM2H. Unit 2 Polynomials, Exponents, Radicals & Complex Numbers Notes. 3.1 Number Theory

Linear Systems with Constant Coefficients

[ 20 ] 1. Inequality exists only between two real numbers (not complex numbers). 2. If a be any real number then one and only one of there hold.

Notes 17 Sturm-Liouville Theory

The Basic Properties of the Integral

FOURIER SERIES PART I: DEFINITIONS AND EXAMPLES. To a 2π-periodic function f(x) we will associate a trigonometric series. a n cos(nx) + b n sin(nx),

Applied Databases. Sebastian Maneth. Lecture 16 Suffix Array, Burrows-Wheeler Transform. University of Edinburgh - March 16th, 2017

Approximations of Definite Integrals

lecture 16: Introduction to Least Squares Approximation

Error-free compression

RULES FOR MANIPULATING SURDS b. This is the addition law of surds with the same radicals. (ii)

Inner Product Spaces (Chapter 5)

Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, Divide-and-Conquer

Intermediate Arithmetic

UNIT 4 EXTENDING THE NUMBER SYSTEM Lesson 1: Working with the Number System Instruction

Force and Motion. Force

,... are the terms of the sequence. If the domain consists of the first n positive integers only, the sequence is a finite sequence.

Math F215: Induction April 7, 2013

Chapter 2 Infinite Series Page 1 of 9

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION

Statistics for Financial Engineering Session 1: Linear Algebra Review March 18 th, 2006

If a is any non zero real or imaginary number and m is the positive integer, then a...

Force and Motion. Force. Classifying Forces. Physics 11- Summer /21/01. Chapter 4 material 1. Forces are vector quantities!

Review of the Riemann Integral

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Lecture 17

EXERCISE a a a 5. + a 15 NEETIIT.COM

UNIVERSITY OF BRISTOL. Examination for the Degrees of B.Sc. and M.Sci. (Level C/4) ANALYSIS 1B, SOLUTIONS MATH (Paper Code MATH-10006)

Supplemental Handout #1. Orthogonal Functions & Expansions

0 otherwise. sin( nx)sin( kx) 0 otherwise. cos( nx) sin( kx) dx 0 for all integers n, k.

moment = m! x, where x is the length of the moment arm.

Riemann Integral and Bounded function. Ng Tze Beng

Graphing Review Part 3: Polynomials

Transcription:

Forl Lguges The Pupig Le for CFLs

Review: pupig le for regulr lguges

Tke ifiite cotext-free lguge Geertes ifiite uer of differet strigs Exple: 3

I derivtio of log strig, vriles re repeted derivtio: 4

Derivtio tree strig 5

Derivtio tree strig repeted 6

* 7

Repeted Prt * 8

other possile derivtio fro * * * 9

* * ( ) ( ) ( ) ( ) * 10

Derivtio fro * * * 11

* * * 0 ( ) ( ) 0 1

* * * 0 ( ) ( ) 0 ( ) 0 ( ) 0 L( G) 13

Derivtio fro * * * 14

* * * * 15

16 * * ) ( ) ( ) ( ) ( * *

17 * * ) ( ) ( ) ( ) ( * *

* * * ( ) ( ) ( ) ( ) L( G) 18

Derivtio fro * * * ( ) ( ) 19

0 3 3 * * ) ( ) ( ) ( ) ( * *

1 3 3 3 3 * ) ( ) ( ) ( ) ( * *

* * * 3 ( ) ( ) 3 ( ) 3 ( ) 3 L( G)

I Geerl: * * * ( ) i ( ) i i ( ) ( ) L( G) i i 0 3

Cosider ow ifiite cotext-free lguge L Let G e the grr of L {} Tke G so tht it hs o uit-productios o -productios 4

Let p = (Nuer of productios) x (Lrgest right side of productio) Let p 1 Exple : G p 43 1 p 113 5

Tke strig with legth wl(g) w We will show: i the derivtio of w vrile of is repeted G 6

* w v 1 v v k w v 1 7

v 1 v v k w vi vi 1 f xiu right hd side of y productio w k f w k f p k f 8

v 1 v v k w p k f k p f Nuer of productios i grr 9

30 Nuer of productios i grr k oe productio ust e repeted w v v v k 1 1 r r r Repeted vrile w v 4 3 1 1

w L(G) w Derivtio of strig w 1 34 w oe vrile is repeted 31

Derivtio tree of strig w u Lst repeted vrile w uvxy v repeted y u, v, x, y, : trigs of terils x 3

Possile derivtios: u u vy v y x x 33

We kow: u vy x This strig is lso geerted: u * ux uv 0 xy 0 34

We kow: u vy x This strig is lso geerted: * uuvyuvxy * The origil w uv 1 xy 1 35

We kow: u vy x This strig is lso geerted: * * uuvyuvvyy uvvxyy * uv xy 36

We kow: u vy x This strig is lso geerted: * u uvy * uvvyy uvvvyyyuvvvxyyy uv * 3 xy 3 * 37

We kow: u vy x This strig is lso geerted: * u uvy uvvvyyy * * * * * uvvvvyyyy * uvvvvxy yyy uvvyy * * uv i xy i 38

Therefore, y strig of the for uv i xy i i 0 is geerted y the grr G 39

Therefore, kowig tht uvxy L(G) i i we lso kow tht uv xy L(G) L( G) L { } uv i xy i L 40

u v y x Oservtio: vxy ice is the lst repeted vrile 41

u v y Oservtio: x vy 1 ice there re o uit or -productios 4

The Pupig Le: For ifiite cotext-free lguge L there exists iteger such tht for y strig we c write w L, w w uvxy with legths vxy d vy 1 d it ust e: uv i xy i L, for ll i 0 43

pplictios of The Pupig Le 44

No-cotext free lguges { c : 0} Cotext-free lguges { : 0} 45

Theore: The lguge L { c : 0} is ot cotext free Proof: Use the Pupig Le for cotext-free lguges 46

L { c : 0} ssue for cotrdictio tht is cotext-free L ice L is cotext-free d ifiite we c pply the pupig le 47

L { c : 0} Pupig Le gives gic uer such tht: Pick y strig w L with legth w We pick: w c 48

L { c : 0} w c We c write: w uvxy with legths vxy vy 1 d 49

L { c : 0} w c w uvxy vxy vy 1 Pupig Le sys: uv i xy i L for ll i 0 50

L { c : 0} w c w uvxy vxy vy 1 We exie ll the possile loctios of strig vxy i w 51

L { c : 0} w c w uvxy vxy vy 1 Cse 1: vxy is withi...... ccc... ccc u vxy 5

L { c : 0} w c w uvxy vxy vy 1 Cse 1: v d y oly coti...... ccc... ccc u vxy 53

L { c : 0} w c w uvxy vxy vy 1 Cse 1: Repetig v d y k 1 k...... ccc... ccc u xy v 54

L { c : 0} w c w uvxy vxy vy 1 Cse 1: Fro Pupig Le: uv xy L k 1 k...... ccc... ccc u xy v 55

L { c : 0} w c w uvxy vxy vy 1 Cse 1: Fro Pupig Le: uv xy L k 1 However: uv xy k c L Cotrdictio!!! 56

L { c : 0} w c w uvxy vxy vy 1 Cse : vxy is withi...... ccc... ccc u vxy 57

L { c : 0} w c w uvxy vxy vy 1 Cse : e lysis s i cse 1...... ccc... ccc u vxy 58

L { c : 0} w c w uvxy vxy vy 1 Cse 3: vxy is withi c...... ccc... ccc u vxy 59

L { c : 0} w c w uvxy vxy vy 1 Cse 3: e lysis s i cse 1...... ccc... ccc u vxy 60

L { c : 0} w c w uvxy vxy vy 1 Cse 4: vxy overlps d...... ccc... ccc u vxy 61

L { c : 0} w c w uvxy vxy vy 1 Cse 4: ucse 1: v y cotis oly cotis oly...... ccc... ccc u vxy 6

L { c : 0} w c w uvxy vxy vy 1 Cse 4: ucse 1: k 1 k k 1 1 v y k cotis oly cotis oly...... ccc... ccc u xy v 63

L { c : 0} w c w uvxy vxy vy 1 Cse 4: Fro Pupig Le: uv xy L k 1 k k 1 1 k...... ccc... ccc u xy v 64

L { c : 0} w c w uvxy vxy vy 1 Cse 4: Fro Pupig Le: uv xy L k1 k 1 However: uv xy k1 k c L Cotrdictio!!! 65

L { c : 0} w c w uvxy vxy vy 1 Cse 4: ucse : v cotis d y oly cotis...... ccc... ccc u vxy 66

L { c : 0} w c w uvxy vxy vy 1 Cse 4: k1 k k v y ucse : cotis d oly cotis 1 k1 k k...... ccc... ccc u xy v 67

L { c : 0} w c w uvxy vxy vy 1 Cse 4: Fro Pupig Le: uv xy L k1 k k 1 k1 k k...... ccc... ccc u xy v 68

L { c : 0} w c w uvxy vxy vy 1 Cse 4: Fro Pupig Le: uv xy L However: k1 k k 1 uv xy k 1 k k c L Cotrdictio!!! 69

L { c : 0} w c w uvxy vxy vy 1 Cse 4: ucse 3: v y oly cotis cotis d...... ccc... ccc u vxy 70

L { c : 0} w c w uvxy vxy vy 1 Cse 4: ucse 3: v y oly cotis cotis d e lysis s for sucse 71

L { c : 0} w c w uvxy vxy vy 1 Cse 5: vxy overlps d c...... ccc... ccc u vxy 7

L { c : 0} w c w uvxy vxy vy 1 Cse 5: e lysis s i cse 4...... ccc... ccc u vxy 73

There re o other cses to cosider vxy (sice, strig cot vxy overlp, d c t the se tie) 74

I ll cses we otied cotrdictio Therefore: The origil ssuptio tht L { c : 0} is cotext-free ust e wrog Coclusio: L is ot cotext-free 75