Q.1.
S –> aSa| bSb| a| b ;The language generated by the above grammar over the alphabet {a,b} is the set of
Q.2.
Consider the following identities for regular expressions: (a) (r + s)* = (s + r)* (b) (r*)* = r* (c) (r* s*)* = (r + s)* Which of the above identities are true?
Q.3.
For S ∈ (0 +* let d(s) denote the decimal value of s (e.g. d(= 5). Let L = {s ∈ (0 + 1)* d(s)mod5 = 2 and d(s)mod7 != 4}. Which one of the following statements is true?
Q.4.
The number of tokens in the following C statement is (GATE 2000)printf("i = %d, &i = %x", i, &i);
Q.5.
The regular grammar for the language L = {anbm | n + m is even} is given by
Q.6.
Let L1 be a recursive language. Let L2 and L3 be languages that are recursively enumerable but not recursive. Which of the following statements is not necessarily true?
Q.7.
The number of strings of length 4 that are generated by the regular expression (0+1+|2+3+)*, where | is an alternation character and {+, *} are quantification characters, is:
Q.8.
Consider the following two problems on undirected graphs:α: Given G(V,E), does G have an independent set of size |v|—4?β: Given G(V,E), does G have an independent set of size 5?Which one of the following is TRUE?
Q.9.
In some programming languages, an identifier is permitted to be a letter followed by any number of letters or digits. If L and D denotes the set of letters and digit respectively. Which of the following expression defines an identifier?
Q.10.
Let L1 be a recursive language, and let L2 be a recursively enumerable but not a recursive language. Which one of the following is TRUE?
Q.11.
Consider the languages: L1 ={a^n b^n c^m | n,m >and L2 ={a^n b^m c^m |n,m> o) Which one of the following statements is FALSE?
Q.12.
Consider the following decision problems:(PDoes a given finite state machine accept a given string(PDoes a given context free grammar generate an infinite number of stingsWhich of the following statements is true?
Q.13.
Consider the languages: GATE[2005]L1 = {wwR w €{*1L2 ={w#ww € {O,1}*},where # is a special symbolL3 ={www € {0,1}*}Which one of the following is TRUE?
Q.14.
Consider three decision problems PP2 and PIt is known that P1 is decidable and P2 is undecidable. Which one of the following is TRUE?
Q.15.
Let be the encoding of a Turing machine as a string over ∑= {1}. Let L = { |M is a Turing machine that accepts a string of length}. Then, L is
Q.16.
Consider the regular language L =(111+11111)*. The minimum number of states
Q.17.
Which of the following are decidable?I. Whether the intersection of two regular languages is infiniteII. Whether a given context-free language is regularIII. Whether two push-down automata accept the same languageIV. Whether a given grammar is context-free
Q.18.
Let L1 be a regular language, L2 be a deterministic context-free language and L3 a recursively enumerable, but not recursive, language. Which one of the following statements is false?
Q.19.
Which of the following is true for the language {a^p} p is prine ?
Q.20.
Consider the following context free languages:L1 = {0^i 1^j 2^k | i+j = k}L2 = {0^i 1^j 2^k | i = j or j = k}L3 = {0^i 1^j | i = 2j+1}Which of the following option is true?