set-3
101. The set is an example of
- Regular language
- Non context free language
- Context free language
- None of these
Show me the answer
Answer: 2. Non context free language
Explanation:
- The language is not context-free as it requires matching counts of ‘s, ‘s, and ‘s.
102. The intersection of CFL and a regular language
- Need not be regular
- Is always regular
- Need not be context free
- None of these
Show me the answer
Answer: 2. Is always regular
Explanation:
- The intersection of a context-free language (CFL) and a regular language is always context-free.
103. Choose the correct statements:
- The power of DFSM and NDFSM are same.
- The power of DFSM and NDFSM are different.
- The power of DPDM and NDPDM are different.
- Both (A) and (C) above.
Show me the answer
Answer: 4. Both (A) and (C) above.
Explanation:
- Deterministic and non-deterministic finite state machines (DFSM and NDFSM) are equivalent in power, while deterministic and non-deterministic pushdown automata (DPDM and NDPDM) are not.
104. Which of the following is accepted by an NDPDM but not by a DPDM?
- All strings in which a given symbol is present at least twice
- Even palindromes.
- Strings ending with a particular alphabet.
- None of these.
Show me the answer
Answer: 2. Even palindromes.
Explanation:
- Even palindromes are accepted by non-deterministic pushdown automata (NDPDM) but not by deterministic pushdown automata (DPDM).
105. Bounded minimization is a technique for
- Proving whether a promotive recursive function is Turing computable or not.
- Providing whether a primitive recursive function is a total function or not.
- Generating primitive recursive functions.
- Generating partial recursive functions.
Show me the answer
Answer: 3. Generating primitive recursive functions.
Explanation:
- Bounded minimization is used to generate primitive recursive functions.
106. Universal Turing machine influenced the concept of
- Stored program computers
- Interpretive implementation of programming language
- Computability
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- The Universal Turing Machine influenced the concepts of stored program computers, interpretive implementation of programming languages, and computability.
107. The statement “A Turing machine can’t solve halting problem” is
- True
- Still at open question
- False
- All of these
Show me the answer
Answer: 1. True
Explanation:
- The halting problem is undecidable, meaning no Turing machine can solve it.
108. If there exists a TM which when applied to any problem in the class, terminates, if the correct answer is yes and may or may not terminate otherwise is said to be
- Stable
- Partially solvable
- Unstable
- Unstable
Show me the answer
Answer: 2. Partially solvable
Explanation:
- A problem is partially solvable if a Turing machine terminates for “yes” instances but may not terminate for “no” instances.
109. The vernacular language English, if considered a formal language is a
- Regular language
- Context sensitive language
- Context free language
- None of these
Show me the answer
Answer: 3. Context free language
Explanation:
- English, as a formal language, is context-free.
110. P, Q, R are three languages, if P and R are regular and if PQ = R then
- Q = R
- Both A and B
- Q = P
- None of these
Show me the answer
Answer: 4. None of these
Explanation:
- The relationship between P, Q, and R cannot be determined from the given information.
111. Consider the grammar
To get string of n terminals, the number of productions to be used is
- N
- n + 1
- 2^n
- 2^{n-1}
Show me the answer
Answer: 4. 2^{n-1}
Explanation:
- The number of productions required to generate a string of terminals is .
112. The following grammar
- CFG
- Context sensitive
- Regular
- None of these
Show me the answer
Answer: 2. Context sensitive
Explanation:
- The grammar is context-sensitive as it allows for context-dependent productions.
113. Let and . Let then the language and are respectively.
- Regular, regular
- Regular, not regular
- Not regular, regular
- Not regular, not regular
Show me the answer
Answer: 2. Regular, not regular
Explanation:
- is regular, while is not regular.
114. Which of the following is not possible algorithmically?
- Regular grammar to context free grammar
- Non-deterministic finite state Automata to deterministic FSA
- Non-deterministic PDA to deterministic PDA
- None of these
Show me the answer
Answer: 3. Non-deterministic PDA to deterministic PDA
Explanation:
- Converting a non-deterministic PDA to a deterministic PDA is not always possible algorithmically.
115. As FSM can be used to add two given integers. That is
- True
- False
- May be true
- None of these
Show me the answer
Answer: 2. False
Explanation:
- Finite state machines (FSMs) cannot perform arithmetic operations like addition.
116. A grammar is said to be in CNF, if all the productions are of the form or . Let be a CFG in CNF. To derive a string of terminals of length , the number of production to be used is
Show me the answer
Answer: 1.
Explanation:
- In Chomsky Normal Form (CNF), deriving a string of length requires productions.
117. In given fig
- Both are equivalent
- The first FSM accepts nothing
- The second FSM accepts -only
- None of these
Show me the answer
Answer: 4. None of these
Explanation:
- The given FSMs are not equivalent, and neither accepts only .
118. The number of tokens in the Fortran statement DO 10 I = 1.25 is
- 3
- 4
- 5
- None of these
Show me the answer
Answer: 4. None of these
Explanation:
- The number of tokens in the statement is 6.
119. The word ‘formal’ in formal languages means
- The symbols used have well-defined language meaning
- They are unnecessary in reality
- Only the form of the string of symbols is significant
- None of these
Show me the answer
Answer: 3. Only the form of the string of symbols is significant
Explanation:
- In formal languages, the structure (form) of the string is significant, not the meaning.
120. If , the number of possible strings of length ‘n’ is
Show me the answer
Answer: 4.
Explanation:
- For alphabet , the number of possible strings of length is .
121. A mealy machine
- May be machine
- Has an equivalent more
- Only context-free grammar
- All of these
Show me the answer
Answer: 2. Has an equivalent more
Explanation:
- A Mealy machine has an equivalent Moore machine.
122. The recognizing capability of NDFSM and DFSM
- May be different
- Must be same
- Must be different
- None of these
Show me the answer
Answer: 2. Must be same
Explanation:
- Non-deterministic finite state machines (NDFSM) and deterministic finite state machines (DFSM) have the same recognizing capability.
123. Which of the following are not regular
- String of 0’s whose length is a perfect square
- Set of all palindromes made up of 0’s and 1’s
- Strings of 0’s, whose length is a prime number
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- None of the given languages are regular.
124. Which of the following pairs of regular expressions are equivalent?
- and
- and
- and
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- All the given pairs of regular expressions are equivalent.
125. The logic of pumping Lemma is a good example of
- The pigeon-hole principle
- The divide and conquer technique
- Recursion
- Iteration
Show me the answer
Answer: 1. The pigeon-hole principle
Explanation:
- The Pumping Lemma is based on the pigeon-hole principle.
126. The FSM pictured shown in the figure
- Mealy machine
- Kleene machine
- Moore machine
- None of these
Show me the answer
Answer: 1. Mealy machine
Explanation:
- The FSM represents a Mealy machine as its output depends on both the current state and input.
127. The above machine
- Complements a given bit pattern
- Generates all strings of 0’s and 1’s
- Adds 1 to a given bit pattern
- None of these
Show me the answer
Answer: 1. Complements a given bit pattern
Explanation:
- The machine complements a given bit pattern.
128. The language of all words with at least 2a’s can be described by the regular expression
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- All the given regular expressions describe the language of words with at least 2a’s.
129. For the following figure
- Complements a given bit pattern
- Finds 2’s complement of a given bit pattern
- Increment a given bit pattern by 1
- Change the sign bit
Show me the answer
Answer: 3. Increment a given bit pattern by 1
Explanation:
- The machine increments a given bit pattern by 1.
130. For which of the following applications regular expression can’t be used?
- Designing compilers
- Simulating sequential circuits
- Developing text editors
- All of these
Show me the answer
Answer: 2. Simulating sequential circuits
Explanation:
- Regular expressions are not suitable for simulating sequential circuits.
131. The following CFG
Is equivalent to the regular expression
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- The CFG is equivalent to all the given regular expressions.
132. Any string of terminals that can be generated by the following CFG
- Has at least one b
- Has no consecutive a’s or b’s
- Should end in an ‘a’
- Has at least two a’s
Show me the answer
Answer: 4. Has at least two a’s
Explanation:
- The CFG generates strings with at least two a’s.
133. The following CFG
Generates strings of terminals that have
- Equal number of a’s and b’s
- Odd number of a’s and odd number of b’s
- Even number of a’s and number of b’s
- Odd number a’s and een number of a’s
Show me the answer
Answer: 1. Equal number of a’s and b’s
Explanation:
- The CFG generates strings with an equal number of a’s and b’s.
134. The set can be generated by a CFG
Show me the answer
Answer: 1.
Explanation:
- The CFG generates the set .
135. Which of the following CFG’s can’t be simulated by an FSM?
- None of these
Show me the answer
Answer: 3.
Explanation:
- The CFG generates a non-regular language and cannot be simulated by an FSM.
136. CFG is not closed under
- Union
- Complementation’s
- Kleene star
- Product
Show me the answer
Answer: 2. Complementation’s
Explanation:
- Context-free grammars (CFGs) are not closed under complementation.
137. The set is an example of a grammar that is
- Regular
- Not context free
- Context-free
- None of these
Show me the answer
Answer: 2. Not context free
Explanation:
- The language is not context-free.
138. Let
Of the following the correct answer is
- and are not CFL, but is CFL
- is a subset of
- None of these
Show me the answer
Answer: 1.
Explanation:
- The language is the intersection of and .
139. The intersection of a CFL, and a regular language
- Need not be regular
- Is always regular
- Need not be context free
- None of these
Show me the answer
Answer: 3. Need not be context free
Explanation:
- The intersection of a context-free language (CFL) and a regular language is always context-free.
140. A PDM behave lie an FSM when the number of auxiliary memory it has is
- 0
- 1
- 2
- None of these
Show me the answer
Answer: 1. 0
Explanation:
- A pushdown automaton (PDM) behaves like a finite state machine (FSM) when it has no auxiliary memory (stack).
141. CSG can be recognized by a
- FSM
- NDPDM
- DPDM
- Linearly bounded memory machine
Show me the answer
Answer: 4. Linearly bounded memory machine
Explanation:
- Context-sensitive grammars (CSG) are recognized by linearly bounded memory machines.
142. An FSM with
- A stack is more powerful than a FSM with no stack.
- 2 stacks is more powerful than a FSM 1 stack
- Both (A) and (B) above
- None of these
Show me the answer
Answer: 3. Both (A) and (B) above
Explanation:
- Adding stacks to an FSM increases its computational power.
143. Recursive languages are
- Closed under intersection
- Closed under complementation
- Recursively enumerable
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- Recursive languages are closed under intersection, complementation, and are recursively enumerable.
144. If satisfy then is
- Even
- Odd
- Null
- None of these
Show me the answer
Answer: 1. Even
Explanation:
- The string must be even in length to satisfy the equation .
145. Let be given by for every value of then is
- One to one not onto
- Not one to one and not onto
- One to one and onto
- Not one to one and onto
Show me the answer
Answer: 1. One to one not onto
Explanation:
- The function is one-to-one but not onto.
146. Let if , find language generated by
Show me the answer
Answer: 2.
Explanation:
- The grammar generates the language .
147. What is the highest type number which can be applied to the following grammar
- Type0
- Type1
- Type2
- Type3
Show me the answer
Answer: 4. Type3
Explanation:
- The grammar is of Type 3 (regular grammar).
148. Construct a grammar to generate
- None of these
Show me the answer
Answer: 1.
Explanation:
- The grammar generates the language .
149. Which string recognize it?
- Information is not complete
Show me the answer
Answer: 4. Information is not complete
Explanation:
- The question lacks sufficient information to determine the correct answer.
150. Regular expression corresponding to the state diagram given in below figure
Show me the answer
Answer: 1.
Explanation:
- The regular expression corresponds to the given state diagram.
151. is a
- Regular
- Accepted by DFA
- Not regular
- Accepted by PDA
Show me the answer
Answer: 3. Not regular
Explanation:
- The language is not regular as it requires checking for primality, which cannot be done by a finite automaton.
152. Regular expression corresponding to the automata given in figure below are:
Show me the answer
Answer: 1.
Explanation:
- The regular expression corresponds to the given automaton.
153. Grammar is in
- LR(1) not in LR(0)
- LR(0) but not in LR(1)
- Both LR(0) and LR(1)
- Neither LR(0) nor in LR(1)
Show me the answer
Answer: 1. LR(1) not in LR(0)
Explanation:
- The grammar is LR(1) but not LR(0).
154. The language is a
- Regular language
- Context-free language
- Context-sensitive language
- Recursively enumerable language
Show me the answer
Answer: 3. Context-sensitive language
Explanation:
- The language is context-sensitive as it requires matching counts of ‘s, ‘s, and ‘s.
155. The set can be generated by the CFG
- None of these
Show me the answer
Answer: 1.
Explanation:
- The CFG generates the set .
156. Which of the following CFG’s can’t be simulated by an FSM?
- None of these
Show me the answer
Answer: 3.
Explanation:
- The CFG generates a non-regular language and cannot be simulated by an FSM.
157. The set is an example of
- Regular language
- Non context free language
- Context free language
- None of these
Show me the answer
Answer: 2. Non context free language
Explanation:
- The language is not context-free.
158. The intersection of CFL and a regular language
- Need not be regular
- Is always regular
- Need not be context free
- None of these
Show me the answer
Answer: 2. Is always regular
Explanation:
- The intersection of a context-free language (CFL) and a regular language is always context-free.
159. Choose the correct statements:
- The power of DFSM and NDFSM are same.
- The power of DFSM and NDFSM are different.
- The power of DPDM and NDPDM are different.
- Both (A) and (C) above.
Show me the answer
Answer: 4. Both (A) and (C) above.
Explanation:
- Deterministic and non-deterministic finite state machines (DFSM and NDFSM) are equivalent in power, while deterministic and non-deterministic pushdown automata (DPDM and NDPDM) are not.
160. Which of the following is accepted by an NDPDM but not by a DPDM?
- All strings in which a given symbol is present at least twice
- Even palindromes.
- Strings ending with a particular alphabet.
- None of these.
Show me the answer
Answer: 2. Even palindromes.
Explanation:
- Even palindromes are accepted by non-deterministic pushdown automata (NDPDM) but not by deterministic pushdown automata (DPDM).