Question

Convert the grammar G = ({S,A,B,C},{a,b},P,S), where P is given below, into the Chomsky Normal Form....

Convert the grammar G = ({S,A,B,C},{a,b},P,S), where P is given below, into the Chomsky Normal Form.
S −→ AaA | AB
A −→ BB | bAA | ε
B −→ bS | b | ε

Homework Answers

Answer #1

S → AaA | AB
A → BB | bAA | ε
B → bS | b | ε

Remove epsilon transitions

S → AaA | AB | A
A → BB | bAA | ε | B
B → bS | b

S → AaA | AB | A | aA | Aa | a | epsilon
A → BB | bAA | B | bA | b
B → bS | b

Remove UNIT rules

S → AaA | AB | aA | Aa | a | epsilon | BB | bAA | bS | bA | b
A → BB | bAA | bS | bA | b
B → bS | b

Remove mixed rules


S → AMA | AB | MA | AM | a | epsilon | BB | NAA | NS | NA | b
A → BB | NAA | NS | NA | b
B → NS | b
M -> a
N -> b

Change to final CNF

S → CA | AB | MA | AM | a | epsilon | BB | ND | NA | b | NS
A → BB | ND | NA | b | NS
B → NS | b
M -> a
N -> b
C -> AM
D -> AA

Please up vote. I need it very badly right now.

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
Obtain a grammar in Chomsky Normal Form (CNF) equivalent to the grammar G with productions P...
Obtain a grammar in Chomsky Normal Form (CNF) equivalent to the grammar G with productions P given S ->aAb | B A ->aA | a B-> bB | b
Convert the following CFL grammar to an equivalent grammar in Chomsky normal form. A → BAB...
Convert the following CFL grammar to an equivalent grammar in Chomsky normal form. A → BAB | B | ε B → OO | ε
1. Put the following grammar into Chomsky Normal Form. Note that this grammar has no useless...
1. Put the following grammar into Chomsky Normal Form. Note that this grammar has no useless symbols. S → iSE | a E → eS | ε
For the given grammar below, find the first and follow function sets. Then, construct the parsing...
For the given grammar below, find the first and follow function sets. Then, construct the parsing table. By using the LL(1) parser and the parsing table, find if the given string “acfh” is accepted or rejected. S → aBDh B → cC | ε C → bC | ε D → EF E → g | ε F → f | ε
Given a grammar G, G = (Ν, Σ, Π, S), where Ν = { ... }...
Given a grammar G, G = (Ν, Σ, Π, S), where Ν = { ... } Σ = { ... } Π = { ... } S is ... What is the language L, L = L(G) ?
Consider the grammar G with productions as follows: S → AD | BC A → a...
Consider the grammar G with productions as follows: S → AD | BC A → a B → b C → a | AS | BE D → b | BS | AF E → CC F → DD Use the CYK algorithm to test membership of abbaba.
(a) Prove [A, bB+cC] = b[A, B]+c[A, C], where b and c are constants. (b) Prove...
(a) Prove [A, bB+cC] = b[A, B]+c[A, C], where b and c are constants. (b) Prove [AB, C] = A[B, C] +[A, C]B. (c) Use the last relation to work out the commutator [x^2 , p], given that [x, p] = i¯h. (d) Work out the result of [x 2 , p]f(x) directly, by computing the effect of the operators on f(x), and confirm that this agrees with your answer to (c). [12]
If G is a group of order (p^k)s where p is a prime number such that...
If G is a group of order (p^k)s where p is a prime number such that (p,s)=1, then show that each subgroup of order p^i ; i= 1,2...(k-1) is a normal subgroup of atleast one subgroup of order p^(i+1)
A.) For a standard normal distribution, given: P(z < c) = 0.7373 Find c. B.) For...
A.) For a standard normal distribution, given: P(z < c) = 0.7373 Find c. B.) For a standard normal distribution, find: P(-2.42 < z < 2.75)
A, B and C are events that form a partition of sample space S. P(A)=0.45, and...
A, B and C are events that form a partition of sample space S. P(A)=0.45, and P(B)=0.30. D is another event. P(D|A)= 0.32. P(D|B)= 0.48, and P(D|C)= 0.64. Find these probabilities: Find P ( A u B u D )
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • List and briefly explain each step in the ABCDE technique for examining irrational beliefs that contribute...
    asked 14 minutes ago
  • 1. Find the general solution of the first order linear differential equation: 2*x*dy/dx -y-3/sqrt(x)=0. sqrt() =...
    asked 36 minutes ago
  • Fairfield Homes is developing two parcels near Pigeon Fork, Tennessee. In order to test different advertising...
    asked 41 minutes ago
  • . For each of the following questions, say whether the random process is reasonably a binomial...
    asked 54 minutes ago
  • Please discuss why empathy is so important in light of current events. Please give specific examples
    asked 1 hour ago
  • Describe ONE thing you learned from either Peter singer or Tibor Machan author that compelled you...
    asked 1 hour ago
  • Global logistics firms such as DHL Supply Chain and Global Forwarding or C. H. Robinson Worldwide...
    asked 1 hour ago
  • Please match each factor in adoption of a new product or service to the best match...
    asked 1 hour ago
  • Fatty Acid Synthesis Assignment Explain how the activation of acetyl-CoA carboxylase prevents excess citrate in the...
    asked 1 hour ago
  • 1. Discuss and give an example of how a person might “constructively” enter a building of...
    asked 1 hour ago
  • Define the channel type for a natural trapezoidal dirt channel with a roughness of 0.045. The...
    asked 2 hours ago
  • Petroleum Production Engineering How can flow efficiency being improved without resulting into increasing water production?
    asked 2 hours ago