Simplification of Grammer
Simplification of Grammer
BCSC0011
Thesis not Theorem: because we cannot prove this.. With a counter example we can try to disprove it (but this has
not been done yet).
Church-Turing Thesis
For string w: No
TM
▪ If w L then M halts in a final state. ∞
▪ If w L then M halts in a non-final state
or loops forever. Yes
Definition:
In other words:
▪ If for a language there is a halting turing machine then such
language is called as recursive language.
▪ Let L be a recursive language and M
be the Turing Machine that accepts it.
For string w L
Yes
REMARK:
No
TM
∞
Yes
1. The context free languages are closed under:
a) Intersection
b) Complement
c) Kleene
d) None of the mentioned
6. If there exists a language L, for which there exists a TM, T, that accepts every word in L and
either rejects or loops for every word that is not in L, is called
a) Recursive
b) Recursively Enumerable
c) NP-Hard
d) none of the mentioned
7. Universal Turing Machine influenced the concept of
a) stored program computers.
b) interpretative implementation of programming language.
c) computability.
d) all of these.
CHOMSKY CLASSIFICATION
Derivation Tree or Parse Tree
Leftmost and Rightmost Derivations
• A non-terminal
X is useless if: S → aSb | c | Ac
• X does not generate any string of A → aA
terminals.
B → bB | b
• It cannot derive a terminal
string
Any production involving a
OR useless symbol is a useless
• X does not occur in any production.
sentential form
• It cannot be reached from start
symbol
Elimination of Useless Productions
V1″ = {S}
V2″ = {S, A, B} S →AB
V3″ = {S, A, B} A →a, B →b
= V2 ″