CS209-Sessional One Mark Questions With Answers
CS209-Sessional One Mark Questions With Answers
For a PDA (Q, ∑, S, δ, q0, I, F), the language accepted by the set of final
states F is − L(PDA) = {w | (q 0, w, I) ⊢* (q, ε, x), q ∈ F} for any input stack
string x.
For a PDA (Q, ∑, S, δ, q 0, I, F), the language accepted by the empty stack is
− L(PDA) = {w | (q0, w, I) ⊢* (q, ε, ε), q ∈ Q}
2. What is CNF?
A→a
A → BC
S→ε
Where α and β are strings of non-terminals and terminals.Language generated from this CSG is
CSL.
The answer in no we cannot design a generalised algorithm which can appropriately say that
given a program will ever halt or not?
It is only possible for us to run the program and check whether it halts or not.
We can refrain the halting problem question in such a way also: Given a program written in
some programming language(c/c++/java) will it ever get into an infinite loop(loop never stops) or
will it always terminate(halt).
Semi-Decidable problems are those for which a Turing machine halts on the input accepted by it
but it can either halt or loop forever on the input which is rejected by the Turing Machine. Such
problems are termed as Turing Recognisable problems.
Membership of a CFL?
We can always find whether a string exist in a given CFL by using on algorithm based on
dynamic programming.
Emptiness of a CFL
By checking the production rules of the CFL we can easily state whether the language
generates any strings or not.
Undecidable Problems –
The problems for which we can’t construct an algorithm that can answer the problem correctly in
a finite time are termed as Undecidable Problems. These problems may be partially decidable
but they will never be decidable. That is there will always be a condition that will lead the Turing
Machine into an infinite loop without providing an answer at all.
If we feed this problem to a Turing machine to find such a solution which gives a contradiction
then a Turing Machine might run forever, to find the suitable values of n, a, b and c. But we are
always unsure whether a contradiction exists or not and hence we term this problem as an
Undecidable Problem.
As a CFG generates infinite strings ,we can’t ever reach up to the last string and hence it is
Undecidable.
Since we cannot determine all the strings of any CFG , we can predict that two CFG are equal
or not.
Ambiguity of CFG?
There exist no algorithm which can check whether for the ambiguity of a CFL. We can only
check if any particular string of the CFL generates two different parse trees then the CFL is
ambiguous.
It is also an Undecidable Problem as there doesn’t exist any algorithm for the conversion of an
ambiguous CFL to non-ambiguous CFL.
This is an Undecidable Problem as we can not find from the production rules of the CFL
whether it is regular or not.