## context free – Pumping Lemma for CFL – ${ 0^{i} 1^{j} 0^{k} 1^{l} hspace{0.2cm}| hspace{0.2cm} i = l hspace{0.2cm} land j = k }$

I was making exercices about the Pumping Lemma for CFL, and I stumbled up on this language:

$${ 0^{i} 1^{j} 0^{k} 1^{l} hspace{0.2cm}| hspace{0.2cm} i = l hspace{0.2cm} land j = k }$$

I quickly made a CFG that represents that language (or so I believe):

$$S to 0S1 hspace{0.2cm} | hspace{0.2cm} A \ A to 1A0 hspace{0.2cm} | hspace{0.2cm} epsilon$$

The problem is that I began to think if the Pumping Lemma would hold (it should since I have a CFG for the Language, so it must be a CFL).

(Having the Pumping Lemma in mind) I chose a word, w = $$0^{n}1^{n}0^{n}1^{n}$$. I immediately stopped because this word will not pass the Pumping Lemma (it can be used to demonstrate that $${ ww hspace{0.2cm}| hspace{0.2cm} w in {0,1}^{*}}$$, the language of duplicated words, is not a CFL, I have done it before)

Now I’m stuck with a Pumping Lemma that fails, and a CFG that produces the language and don’t now what to do.
I tried to come up with a word that the grammar couldn’t produce and failed, I tried to invalidate the PL but failed (there are no restrictions that tells that the word cannot have all segments of the same size, so $$w$$ is in the language).

As far as I know If the PL holds, the language doesn’t have to be a CFL, but if it fails is absolutely unquestionable that the Language is not a CFL.

What I’m I missing?

## computer science – What does “L being a CFL” mean as a property of CFL’s?

In Ullman’s Introduction to Automata, Languages and Computation (1979):

8.8 Use Theorem 8.14 to show that the following properties of CFL’s are undecidable.

a) L is a linear language.

b) L is a CFL.

Does a property of CFL’s mean exactly a subset of CFL’s?

Does it mean that if L is a CFL, then the problems of whether L is a linear language and whether L is a CFL are both undecidable? If L is a CFL, why do we need to decide if it is a CFL again?

Similarly

8.10 Show that the following properties of linear languages are undecidable. You may use the fact that every regular set is a linear language.

a) L is a regular set.

b) L is a linear language.

c) L is a CFL.

d) L has no unambiguous linear CFG.

Does it mean that if L is a linear language, then the problems of whether L is a linear language and whether L is a CFL are both undecidable? If L is a linear language, why do we need to decide if it is linear and CFL again?

## context-free language : if yx belongs to cfl then xy is also cfl

I faced a problem.
What is the proof to say that if yx is in a Context-Free Language we can say that xy is also in a context-free language.

C is a Context-Free Language.

I think we can use the PDA defining C and edit final states.

Any ideas?
thank you.

## formal languages ​​- Is there a pda with a maximum of 3 states for each CFL?

Thank you for providing a response to Computer Science Stack Exchange!

• Make sure you respond to the question. Give details and share your research!

But to avoid

• Ask for help, clarification or respond to other responses.
• Make statements based on opinion; save them with references or personal experience.

Use MathJax to format the equations. Reference MathJax.

## formal languages ​​- Proving the decidability and undecidability of CFL DCFL problems

I'm trying to figure out how can I prove that various CFL and DCFL problems are undecidable or undecidable.

For grammars without context $$G, G_1, G_2$$, how to prove that the following problems are undecidable:

1. Whether it is $$L (G)$$ is a regular language?
2. Whether it is $$L (G)$$ is a DCFL?
3. Whether it is $$L (G) ^ c$$ is CFL?
4. Whether it is $$L (G_1) cap L (G_2)$$ is CFL?

For a grammar free from a deterministic context $$D$$ and regular grammar $$R$$, how can I prove that the following problems are decidable:

1. Whether it is $$L (D) subseteq L (R)$$
2. Whether it is $$L (D) = L (R)$$
3. Whether it is $$L (R) subseteq L (D)$$

I have given the following attempts:

1. I know if $$L (G) = Sigma ^ *$$ is undecidable. $$Sigma ^ *$$ is a common language. Problem 1 is therefore undecidable.
2. The undecidability of this problem stems from the undecidability of the first problem, since a set of regular languages ​​is an appropriate subset of a set of DCFL.
3. I am unable to find a logic for this.
4. Since I know if $$L (G_1) cap L (G_2) = emptyset$$ is undecidable. $$emptyset$$ is CFL. Problem 4 is therefore undecidable.
5. Since I know, $$L (G) subset L (R)$$ is decidable, $$L (D) subset L (R)$$ is also decidable because a set of DCFL is an appropriate subset of a set of CFLs.
6. The decidability of this problem stems from the fifth problem.
7. I am unable to find a logic for this.

Am I right in my attempt? Can someone also help me with problems 3 and 7?

## 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)$$.