Erik Jonsson School of Engineering and Computer Science FEARLESS Engineering CS 5349 – 001 CS 4384...

Preview:

Citation preview

Erik Jonsson School of Engineering and Computer Science

FEARLESS Engineering

CS 5349 – 001 CS 4384 – 001

Automata Theory

http://www.utdallas.edu/~pervin

Thursday: EXAMINATION 1

Tuesday: Context-free LanguagesTuesday 9-30-14

TA

S. S. Gokhalesxg122830@utdallas.eduECSS 2.103B1 (West side Open Lab/ TI)MW 1:30-3:30 and other hours possible

2

Extra AssignmentOnly for CS 5349 Students!

3

4

The Pumping Lemma Game

We play against an opponent. Our goal is to win the game by establishing a contradiction to the PL, while the opponent tries to foil us. There are four moves in the game.

1) The opponent picks p.2) Given p we pick a string s(p) in L of length ≥ p. 3) The opponent chooses the decomposition xyz subject

to |xy| ≤ p, |y| ≥ 1. We have to assume that the opponent makes the choice that will make it harder for us to win the game.

4) We pick i so that the pumped string is not in L.

5Don't forget! It will be on the comprehensive final exam!

6

7

8

9

In class I pointed out that intersecting with the regular language a* makes the problem slightly easier because one would have to pick the s_p we used above.

10

Theorem: Let M be a DFA with p states.

(i) L(M) is not empty iff M accepts a string z with |z| < p.

(ii) L(M) has an infinite number of members iff M accepts a string z with p <= |z| < 2p.

In each case we used the Pumping Lemma to pump “down” to show that the smallest member of the language cannot be of length (i) greater or equal to p; (ii) greater or equal to 2p.

Decision Procedures

11Slightly modified

12M&S P. 84 #2.20(4)

_

13M&S Problem 2.21

See M&S P. 85 #2.26-2.28

14

15

16Martin, P.120 #6.8b

17Linz, P. 89 #9b

18Du, P. 53, Example 9.3

19M&S, P. 64

a*b[(b + ab*a)a*b]*

BOOK:

20

In class, on the board, I considered the language L = {ww^R | w \in {a,b}*}. (Where w^R is the word w reversed.) I suggested s(p) = a^pbba^p would work for the Pumping Lemma since the two b’s must be and the end of w and the beginning of w^R so our opponent must choose y consisting only of a’s and the b’s would still indicate the middle of the pumped string.

21

22

23

Example: Sudkamp 2-22The set of strings over {a,b} with an even number of a’s and an even number of b’s.

Slide #16 from first class!

24

25

Left-Linear Grammars26

27

Recommended