Notes - Pages 101-150
Chomsky Normal Form
Languages of the form A->BC, A->a, s.t. B and C are not the start variable. S -> epsilon is permitted. Any CFL can be generated by a CFG in CNF. To transform CFG to CNF, createa start symbol that points to the old start symbol. Remove epsilon rules that are not the start symbol by replacing instances of the variable by its terminal for each instance that it appears in. Then remove the S_new -> S by replacein S with its production rules. Remove unit rules, then replace any more than 2 variable productions with new created rules until the conditions for CNF hold.
Pushdown Automaton Definition
the current state, next input symbol read, and top symbol of the stack determine the next move of a pushdown automaton. gamma is the stack alphabet which may be different from sigma the input alphabet. The transiton function is a function from the alphabets and state to the power set of states X gamma/stack alphabet. The other parts are the same (it is now a 6-tuple due to the extra alphabet)
Ambigous grammars are those that produce different syntax trees, there can exist grammars that have multiple derivations but same syntax tree thus the same structure with the same meaning.
ND Pushdown automata === Context Free Grammars
ND-PDA are not equivalent to D-PDA, while any NFA has an equiv in DFA, ND-PDA can express more than D-PDA