Applications of Regular Closure

Similar documents
Formal Languages The Pumping Lemma for CFLs

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

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

The limit comparison test

Positive Properties of Context-Free languages

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

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

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

Section IV.6: The Master Method and Applications

General properties of definite integrals

ALGEBRA II CHAPTER 7 NOTES. Name

M098 Carson Elementary and Intermediate Algebra 3e Section 10.2

Chapter 7 Infinite Series

Discrete Mathematics I Tutorial 12

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

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:

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

Sequence and Series of Functions

LAWS OF INDICES M.K. HOME TUITION. Mathematics Revision Guides Level: GCSE Higher Tier

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

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

Fourier Series and Applications

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

MTH 146 Class 16 Notes

First Midterm Examination

( a n ) converges or diverges.

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

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

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

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

ALGEBRA. Set of Equations. have no solution 1 b1. Dependent system has infinitely many solutions

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

Lecture 38 (Trapped Particles) Physics Spring 2018 Douglas Fields

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

Approximate Integration

Summer Math Requirement Algebra II Review For students entering Pre- Calculus Theory or Pre- Calculus Honors

SUTCLIFFE S NOTES: CALCULUS 2 SWOKOWSKI S CHAPTER 11

First Midterm Examination

Topic 4 Fourier Series. Today

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

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

The Elementary Arithmetic Operators of Continued Fraction

 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!

Module 9: String Matching

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

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

Advanced Algorithmic Problem Solving Le 6 Math and Search

Numbers (Part I) -- Solutions

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

Quiz No. 1. ln n n. 1. Define: an infinite sequence A function whose domain is N 2. Define: a convergent sequence A sequence that has a limit

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

Theorem 5.3 (Continued) The Fundamental Theorem of Calculus, Part 2: ab,, then. f x dx F x F b F a. a a. f x dx= f x x

Repeated Root and Common Root

Intermediate Arithmetic

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

Summary: Binomial Expansion...! r. where

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.

Graphing Review Part 3: Polynomials

SUTCLIFFE S NOTES: CALCULUS 2 SWOKOWSKI S CHAPTER 11

APPLICATION OF DIFFERENCE EQUATIONS TO CERTAIN TRIDIAGONAL MATRICES

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

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

MAT136H1F - Calculus I (B) Long Quiz 1. T0101 (M3) Time: 20 minutes. The quiz consists of four questions. Each question is worth 2 points. Good Luck!

g as the function in which for every element x be the set of polynomials of a degree less than or equal to n with , for each i from 0 to n )

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

Mathematical Induction (selected questions)

Section 6.3: Geometric Sequences

Approximations of Definite Integrals

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

Review of the Riemann Integral

National Quali cations AHEXEMPLAR PAPER ONLY

Basic Limit Theorems

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures

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

Convergence rates of approximate sums of Riemann integrals

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

Homework 3 Solutions

Riemann Integral and Bounded function. Ng Tze Beng

Math 153: Lecture Notes For Chapter 1

1.3 Continuous Functions and Riemann Sums

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),

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

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

POWER SERIES R. E. SHOWALTER

10. 3 The Integral and Comparison Test, Estimating Sums

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

INTEGRATION TECHNIQUES (TRIG, LOG, EXP FUNCTIONS)

Project 3: Using Identities to Rewrite Expressions

Chapter 2 Infinite Series Page 1 of 9

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

Infinite Sequences and Series. Sequences. Sequences { } { } A sequence is a list of number in a definite order: a 1, a 2, a 3,, a n, or {a n } or

COMP 2804 Solutions Assignment 1

Chapter Real Numbers

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

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

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

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

Sect Simplifying Radical Expressions. We can use our properties of exponents to establish two properties of radicals: and

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

Transcription:

Applictios of Regulr Closure 1

The itersectio of cotext-free lguge d regulr lguge is cotext-free lguge L1 L2 cotext free regulr Regulr Closure L1 L 2 cotext-free 2

Liz 6 th, sectio 8.2, exple 8.7, pge 227 L={^ ^ 0, 100} is cotext free 3

A Applictio of Regulr Closure Prove tht: L { : 100} is cotext-free 4

We kow: { } is cotext-free 5

We lso kow: 100 L1 { 100 } is regulr L1 {( ) } { * 100 100 } is regulr 6

{ } cotext-free 100 L1 {( ) } { * regulr 100 } (regulr closure) { } L 1 is cotext-free { } L1 { : 100} L is cotext-free 7

Liz 6 th, sectio 8.2, exple 8.8, pge 227 L={w # (w) = # (w) = # c (w)} is ot cotext free 8

Aother Applictio of Regulr Closure Prove tht: L { w: c } is ot cotext-free 9

If L { w: c } is cotext-free (regulr closure) The L { * * c*} { c } cotext-free regulr cotext-free Ipossile!!! Therefore, L is ot cotext free 10

Decidle Properties of Cotext-Free Lguges 11

Meership Questio: for cotext-free grr fid if strig w L(G) G Meership Algoriths: Prsers Exhustive serch prser CYK prsig lgorith 12

Epty Lguge Questio: for cotext-free grr fid if L(G) G Algorith: 1. Reove useless vriles 2. Check if strt vrile is useless S 13

Ifiite Lguge Questio: for cotext-free grr fid if L(G) is ifiite G Algorith: 1. Reove useless vriles 2. Reove uit d productios 3. Crete depedecy grph for vriles 4. If there is loop i the depedecy grph the the lguge is ifiite 14

Exple: S A A C C cs Depedecy grph Ifiite lguge A C S 15

S A C A C cs S => A => => => i => i 16

17 cs C C A A S cs cs C A S i i S c S c cs S ) ( ) ( ) ( ) ( 2 2

There is o lgorith to deterie whether two cotext-free grrs geerte the se lguge. For the oet we do ot hve the techicl chiery for defiig the eig of there is o lgorith. 18

The Pupig Le for Cotext-Free Lguges 19

Tke ifiite cotext-free lguge Geertes ifiite uer of differet strigs Exple: S A A S 20

S A A S A derivtio: Vriles re repeted S A S A 21

Derivtio tree S strig A S A 22

Derivtio tree S strig A S A repeted 23

S A S A 24

Repeted Prt S A 25

Aother possile derivtio S A S A 26

S A S A S 27

S A S A S A S 28

S A S A S A S 29

S Therefore, the strig is lso geerted y the grr 30

We kow: S We lso kow this strig is geerted: S 31

We kow: S Therefore, this strig is lso geerted: S 32

We kow: S Therefore, this strig is lso geerted: S ( ) ( ) ( ) ( ) 2 2 ( ) ( ) 2 2 33

We kow: S Therefore, this strig is lso geerted: S ( ) ( ) i i ( ) ( ) i i 34

Therefore, kowig tht is geerted y grr, we lso kow tht G ( ) i ( ) i is geerted y G 35

I geerl: We re give ifiite cotext-free grr G Assue G hs o uit-productios o -productios 36

Tke strig w L(G) with legth igger th > (Nuer of productios) x (Lrgest right side of productio) Cosequece: Soe vrile ust e repeted i the derivtio of w 37

Strig u, v, x, y, z w uvxyz : strigs of S terils u Lst repeted vrile A z v repeted A y x 38

S Possile derivtios: u z S uaz A vay v A A y A x x 39

We kow: S uaz AvAy A x This strig is lso geerted: S uaz * uxz uv 0 xy 0 z 40

We kow: S uaz AvAy A x This strig is lso geerted: S * uazuvayzuvxyz * The origil w uv 1 xy 1 z 41

We kow: S uaz AvAy A x This strig is lso geerted: S * * uazuvayzuvvayyzuvvxyyz * uv 2 xy 2 z 42

We kow: S uaz AvAy A x This strig is lso geerted: * S uaz uvayz * uvvayyz uvvvayyyzuvvvxyyyz uv * 3 xy 3 z * 43

We kow: S uaz AvAy This strig is lso geerted: S * * * uaz * uvvvayyyz uvayz * * uvvv vay yyyz * uvvv vxy yyyz uvvayyz * * A x uv i xy i z 44

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

Therefore, kowig tht uvxyz L(G) i i we lso kow tht uv xy z L(G) 46

S u A z v A y x Oservtio: Sice A vxy is the lst repeted vrile 47

S u A z v A y Oservtio: x vy 1 Sice there re o uit or productios 48

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

Applictios of The Pupig Le 50

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

Liz 6 th, sectio 8.1, exple 8.1, pge 216 { c 0 } 52

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

L { c : 0} Assue for cotrdictio tht is cotext-free L Sice L is cotext-free d ifiite we c pply the pupig le 54

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

L { c : 0} w c We c write: w uvxyz with legths vxy vy 1 d 56

L { c : 0} c w uvxyz w vxy vy 1 Pupig Le sys: uv i xy i z L for ll i 0 57

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

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

L { c : 0} c w uvxyz w vxy vy 1 Cse 1: v d y cosist fro oly...... ccc... ccc u vxy z 60

L { c : 0} c w uvxyz w vxy vy 1 Cse 1: Repetig v d y k 1 k...... ccc... ccc u 2 xy 2 v z 61

L { c : 0} c w uvxyz w vxy vy 1 Cse 1: Fro Pupig Le: uv 2 xy 2 z L k 1 k...... ccc... ccc u 2 xy 2 v z 62

L { c : 0} c w uvxyz w vxy vy 1 Cse 1: Fro Pupig Le: uv 2 xy 2 z L k 1 However: uv 2 xy 2 z k c L Cotrdictio!!! 63

L { c : 0} c w uvxyz w vxy vy 1 Cse 2: vxy is withi...... ccc... ccc u vxy z 64

L { c : 0} c w uvxyz w vxy vy 1 Cse 2: Siilr lysis with cse 1...... ccc... ccc u vxy z 65

L { c : 0} c w uvxyz w vxy vy 1 Cse 3: vxy is withi c...... ccc... ccc u vxy z 66

L { c : 0} c w uvxyz w vxy vy 1 Cse 3: Siilr lysis with cse 1...... ccc... ccc u vxy z 67

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: vxy overlps d...... ccc... ccc u vxy z 68

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Possiility 1: v y cotis oly cotis oly...... ccc... ccc u vxy z 69

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Possiility 1: k1 k2 1 v y cotis oly cotis oly k 1 k2...... ccc... ccc u 2 xy 2 v z 70

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Fro Pupig Le: uv 2 xy 2 z L k1 k2 1 k 1 k2...... ccc... ccc u 2 xy 2 v z 71

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Fro Pupig Le: uv 2 xy 2 z L k1 k2 1 However: uv 2 xy 2 z k1 k2 c L Cotrdictio!!! 72

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Possiility 2: v cotis d y cotis oly...... ccc... ccc u vxy z 73

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: k1 k2 k v y Possiility 2: cotis d cotis oly 1 k1 k2 k...... ccc... ccc u 2 xy 2 v z 74

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Fro Pupig Le: uv 2 xy 2 z L k1 k2 k 1 k1 k2 k...... ccc... ccc u 2 xy 2 v z 75

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Fro Pupig Le: uv 2 xy 2 z L However: k1 k2 k 1 uv 2 xy 2 z k 1 k 2 k c L Cotrdictio!!! 76

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Possiility 3: v y cotis oly cotis d...... ccc... ccc u vxy z 77

L { c : 0} c w uvxyz w vxy vy 1 Cse 4: Possiility 3: v y cotis oly cotis d Siilr lysis with Possiility 2 78

L { c : 0} c w uvxyz w vxy vy 1 Cse 5: vxy overlps d c...... ccc... ccc u vxy z 79

L { c : 0} c w uvxyz w vxy vy 1 Cse 5: Siilr lysis with cse 4...... ccc... ccc u vxy z 80

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

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 82