Exam 2: Formal Languages and Automata Theory: Part B
Exam 1: Formal Languages and Automata Theory: Part A25 Questions
Exam 2: Formal Languages and Automata Theory: Part B25 Questions
Exam 3: Compiler Construction and Parsing Algorithms24 Questions
Exam 4: Compilation and Programming Languages22 Questions
Select questions type
The number of tokens in the following C statement is (GATE 2000) printf("i = %d, &i = %x", i, &i);
Free
(Multiple Choice)
4.8/5
(34)
Correct Answer:
C
Which of the following statements is false?
Free
(Multiple Choice)
4.8/5
(30)
Correct Answer:
B
Let S and T be language over ={a,b} represented by the regular expressions (a+b*)* and (a+b)*, respectively. Which of the following is true?
(Multiple Choice)
4.8/5
(33)
Which of the following are decidable?
I. Whether the intersection of two regular languages is infinite
II. Whether a given context-free language is regular
III. Whether two push-down automata accept the same language
IV. Whether a given grammar is context-free
(Multiple Choice)
4.8/5
(41)
Consider the following two statements:
S1: { 0^2n |n >= l} is a regu1ar language
S2: { 0^m 0^n 0^(m+n) l m >= 1 and n >= 2} is a regu1ar language
Which of the following statements is correct?
(Multiple Choice)
4.8/5
(26)
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)mod5 = 2 and d(s)mod7 != 4}. Which one of the following statements is true?
(Multiple Choice)
4.7/5
(33)
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?
(Multiple Choice)
4.8/5
(40)
Which of the following are decidable ?
1) whether the intersection of two regular language is infinite.
2) whether a give context free language is regular
3) whether two push down automata accept the same language.
4) whether a given grammar is context free
(Multiple Choice)
4.9/5
(37)
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?
(Multiple Choice)
4.9/5
(31)
Let be the encoding of a Turing machine as a string over ?= {0, 1}. Let L = { |M is a Turing machine that accepts a string of length 2014 }. Then, L is
(Multiple Choice)
4.8/5
(37)
Which of the following pairs have DIFFERENT expressive power?
(Multiple Choice)
4.9/5
(39)
The regular grammar for the language L = {anbm | n + m is even} is given by
(Multiple Choice)
4.8/5
(39)
Which of the following is true for the language {a^p} p is prine ?
(Multiple Choice)
5.0/5
(36)
Consider the following decision problems:
(P1) Does a given finite state machine accept a given string
(P2) Does a given context free grammar generate an infinite number of stings
Which of the following statements is true?
(Multiple Choice)
4.9/5
(41)
Let L denotes the language generated by the grammar S - OSO/00. Which of the following is true?
(Multiple Choice)
4.9/5
(34)
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:
(Multiple Choice)
4.8/5
(37)
Consider the CFG with {S,A,B) as the non-terminal alphabet, {a,b) as the terminal alphabet, S as the start symbol and the following set of production rules
S --> aB S --> bA
B --> b A --> a
B --> bS A --> aS
B --> aBB A --> bAA
Which of the following strings is generated by the grammar?
(Multiple Choice)
4.9/5
(39)
Showing 1 - 20 of 25
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)