Question

Use CFG or PDA to prove L= {0a1b0c : b ≠ a + c; a, b,...

Use CFG or PDA to prove L= {0a1b0c : b ≠ a + c; a, b, c ≥ _0} is a context-free language. Please add your explanation, thank you.

If you can use the theorem(union of CFL and regular language = CFL) is also welcomed.

Homework Answers

Answer #1

A language L is context-free if ∃ CFG G : L(G) = L

Give a CFG for L =  {0a1b0c : b ≠ a + c; a, b, c ≥ _0}

L says some of an's ought to be equivalent to some of b's. Their link says the first number of an's ought to be equivalent to the quantity of b's. In this way, we can make a PDA which will initially push for a's, fly for b's. So it very well may be acknowledged by pushdown automata, consequently setting free.

Sol:- Let L is context free. Then, L must satisfy pumping lemma. At first, choose a number n of the pumping lemma. Then, take z as 0n1n2n.

G = (V, Σ, R, S) with set of variables V = {S, X}, where S is the start variable; set of terminals Σ = {a, b, c}; and rules S → aSc | X X → bXc | ε

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Please make a Context Free Grammar (CFG) for the regular languages below: The language that is...
Please make a Context Free Grammar (CFG) for the regular languages below: The language that is in C++ and containing lowercase and upper case letters, and also can have digits, and can also contain the underscore character '_', and it must begin with an underscore or a letter.
Problem 4. Convert RE to CFG We saw in class how to construct CFGs for U,...
Problem 4. Convert RE to CFG We saw in class how to construct CFGs for U, *, and o operations for existing CFL's. We also saw how to construct CFG's for regular expressions empty-set, e, and c (where c is some member of S). a) Using these constructions, create CFG for the RE R = x ((yx)* U y). This is an algorithm for converting any RE to a CFG with start variable S0. It works as follows: create an...
prove that the language L over {c,d,e} is not context free. (using pumping lemma for context...
prove that the language L over {c,d,e} is not context free. (using pumping lemma for context free languages) L= {w ∈ {c,d,e}* : number of c's, number of d's, and number of e's have a common factor greater than 1}
prove that the language L = {a^n+1 b^2n(aa)^n b | n > 0} is non-context free....
prove that the language L = {a^n+1 b^2n(aa)^n b | n > 0} is non-context free. Using pumping lemma with length
Are the following languages over {a, b} regular? If they are then prove it. If they...
Are the following languages over {a, b} regular? If they are then prove it. If they are not prove it with the Pumping Lemma {an bm | m != n, n >= 0} {w | w contains the substring ‘aaa’ once and only once } Clear concise details please, if the language is regular, provide a DFA/NFA along with the regular expression. Thank you. Will +1
Prove the language of strings over {a, b} of the form (b^m)(a^n) , 0 ≤ m...
Prove the language of strings over {a, b} of the form (b^m)(a^n) , 0 ≤ m < n-2 isn’t regular. (I'm using the ^ notation but your free to make yours bman instead of (b^m)(a^n) ) Use the pumping lemma for regular languages.
L = { am b n | m < n - 2}. (a) Define the context...
L = { am b n | m < n - 2}. (a) Define the context free grammar G that generates the formal language L. (b) Define the deterministic pushdown automaton A that recognize the formal language L. (c) Implement the pushdown automaton A in your favorite programming language.
L = { am b n | m < n - 2}. (a) Define the context...
L = { am b n | m < n - 2}. (a) Define the context free grammar G that generates the formal language L. (b) Define the deterministic pushdown automaton A that recognize the formal language L. (c) Implement the pushdown automaton A in your favorite programming language.
4. Let a, b, c be integers. (a) Prove if gcd(ab, c) = 1, then gcd(a,...
4. Let a, b, c be integers. (a) Prove if gcd(ab, c) = 1, then gcd(a, c) = 1 and gcd(b, c) = 1. (Hint: use the GCD characterization theorem.) (b) Prove if gcd(a, c) = 1 and gcd(b, c) = 1, then gcd(ab, c) = 1. (Hint: you can use the GCD characterization theorem again but you may need to multiply equations.) (c) You have now proved that “gcd(a, c) = 1 and gcd(b, c) = 1 if and...
Draw the state diagram of DFAs recognizing the following languages. a. A = {w|w starts with...
Draw the state diagram of DFAs recognizing the following languages. a. A = {w|w starts with 0 and has odd length, or starts with 1 and has even length} b. B = {w|w is any string except 11 and 111} c. C = {, 0} Example of set difference: A = {0, 01}, and B = {0, 11}. Then, A − B = {01}. Prove that regular languages are closed under the set difference operation. That is, if A and...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT