Week #10, homework exercises, due by May 24th
1. Convert the following CFGs into CFGs in Chomsky normal form using the procedure studied
in class. Explicitly indicate each step applied and write down each intermediate
grammar obtained after applying the corresponding step.
(a) (7 points) G = (V = \{S\}, \Sigma = \{a, b, x\}, R, S), with R given below:
S \to aSa | bSb | aSx | bSx | a | b | \epsilon
(b) (8 points) G = (V = \{S, A, B, C\}, \Sigma = \{a, b\}, R, S), with R given below:
S \to aAB | C
A \to ABA | b | \epsilon
B \to bS
C \to bA
2. (5 points) Prove that if G is a CFG in Chomsky normal form, then for any string w \in L(G)
of length n \ge 1, exactly 2n - 1 steps are required for any derivation of w.