Академический Документы
Профессиональный Документы
Культура Документы
PART A
1. State the CNF theorem.
A CNF theorem state that if CFG is in CNF where all the production are as follows
A->BC
A->a
2. Define - pumping lemma of CFL
Pumping lemma of CFL is defined as
Let L be any CFL. Then there exist a constant n , depending on L, Such that if z is in L
and │z│≥ n, then z = uvwxy such that
i) │vx│≥1,
ii) │vwx│≤ n
iii)For all I ≥ 0 u vi w xi y is in.
3. List the closure properties of CFL.
closure properties of CFL are:
Closure under union
Closure under concatenation
Closure under closure
Closure under intersection
Closure under difference and complement
Closure under homomorphism
4. What you mean by null production and unit production? Give example.
A null production means If the grammar is having the production A->€, then A is said to
be null production.
A unit production is production of the form A->B .it is used to create unambiguous
grammar.
5. Give the steps to eliminate the useless symbol.
Steps to eliminate the useless symbols are:
S -> AB/a
A -> BC/b
B -> aB/C
C -> aC/B
Solution:Useful Symbols: {a, b, S, A}
And any combination of useful symbols will also make LHS a useful symbol.
So we could see that Symbol B and C are useless symbol, remove them
(Whole production in which it contains):
S -> a
A -> b
But because A is not reachable so we will remove A -> b as well:
S -> a
6. What are the two Normal Form?
Two Normal Forms are:
CNF-Chomsky Normal Form
GNF-Greibach Normal Form
7. What is halting problem.
The halting problem of the turning machine recognizes the language ‘L’, then it halts and there
is no next move whenever the input is accepted.
If the input string is not accepted, then the turning machine never halts.
So the Turning machines halts whenever it reaches an accepting state.
8. List out the different techniques for turning machine construction.
Turning machine construction techniques are:
Storage finite control
Multiple tracks
Subroutines
Checking off symbols
9. Define – TM [M/J 16]
Turning machine is defined as a tool for studying the computability of mathematical functions.
M=(Q,∑,┌, ᵟ,q0,B,F)
┌->set of tape symbols
B->blank symbol
10. What are the applications of TM?
An applications of turning machines are:
Algorithmic information theory and complexity studies,
Software testing,
High performance computing,
Machine learning,
Software engineering,
Computer networks and evolutionary computations
A FSM can recognize only regular expressions. . A Turing machine can recognize all
recursively enumerable languages.
22. Show that the CFL is closed under substitution. [N/D 14]
To prove reversal, Let L be a CFL, with grammar G= (V,T,P,S). Let LR be the reverse of L,
such that the Grammar is GR = (V,T,PR,S). That is, reverse every production.