Question

L = {strings with the no. of a = twice no. of g where |a| >=...

L = {strings with the no. of a = twice no. of g where |a| >= 0} for ∑ = {a, c, g}

-Is L a context-free language? (proof)

-Does acgcca ꞓ L ? Use the sentential form derivation approach.

Homework Answers

Answer #1

A language is said to be context free language if it has a context free grammar for the given language.

CFG should have one nonterminal on the left habd side of production.

L = {strings with the no. of a = twice no. of g where |a| >= 0} for ∑ = {a, c, g}

L={e,c,cc,ccc,aacg,aaaagg,aacg,........}

so the string belongs to the language

acgcca ꞓ L(true).

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
Do a Push Down Automata for the following language: L = { binary strings of the...
Do a Push Down Automata for the following language: L = { binary strings of the form w#wR where w is any binary string and wR is the reverse of w } Show your work please.
Consider the language L = { w w : w ∈ { 0 , 1 }...
Consider the language L = { w w : w ∈ { 0 , 1 } ∗ } is not context-free. Note that this is the language of all strings that consist of some combination of 0s and 1s, followed immediately by that same combination of 0s and 1s. For example, 0101, 101101, and 110110 are all in the language because they consist of a string followed by itself. Can you build a PDA to recognize this language? (Hint: you...
Recursively define strings in the following language: A = {0^(n)1^(n+m)0^(m) | n,m >= 0} Then create...
Recursively define strings in the following language: A = {0^(n)1^(n+m)0^(m) | n,m >= 0} Then create a context-free grammar to describe the language.
Do a Push Down Automata for the following language: L = { binary strings of the...
Do a Push Down Automata for the following language: L = { binary strings of the form 0N1N for N >= 1 } Show your work please.
Given the following grammar G = (V, T, S, P) where S is the starting symbol....
Given the following grammar G = (V, T, S, P) where S is the starting symbol. (1) S → aS (2) S → aD (3) D → bD (4) D → λ (a) Give two strings of different lengths that are generated from G (b) Give two strings that cannot be generated from G (c) What is the language generated by G, that is L(G)
Consider the language L of all strings over {0,1} whose 2rd symbol from right end is...
Consider the language L of all strings over {0,1} whose 2rd symbol from right end is 0 and 3rd symbol is 1 from right end.   a) Design a NFA to accept the language L. b) Write regular expressions for the languages L.
Solve the following context-free grammar G: 0 S--> L$ 1 L--> TL 2 L -->  ε 3...
Solve the following context-free grammar G: 0 S--> L$ 1 L--> TL 2 L -->  ε 3 T--> x Draw LR(0) parse table and SLR parse table. What kind of conflict does G have in its LR(0) parse table table and SLR parse table? What kind of conflict does G have in its LR(0) parse table table and SLR parse table?
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.