Question 81
Which statement about CFG equivalence is correct?
No algorithm decides equivalence of all pairs of CFGs.
Which statement about CFG equivalence is correct?
No algorithm decides equivalence of all pairs of CFGs.
Which operations preserve context-freeness for a CFL L?
CFLs are closed under reversal, star, and concatenation, but not complement.
A parse tree of a CNF grammar deriving a nonempty string of length n has how many internal binary nodes?
A full binary tree with n terminal leaves has n-1 internal binary nodes.
Which statements about CNF parse trees for a nonempty string of length n are correct?
A full binary tree with n leaves has n-1 internal nodes; CNF gives n terminal and n-1 binary applications.
In a CNF derivation of a nonempty string of length n, how many total production applications occur in the parse tree?
There are n terminal productions and n-1 binary productions.