Without context – Is the given language a CFL or not?

Let $ L $ to be a language defined on $ Sigma = left {a, b right } $ such as
$ L = left {x #y mid x, y in Sigma ^ *, # text {is a constant and} x neq y right $
Indicate if the language L is a CFL or not? Give valid reasons for the same thing.


Now, I think that the given language is not a CFL. I've used the lemma pumping test to show that L is not a CFL.
Specifically, I did the following-

Consider a string $ w = abb # aab $. obviously, $ w in L $.

Let, $ u = epsilon \ v = a \ w = bb #aa \ x = b \ y = epsilon $

Right here, $ | vx | geq 1 $

But, $ uv ^ 2wx ^ 2y = aabb #aabb notin L $
Therefore, the result of the pumping lemma test is negative. Therefore, we can conclude that the given language is not a CFL.

Now, I have a doubt about the method above.
I know that in the case of a CFL, if we want to do the pumping lemma test for the CFL, we must always use chains whose length is greater than or equal to the minimum pumping length. In fact, this also confirms the condition that the length of the chain $ w $ used for the pumping test of the lemma (noted $ | w | $) must be greater than or equal to n.

Therefore, when I use $ w = abb # aab $ to perform the pumping lemma test, I implicitly assume that 7 is greater than or equal to the minimum pumping length (if $ L $ had to be a CFL). Am I correct or incorrect?

without context – The language $ {ww | w in {0,1 } ^ {*} } $ n is not a CFL

We proved that the language $ L = { Omega Omega | omega in {0,1 } ^ {*} } $ It's not a CFL, and we did it using the pumping lemma. And the proof is clear to me. But I thought about the following CFG:

$ G = ( {S, S_ {1} }, {0,1 }, R, S) $ where R has the following rules:

$ S rightarrow S_ {1} S_ {1} | epsilon $

$ S_ {1} rightarrow 0S_ {1} | 1S_ {1} | epsilon $

It seems that the language of this CFG should be the language $ L $ that I've defined above since each substitution adds the same letter on both sides. But it can not be so since we can use the pumping lemma on the word $ 0 ^ {l} 1 ^ {l} 0 ^ {l} 1 ^ {l} $ (or $ l $ is the pumping length). So, either I do not do the substitution incorrectly, or the CFG language contains $ L $ and has more words than I currently do not see …

Can any one help me and point out where is my mistake?

Conversion of CFG to CFL [on hold]

Is it possible to convert
(1) Each CFL CFL
(2) Each CFL at CFL


If we take a string where the number of a and the number of b equals the number of c
then we get a CFG that does not have CFL.
So, can CFG at CFL be possible or not?

CFL and LED mixed

I shoot a video on a green screen. I need to turn on the screen as well as the subject. I have a bunch of 6000K CFL and I want to get some LEDs. If both types have the same temperature, 6000 K, can I mix them in a video or will that be a problem?

Prove that each CFL is decidable in a space O (n)

This question was raised while a group of students from my school were studying for our qualifying exams. The question on an old exam was:

Prove that each language without context $ A $ is in $ mathrm {SPACE} (n) $. You can assume that $ A $ is given in CNF (normal form of Chomsky)

I've seen the CYK algorithm but its spatial complexity is $ O (n ^ 2) $.