Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

AUTOMATA - Limitations of Finite Automata - KUMAR 5, Study notes of Theory of Automata

Lecture slides on:Limitations of Finite Automata, The pumping lemma, Game-theoretical proof of nonregularity of a set,

Typology: Study notes

2010/2011

Uploaded on 09/01/2011

nihira
nihira 🇮🇳

4.3

(60)

79 documents

1 / 12

Related documents


Partial preview of the text

Download AUTOMATA - Limitations of Finite Automata - KUMAR 5 and more Study notes Theory of Automata in PDF only on Docsity! Transparency No. 7-1 Formal Language and Automata Theory Chapter 7 Limitations of Finite Automata (lecture 11 and 12) Limitations of FAs Transparency No. 7-2 Limitations of FAs Problem: Is there any set not regular ? ans: yes! example: B = {anbn | n  0 } = {e,ab,aabb,aaabbb,…} Intuition: Any machine accepting B must be able to remember the number of a’s it has scanned before encountering the first b, but this requires infinite amount of memory (states) and is beyond the capability of any FA , which has only a finite amount of memory (states). Limitations of FAs Transparency No. 7-5 Intuition behind the Pumping Lemma for FA  For an FA to accept a long string s ( its number of states), the visited path for s must contains a cycle and hence can be cut or repeated to accept also many new strings. cut repeat Limitations of FAs Transparency No. 7-6 The pumping lemma Theorem 11.1: If A is a regular set, then (P): $ k > 0 s.t. for any string xyz  A with |y|  k, there exists a decomposition y = uvw s.t. v  eand for all i  0, the string xuviwz  A. pf: Similar to the previous example. Let k = |Q| where Q is the set of states in any FA accepting A. Also let s and F be the initial and set of final states of the FA, respectively. Now if there is a string xyz  A with |y|  k, consider the sequence of states: D(s,xy0), D(s, xy1), D(s,xy2), … D(s, xyk), where yj (j = 0..k) denote the prefix of y of the first j symbols. Since there are k+1 items in the sequence, each a state in Q, by pigeonhole principle, there must exist two items D(s, xym), D(s, xyn) corresponding to the same state. Without loss of generality, assume m < n. Now let u = ym, yn = u v and y= uvw. We thus have D(s, xuwz) = D(s, xym wz) = D(s, xynwz) = D(s, xuvwz)  F Likewise, for all j > 1, D(s, xuvjwz) = D(xuv vj-1 wz) = D(xuvj-1 wz) = … = D(xuvj-2 wz) = … =D(s,xuvwz)  F. QED Limitations of FAs Transparency No. 7-7 The pumping lemma Theorem 11.1: Let A be any language. If A is a regular, then (P): $ k > 0 s.t. for any string xyz  A with |y|  k, there exist a decomposition y = uvw s.t. v  eand for all i  0, the string xuviwz  A. Theorem 11.2 (pumping lemma, the contropositive form) If A is any language satisfying the property (~P): k> 0 $ xyz  A s.t. |y|  k and u,v,w with uvw = y and v  e , there exists an i  0 s.t. xuvivw  A, then A is not regular. [ ~P means for any k > 0, there is a substring of length ≥ k [of a member] of A, a cut or a certain duplicates of the middle of any 3- segment decomposition of which will produce a string  A. ] Limitations of FAs Transparency No. 7-10 Game-theoretical proof of nonregularity of a set 1. Two players: You (want to show that ~P holds and A is not regular) Demon (the opponent want to show that P holds) 2 The game proceeds as follows: 1. D picks a k> 0 (if A is regular, D’s best strategy is to pick k = #states of a FA accepting A) 2. Y picks x,y,x with xyz  A and |y|  k. 3. D picks u,v,w s.t. y = uvw and v  e. 4. Y picks i  0 3. Finally Y wins if xuviwz  A and D wins if xuviwz  A. 4. By Theorem 11.2, A is not regular if there is a winning strategy according to which Y always win. Note: P is a necessary but not a sufficient condition for the regularity of A (i.e., there is nonregular set A satisfying P). Limitations of FAs Transparency No. 7-11 Using the pumping lemma  Ex1: Show the set A = {anbm | n  m } is not regular. the proof: 1. D gives k [for any k > 0] 2. Y pick x = ak, y = bk, z = e [$ xyz in A with |y|  k] ==> xyz = akbk  A 3. D decompose y = uvw with [for all uvw with uvw=y and |u|=j, |v|=m > 0 and |w|= n v  e ] 4. Y take i = 2. [$ i  0 s.t. xuviwz  A] => xuv2wz = akbjb2mbn = akbk+m  A => Y wins. Hence A is not regular.  Ex2: C = {an! | n  0 } is not regular. pf: similar to Ex1. Left as an exercise. hint: for any k > 0 D chooses, let xyz =akxk! ak! eand let i = 0. Limitations of FAs Transparency No. 7-12 Other techniques:  Using closure property of regular sets. Ex3: D = { x  {a,b}* | #a(x) = #b(x) } = {e, ab, ba, aabb, abab. baba, bbaa, abba, baab,… } is not regular. (Why ?) if regular => D  a*b* = {anbn | n  0 } = B is regular. But B is not regular, D thus is not regular.  [H2E2:] A: any language; if A is regular, then rev(A) =def {xnxn-1…x1 | x1x2…xn  A} is regular.  Ex4: A = {anbm | m  n } is not regular. pf: If A is regular => rev(A) and h((rev(A)) = {anbm | n  m} is regular, where h(a) = b and h(b) = a. => A  h(rev(A)) = {anbn | n  0} is regular, a contradiction!
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved