Using Ogden’s Lemma versus regular Pumping Lemma for Context-Free Grammars
Date : March 29 2020, 07:55 AM
hop of those help? One important stumbling issue here is that "being able to pump" does not imply context free, rather "not being able to pump" shows it is not context free. Similarly, being grey does not imply you're an elephant, but being an elephant does imply you're grey...Grammar context free => Pumping Lemma is definitely satisfied
Grammar not context free => Pumping Lemma *may* be satisfied
Pumping Lemma satisfied => Grammar *may* be context free
Pumping Lemma not satisfied => Grammar definitely not context free
# (we can write exactly the same for Ogden's Lemma)
# Here "=>" should be read as implies
|
Pumping lemma for regular language
Date : March 29 2020, 07:55 AM
wish of those help You are not completely clear about pumping lemma. What pumping lemma say: To proof using Pumping Lemma:
+-------------------------+--------------------------+----------------+--------------+
| | Sufficient large W in L | y | i >=0 |
+-------------------------+--------------------------+----------------+--------------+
| language is regular | For all W (all W can use | At-least one | For all i>=0 |
| | to generate new W' in L) | | |
+-------------------------+--------------------------+----------------+--------------+
| language is NOT regular | Find Any W (at-least 1 | With all (Show | At-least one |
| | W that can't generates | no possible Y | i |
| | new W' in L | exists) | |
+-------------------------+--------------------------+----------------+--------------+
|
Pumping lemma for language that is regular
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further @Jim Lewis provided the answer to my question - we can have x = empty string, y = '0' and a z of '00110', which will enabled us to pump y as much (or as little) as we want, satisfying the requirements of the pumping lemma. !
|
Pumping lemma to show that `{a^n b^m | n=km for k in N}` is not regular
Date : March 29 2020, 07:55 AM
should help you out A perhaps easier way to proof this is first modifying the language. Since regular languages are closed under complement and the intersection with another regular expression. L' = intersection(complement(L),a*b*})
L'={a^nb^m|n != k*m, for any k in N}
|
Regular languages and pumping lemma
Date : March 29 2020, 07:55 AM
With these it helps Actually 2) is quite simple. A regular expression for the words of length 8 and longer is 1001 · {0,1}^* · {all words of length 4 except 0010}
{a^m b^n c^k: m=1 AND (m<n OR n<k)}
{a b^n c^k: n<k }.
|