Top 150+ Solved Theory of Computation MCQ Questions Answer
Q. The problem 3-SAT and 2-SAT are
a. Both in P
b. Both NP complete
c. NP-complete and in P respectively
d. Undecidable and NP-complete respectively
Q. Which of the following instances of the post correspondence problem has a viable sequence (a solution)?
a. {(b, bb), (bb, bab), (bab, abb), (abb, babb)}
b. {(ab, aba), (baa, aa), (aba, baa)}
c. {(ab, abb), (ba, aaa), (aa, a)}
d. none of the above
Q. Let FHAM be the problem of finding a Hamiltonian cycle in a graph G and DHAM be the problem of determining if a Hamiltonial cycle exists in a graph. Which one of the following is TRUE?
a. Both FHAM and DHAM are NP-hard
b. FHAM is NP hard, but DHAM is not
c. DHAM is NP hard, but FHAM is not
d. Neither FHAM nor DHAM is NP hard
Q. Consider three problems P1, P2 and P3. It is known that P1 has polynomial time solution and P2 is NP-complete and P3 is in NP. Which one of the following is true.
a. P3 has polynomial time solution if P1 is polynomial time reducible to P3
b. P3 is NP complete if P3 is polynomial time reducible to P2
c. P3 is NP complete if P2 is reducible to P3
d. P3 has polynomial time complexity and P3 is reducible to P2
Q. Which one of the following is not decidable?
a. given a Turing machine M, a string s, and an integer k, M accepts s with k steps
b. equivalence of two given Turing machines
c. language accepted by a given DFSA is nonempty
d. language generated by a CFG is nonempty
Q. Which of the following statements are TRUE?(1) The problem of determining whether there exists a cycle in an undirected graph is in P.(2) The problem of determining whether there exists a cycle in an undirected graph is in NP.(3) If a problem A is NP-Complete, there exists a non-deterministic polynomial time algorithm to solve A.
a. 1, 2 and 3
b. 1 and 2 only
c. 2 and 3 only
d. 1 and 3 only
Q. Consider a graph G = (V, E) where I V I is divisible by 3. The problem of finding a Hamiltonian cycle in a graph is denoted by SHAM3 and the problem of determining if a Hamiltonian cycle exits in such graph is denoted by DHAM3. The option, which holds true, is
a. Only DHAM3 is NP-hard
b. Only SHAM3 is NP-hard
c. Both SHAM3 and DHAM3 are NP-hard
d. Neither SHAM3 nor DHAM3 is NP-hard
Q. Which of the following statement is false for a turing machine?
a. There exists an equivalent deterministic turing machine for every nondeterministic turing machine
b. Turing decidable languages are closed under intersection and complementation
c. Turing recognizable languages are closed under union and intersection
d. Turing recognizable languages are closed under union and complementation
Q. Two persons X and Y have been asked to show that a certain problem p is NP-complete. X shows a polynomial time reduction from the 3-SAT problem to p and Y shows a polynomial time reduction from p to 3-SAT. From these reduction it can be inferred that
a. P is NP-complete
b. P is NP-hard but not NP-complete
c. P is in NP but not NP-complete
d. P is neither NP-hard nor in NP
Q. 3-SAT and 2-SAT problems are
a. NP-complete and in P respectively
b. Undecidable and NP-complete
c. Both NP-complete
d. Both in P
Q. Let n be the positive integer constant and L be the language with alphabet {a}. To recognize L the minimum number of states required in a DFA will be
a. 2k + 1
b. k + 1
c. 2n + 1
d. n + 1
Q. Consider a stack, which is limited to 10 items. The language accepted by a push- down automaton in such stack is best described as
a. Regular
b. Deterministic context free
c. Context free
d. Recursive
Q. Out of the three decision problems P1, P2 and P3, P1 is decidable and P2 is undecidable. The statement that holds true is
a. P3 is decidable if P3 is reducible to compliment of P2
b. P3 is decidable if P1 is reducible to P3
c. P3 is undecidable if P1 is reducible to P3
d. P3 is undecidable if P2 is reducible to P3