set-2
51. Let be set of strings from alphabet. The Kleen closure of is given as
52. If a source language supports some macro pre-processor functions then these functions can be implemented in
Lexical analysis phase
Code generation
Parsing
Syntax analysis phase
53. If and are the regular expressions denoting the language and respectively, then which of the following is wrong?
is regular expression denoting
regular expression denoting
is not regular expression
is regular expression denoting
54. The regular expression denotes all strings
With zero or more instances of and both simultaneously
With one or more instances of and
Equal to regular expression
Any combination of 's and 's including null string
55. Every CFG can be transferred into equivalent
Greiback normal form
Either (a) or (b)
CNF
All of the above
56. Consider the following regular expression
Which of the following is not in ?
Ababab
Abbab
Abababbbab
Abbabbbab
57. In the figure shown, a DFA has start state and accepting state . Which of the following regular expression denoted the set of all words accepted by ?
001
58. Which of the following is most general phase-structured grammar?
Regular
Context-free
Context-sensitive
None of these
59. Context-free grammar can be recognized by
Finite state automation
2-way linear bounded automata
Push down automata
Both (B) and (C) above
60. Context sensitive grammar (CSG) can be recognized by
Finite state automata
Push down automata
2-way linear bounded automata
None of these
61. Consider the grammar , where the productions are numbered as shown
If a shift-reduce (bottom-up) parser writes the production number used immediately after performing any reduction, what will be printed if the parser input is ?
62461
6262441
64642331
64264631
62. Which sentence can be generated by
Becddd
abbbd
aabccd
ababccd
63. Which of the following recognizes variables prefixes of the grammar?
DFA
NFA
Both errors can be detected
None of these
64. Dynamic errors can be detected
Only at compile time
Only at run time
Both at compile time and at run time
None of these
65. Compiler is a software which converts
High level language program into low level language program
Source program into object program
Program in high level language into program in low level language
Program in source language into program in object language
66. The language .
Is a context free
Both (a) and (b)
Is not context free
None of these
67. The language is a
CFL
Context-sensitive language
Regular language
Recursive enumerable language
68. Which of the choice in an operator grammar equivalent for
Assume is start symbol
69. Let and be language over represent by regular expression and respectively then
70. Let denote the language generated by the grammar then
is regular but not
is context free but not regular
is not context free
71. Consider the regular expression ......n times. The minimum state finite automation that recognizes the language represented by this regular expression contains
states
states
states
None of these
72. A grammar that is both left and right recursive for non-terminal is
Ambiguous
Information is not sufficient
Unambiguous
None of these
73. If the regular set is represented by and the regular set represented by then
and are uncomparable
74. Which of the following can be recognized by a DFA
The number 1, 2, 4 ............written in binary
The number 1, 2, 4, ............written in un binary
The set of binary strings in which the number of zeros is the same as the number of ones
The set
75. The string 1101 does not belong to the set represented by
76. Regarding the power of recognition of language, which of the following statements is false?
The NDFA is equivalent to DFA
NPDA is equivalent to DPDA
Non-deterministic Turing machines are equivalent to deterministic push-down automata
Multi-tape Turing-machine are equivalent to Single-Tape Turing machine
77. Let be defined as . Let ; value of is
78. Which one of the following regular expressions over denotes the set of all string not containing 100 as a substring?
79. Which of the following languages over is accepted by deterministic push down automata?
80. Two of following four regular expressions are equivalent, which two?
81. The major difference between a Moore and Mealy machine is that
The output of the former depends only on the present state and present input
The output of the former depends only on the present state
The output of the former depends only on the present input
All of these
82. Finite state machine can recognize
Any grammar
Any unambiguous grammar
Only CG
Only regular grammar
83. Pumping Lemma is generally used for proving
A given grammar is regular
A given grammar is not regular
Whether two given regular expressions are equivalent or not
None of these
84. Which of the following is not regular?
String of 0's whose length is a perfect square
Set of all palindrome made up of 0's and 1's
Set of all 0's whose length is prime
All of these
85. Choose the correct statements
is regular language
The set of all strings of equal number of 's and 's defines a regular language
gives the set
None of these
86. The basic limitations of finite state machine is that
It cannot remember arbitrary large amount of information
It cannot recognize grammars are regular
It sometimes recognize grammars are not regular
All of these
87. Palindrome cannot be recognized by any FSM because
An FSM can't remember arbitrary information
An FSM can't deterministically fix the mid point
Both (A) and (B)
None of these
88. An FSM can be considered to be a TM (Turing machine)
Of finite tape length, rewinding capability and unidirectional tape movement
Of finite tape length, without rewinding and unidirectional tape movement
Of finite tape length, rewinding capability and bidirectional tape movement
All of these
89. Turing machine is more powerful than FSM because
Tape movement is confined to one direction
It has no finite state control
It has the capability to remember arbitrary long sequence of input symbols
None of these
90. For given picture the FSM recognizes
All strings
-alone
No strings
None of these
91. In given picture, the FSM represents
Mealy machine
Kleen machine
Moore machine
All of these
92. The language of all words with at least 's can be described by the regular expression:
and
All of these
93. Which of the following pairs of regular expressions are not equivalent?
and
All of these
94. Any given transition graph has an equivalent
Regular expression
NDFSM
DFSM
All of these
95. The following CFG
is equivalent to regular expression
All of these
96. Any string of terminals that can be generated by the following CFG is
Has at least one 'b'
Has no consecutive 's or 's
Should end in a 'a'
Has at least two 's
97. The following CFG
Generates strings of terminals that have
Equal number of 's and 's
Odd number of 's and odd number of 's
Even number of 's and even number of 's
Odd number of 's and even number of 's
98. The set can be generated by the CFG
None of these
99. Choose the correct statement
All language can be generated CFG
Any regular language has an equivalent CFG
Some non-regular languages can't be generated by an CFG
Some regular language can't be simulated by an FSM
100. Which of the following CFG's can't be simulated by an FSM?
None of these
Last updated