Question: NON - CFLS EXAMPLE , 2 . 3 6 Use the pumping lemma to show that the language B = { a n b n
NONCFLS
EXAMPLE
Use the pumping lemma to show that the language is not
context free.
We assume that is a CFL and obtain a contradiction. Let be the pumping
length for that is guaranteed to exist by the pumping lemma. Select the string
Clearly is a member of and of length at least The pumping
lemma states that can be pumped, but we show that it cannot. In other words,
we show that no matter how we divide into uvxyz, one of the three conditions
of the lemma is violated.NONCFLS
First, condition stipulates that either or is nonempty. Then we consider
one of two cases, depending on whether substrings and contain more than
one type of alphabet symbol.
When both and contain only one type of alphabet symbol, does not
contain both as and bs or both bs and cs and the same holds for In
this case the string cannot contain equal numbers of as bs and
cs Therefore it cannot be a member of That violates condition of
the lemma and is thus a contradiction.
When either or contain more than one type of symbol may
contain equal numbers of the three alphabet symbols but not in the correct
order. Hence it cannot be a member of and a contradiction occurs.NONCFLS
First, condition stipulates that either or is nonempty. Then we consider
one of two cases, depending on whether substrings and contain more than
one type of alphabet symbol.
When both and contain only one type of alphabet symbol, does not
contain both as and bs or both bs and cs and the same holds for In
this case the string cannot contain equal numbers of as bs and
cs Therefore it cannot be a member of That violates condition of
the lemma and is thus a contradiction.
When either or contain more than one type of symbol may
contain equal numbers of the three alphabet symbols but not in the correct
order. Hence it cannot be a member of and a contradiction occurs. a Use the languages and
together with Example to show that the class of contextfree languages
is not closed under intersection.
b Use part a and DeMorgan's law Theorem to show that the class of
contextfree languages is not closed under complementation.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
