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.
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.
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?
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.
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. Use the pumping lemma for regular languages.
Question 2 a) Construct a Pushdown Automaton (PDA) for the language L (M) = {a, b}*...
Question 2 a) Construct a Pushdown Automaton (PDA) for the language L (M) = {a, b}* where, if there are any a’s must precede all b's and the number of b's must be equal to or twice the number of a’s. a) Trace the computations for the strings aabb, bbb, and abb in the PDA obtained in Question 2