Download presentation

Presentation is loading. Please wait.

1
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars

2
Costas Busch - RPI2 When we say: We are given a Regular Language We mean:Language is in a standard representation

3
Costas Busch - RPI3 Elementary Questions about Regular Languages

4
Costas Busch - RPI4 Membership Question Question:Given regular language and string how can we check if ? Answer:Take the DFA that accepts and check if is accepted

5
Costas Busch - RPI5 DFA

6
Costas Busch - RPI6 Given regular language how can we check if is empty: ? Take the DFA that accepts Check if there is any path from the initial state to a final state Question: Answer:

7
Costas Busch - RPI7 DFA

8
Costas Busch - RPI8 Given regular language how can we check if is finite? Take the DFA that accepts Check if there is a walk with cycle from the initial state to a final state Question: Answer:

9
Costas Busch - RPI9 DFA is infinite DFA is finite

10
Costas Busch - RPI10 Given regular languages and how can we check if ? Question: Find if Answer:

11
Costas Busch - RPI11 and

12
Costas Busch - RPI12 or

13
Costas Busch - RPI13 Non-regular languages

14
Costas Busch - RPI14 Regular languages Non-regular languages

15
Costas Busch - RPI15 How can we prove that a language is not regular? Prove that there is no DFA that accepts Problem: this is not easy to prove Solution: the Pumping Lemma !!!

16
Costas Busch - RPI16 The Pigeonhole Principle

17
Costas Busch - RPI17 pigeons pigeonholes

18
Costas Busch - RPI18 A pigeonhole must contain at least two pigeons

19
Costas Busch - RPI19........... pigeons pigeonholes

20
Costas Busch - RPI20 The Pigeonhole Principle........... pigeons pigeonholes There is a pigeonhole with at least 2 pigeons

21
Costas Busch - RPI21 The Pigeonhole Principle and DFAs

22
Costas Busch - RPI22 DFA with states

23
Costas Busch - RPI23 In walks of strings:no state is repeated

24
Costas Busch - RPI24 In walks of strings:a state is repeated

25
Costas Busch - RPI25 If string has length : Thus, a state must be repeated Then the transitions of string are more than the states of the DFA

26
Costas Busch - RPI26 In general, for any DFA: String has length number of states A state must be repeated in the walk of...... walk of Repeated state

27
Costas Busch - RPI27 In other words for a string : transitions are pigeons states are pigeonholes...... walk of Repeated state

28
Costas Busch - RPI28 The Pumping Lemma

29
Costas Busch - RPI29 Take an infinite regular language There exists a DFA that accepts states

30
Costas Busch - RPI30 Take string with There is a walk with label :......... walk

31
Costas Busch - RPI31 If string has length (number of states of DFA) then, from the pigeonhole principle: a state is repeated in the walk...... walk

32
Costas Busch - RPI32...... walk Let be the first state repeated in the walk of

33
Costas Busch - RPI33 Write......

34
Costas Busch - RPI34...... Observations:lengthnumber of states of DFA length

35
Costas Busch - RPI35 The string is accepted Observation:......

36
Costas Busch - RPI36 The string is accepted Observation:......

37
Costas Busch - RPI37 The string is accepted Observation:......

38
Costas Busch - RPI38 The string is accepted In General:......

39
Costas Busch - RPI39 In General:...... Language accepted by the DFA

40
Costas Busch - RPI40 In other words, we described: The Pumping Lemma !!!

41
Costas Busch - RPI41 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we can write with and such that:

42
Costas Busch - RPI42 Applications of the Pumping Lemma

43
Costas Busch - RPI43 Theorem: The language is not regular Proof: Use the Pumping Lemma

44
Costas Busch - RPI44 Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma

45
Costas Busch - RPI45 Let be the integer in the Pumping Lemma Pick a string such that: length We pick

46
Costas Busch - RPI46 it must be that length From the Pumping Lemma Write: Thus:

47
Costas Busch - RPI47 From the Pumping Lemma: Thus:

48
Costas Busch - RPI48 From the Pumping Lemma: Thus:

49
Costas Busch - RPI49 BUT: CONTRADICTION!!!

50
Costas Busch - RPI50 Our assumption that is a regular language is not true Conclusion: is not a regular language Therefore:

51
Costas Busch - RPI51 Regular languages Non-regular languages

Similar presentations

© 2021 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google