Вы находитесь на странице: 1из 3

Suppose L is a non-regular language. Can we conclude that Lc is not regular?

The answer is yes. We will prove that "If L is not regular, then Lc is not regular" using a proof by contradiction. o We begin with the knowledge that L is not regular. c o Assume that L is regular. c c o Then the language (L ) must be regular since regular languages are closed under complement. c c o However, (L ) = L which means that L is regular. o This is a contradiction since we began with the knowledge that L is not regular. c o Therefore, our assumption that L is regular must be false. c o Therefore, we can conclude that L is not regular.

Suppose L and L' are non-regular languages. Can we conclude that L union L' is not regular?

The answer is no. We will prove that "If L and L' are not regular, then L union L' is not regular" is a FALSE statement by giving a counterexample. o Let L be the set of palindromes over the alphabet {A,B}. o L is not a regular language. This is a fact we can prove after next week using the pumping Lemma. For now, you must accept the truth of this statement. c o Let L' = L . o L' is not a regular language. We know L is not regular from above. c We know that L is not regular because the non-regular languages are closed under complement. c L'=L .
o
* L union L' = As we observed before, the union of any language and its

complement is
o o
*

is a regular language. Therefore, we can conclude the assertion that "If L and L' are not regular, then L union L' is not regular" is FALSE because we have given a counterexample that contradicts it.

Suppose L and L' are non-regular languages. Can we conclude that L intersection L' is not regular?

The answer is no. We will prove that "If L and L' are not regular, then L intersection L' is not regular" is a FALSE statement by giving a counterexample. o Let L be the set of palindromes over the alphabet {A,B}. o L is not a regular language. This is a fact we can prove after next week using the pumping Lemma. For now, you must accept the truth of this statement. c o Let L' = L . o L' is not a regular language. We know L is not regular from above. c We know that L is not regular because the non-regular languages are closed under complement. c L'=L . o L intersection L' = {} As we observed before, the intersection of any language and its complement is {} o {} is a regular language. o Therefore, we can conclude the assertion that "If L and L' are not regular, then L intersection L' is not regular" is FALSE because we have given a counterexample that contradicts it.

Suppose L and L' are non-regular languages. Can we conclude that L - L' is not regular?

The answer is no. We will prove that "If L and L' are not regular, then L - L' is not regular" is a FALSE statement by giving a counterexample. o Let both L and L' be the set of palindromes over the alphabet {A,B}. o L and L' are not a regular languages. This is a fact we can prove after next week using the pumping Lemma. For now, you must accept the truth of this statement. o L - L' = {} o {} is a regular language. o Therefore, we can conclude the assertion that "If L and L' are not regular, then L - L' is not regular" is FALSE because we have given a counterexample that contradicts it.

(a) It is possible that the concatenation of two nonregular languages is regular. True. To prove this, we need one example: Let L1 = {aibj, i, j 0 and i j}. Let L2 = {bnam, n, i j k m 0 and n m. L1L2 = {a b a such that: If i and k are both 0 then j 2. If i = 0 and k 0 then j 1. If i 0 and k = 0 then j 1. If i and k are both 1 then j 1. Otherwise, j 0}. In other words, L1L2 is almost a*b*a*, with a small number of exceptions that can be checked for by a finite state machine.

(a) If L is a language that is not regular, then L* is not regular.

False. Let L = Primea = {an : n is prime}. L is not regular.


L* = {} {a : 1 < n}. L* is regular.
n

Вам также может понравиться