Computer science: Theory Of computation MCQs

21. Question

Let S be an NP-complete problem and Q and R be two other problems not known to be in NP. Q is polynomial time reducible to S and S is polynomial-time reducible to R. Which one of the following statements is true?




Answer
22. Question

Let

L1={0n+m 1n 0m |n,m>=0}

L2={0n+m 1n+m 0m |n,m>=0}

L3={0n+m 1n+m 0n+m |n,m>=0}

Which of these languages are NOT context free?




Answer
23. Question

If s is a string over (0 + 1)*, then let n0(s)denote the number of 0’s in s and n1(s) the number of 1’s in s. Which one of the following languages is not regular?




Answer
24. Question

For S ϵ (0 + 1) * let d (s) denote the decimal value of s (e.g. d (101) = 5).
Let L = {s ϵ (0 + 1)*| d (s) mod 5 = 2 and d (s) mod 7 != 4}

Which one of the following statements is true?




Answer
25. Question

Consider the following statements about the context free grammar
G = {S → SS,S → ab,S →  ba,S →ϵ}
I. G is ambiguous
II. G produces all strings with equal number of a’s and b’s
III. G can be accepted by a deterministic PDA.
Which combination below expresses all the true statements about G?




Answer

4 thoughts on “Computer science: Theory Of computation MCQs

  1. Pingback: ugg france pas cher
  2. Pingback: bottes filles chipie

Leave a Reply