CLICK ON A PICTURE BELOW FOR PREVIOUS GATE QUESTIONS 1987 ONWARDS IN THE THEORY OF COMPUTATION
THEORY OF COMPUTATION
HINTS AND SOLUTIONS TO PROBLEMS
(a+b*) is the same as (a+b+b*)=(a+b)*
L is (00)+ as the 0's always occur in pairs.
(D) is not correct as the grammar is a cfg.
(A) is excluded as 00 is in the language generated.
For P1 simply trace the path through the state diagram of the finite automata.
For P2 take the reduced grammar in the CNF and draw the graph of the grammar. If cycles exist the cfl is infinite else it is finite.
Q.CS7(a). The finite automat state transition diagram is given below.
By examination we find all the states can be distinguished on some input string. So the minimal automata is the same as that given above.
Q3.7(b)By examination it seen that the first production will demand the same number of b's as a's.A can optionally yield extra b's. So we have j>i as the required condition.
Q.CS8.(a) q0 is a push state which pushes 0's and 1's onto the stack. So we have
q1 is a pop state so we have
QCS8(b) q0 and q1 will be push states where for every 0 in the input we nondeterministially push one or two 0's onto the stack.
When a 1 occurs we nondeterministically unstack one or two 0's from the stack.
In q1 the pop state we unstack one or two 0's for a 1 in the input.