Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solution Exercise 1.43 a A r r s q q > b b e b s’ q r q’ b r’ a A’

Similar presentations


Presentation on theme: "Solution Exercise 1.43 a A r r s q q > b b e b s’ q r q’ b r’ a A’"— Presentation transcript:

1 Solution Exercise 1.43 a A r r s q q > b b e b s’ q r q’ b r’ a A’
Input: Automaton A accepting L Output: Automaton AD accepting DROP-OUT(L) Process: 1) Let A’ be a duplicate of A 2) Let q1, …, qn be the states in A, then rename the states in A’ as q1’, …, qn’ 3) For every transition: ((qk,),qc) in A Construct a new transition ((qk,e),qc’ ) 4) The automation AD is formed by A and A’, plus the transitions in (3), with the starting state of AD being the starting state of A a A r r s q q > b b e b s’ q r q’ b r’ a A’ and removing from the list of favorables all states in A

2 Solution Exercise 1.60 a q q3 … qk+1 q1 q q2 > a a,b a,b a,b b
k-1 states

3 Nonregular Languages L = {akbk : k N} Lets show that is regular:
find a regular expression for L, or automaton that accepts L How can we proof that L is nonregular?

4 Pumping Lemma (Theorem 1.70)
Lemma. Let L be a regular language. There exists an integer p > 0 such that for any string w  L with |w|  p, then there exist strings x, y, and z such that: w = xyz y  e |xy|  p xyiz L for i = 0, 1, 2, … y has at least 1 letter The substring xy contains at most the first p letters of w (and z contains the rest of letters) Pumping part: xz, xy2z, xy10z and any other string of the form xyiz must be in L

5 Sketch of Proof (1) Lets analyze how words are accepted by finite automata. Lets take a generic word: w = 1 2 … m If w is accepted by a DFA D. What does it mean: s1 1 s2 2 m sm Where each si are states in D D: >

6 Sketch of Proof (2) s1 1 s2 2 … m sm Where each si are states in D
> Let p = # of states in D. If m > p, what does this means for these s1, s2, …, sm? s1 1 si m sm D: sj same > x y z Thus, w can be split into 3 parts x, y and z

7 Exercises Lets proof that L = {akbk : k N}
is nonregular using the pumping lemma Given a word w, wR denotes the reverse of the word. Lets proof that Palindromes = {w  * : w = wR} is nonregular using the pumping lemma ( = {a,b}) Note: In Example 1.73 of the book (read it!) only case Number 1is necessary to analyze. The other two cases cannot happen because |xy|  p (the text below the cases states it so too but at least one of the selected answers to exercises again analyze more cases than it is necessarily -e.g., Exercise 1.29 (a) -)

8 Homework (Optional: Wednesday!)
Exercise 1.29 (a), (b) Problem 1.46 (b) Problem 1.53 (Hint: you can pick any numbers x, y and z as long as: x = y+z, and Viewed as an string, x = y+z has at least p characters So what you are trying to do is to take some numbers x, y and z so when you “pump” the summation longer adds up)


Download ppt "Solution Exercise 1.43 a A r r s q q > b b e b s’ q r q’ b r’ a A’"

Similar presentations


Ads by Google