Question

Show that if G is a CFG in Chomsky normal form, then for any string w...

Show that if G is a CFG in Chomsky normal form, then for any string w is a member of L(G) of length n >=1, exactly 2n-1 steps are required for any derivation of w.

Homework Answers

Answer #1

To Show that exactly 2n-1 steps will be required we begin with a start variable or the single non-terminal ("S") and form the string w by making substitutions, according to the rules of normal form. Each rule of the form A to BC (A->BC) adds a new non-terminal, and each rule of the form A to a (A->a) converts one non-terminal into a terminal. Since it takes (n-1) steps to grow our string from the original non-terminal to n non-terminals because the first terminal is given hence n-1 steps are required to reach to n non-terminals, and then n steps to convert each of those non-terminals into terminals as in the form of converting non-terminals to terminals whole n steps have to be undertaken, it takes 2n-1 steps to derive a string of length n (n-1+n = 2n-1).

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
Theory of Computation Problem 3: Let G be an arbitrary CFG (Context-free Grammer), and let DG...
Theory of Computation Problem 3: Let G be an arbitrary CFG (Context-free Grammer), and let DG be the string-pushing PDA(pushdown automata) for it. Let w be some string of length n in L(G). Suppose you know that the leftmost derivation of w in G consists of m substitutions. How many transitions would be in the corresponding computation of DG for input string w? Justify your answer carefully! All information is given ----------------------------------------------------------------- Upvote for the right answer!! Thanks
Show that if G is a nilpotent group and 1 ≠ N, and N is normal...
Show that if G is a nilpotent group and 1 ≠ N, and N is normal in G, then N ∩ Z(G) ≠ 1.
1) Let G be a group and N be a normal subgroup. Show that if G...
1) Let G be a group and N be a normal subgroup. Show that if G is cyclic, then G/N is cyclic. Is the converse true? 2) What are the zero divisors of Z6?
A 21 g string is under 22 N of tension. A pulse travels the length of...
A 21 g string is under 22 N of tension. A pulse travels the length of the string in 60 ms . 1) How long is the string? Express your answer to two significant figures and include the appropriate units.
If N is a normal subgroup of G and H is any subgroup of G, prove...
If N is a normal subgroup of G and H is any subgroup of G, prove that NH is a subgroup of G.
For any odd integer n, show that 3 divides 2n+1. That is 2 to the nth...
For any odd integer n, show that 3 divides 2n+1. That is 2 to the nth power, not 2 times n
1) Tungsten (W) reacts with Cl2 to form WCl6. What mass of WCl6 is formed from...
1) Tungsten (W) reacts with Cl2 to form WCl6. What mass of WCl6 is formed from the reaction of 12.6 g W with 13.6 g Cl2? 2) NH3 reacts with O2 to produce NO and H2O. How many moles of O2 are needed to react with exactly 10.0 moles of NH3?
Suppose N is a normal subgroup of G such that |G/N|= p is a prime. Let...
Suppose N is a normal subgroup of G such that |G/N|= p is a prime. Let K be any subgroup of G. Show that either (a) K is a subgroup of N or (b) both G=KN and |K/(K intersect N)| = p.
For any subgroup A of a group G, and g ∈ G, show that gAg^-1 is...
For any subgroup A of a group G, and g ∈ G, show that gAg^-1 is a subgroup of G.
Show that any positive number of the form 4n-1 is divisible by a prime of the...
Show that any positive number of the form 4n-1 is divisible by a prime of the same form.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT