set-1
1. Let and be regular sets defined over alphabet then
- is regular
- is not regular
- is not regular
- is not regular
Show me the answer
Answer: 1. is regular
Explanation:
- The union of two regular sets is also regular.
2. Consider the production of the grammar
Describe the language specified by the production grammar
Show me the answer
Answer: 1.
Explanation:
- The grammar generates strings of even length with and .
3. Give a production grammar that specifies the language
- None of the above
Show me the answer
Answer: 1.
Explanation:
- The grammar generates strings with where .
4. Which of the following string can be obtained by the language
- Aaabbbbbb
- Abbabbba
- aabb
- aaaabbbbbb
Show me the answer
Answer: 4. aaaabbbbbb
Explanation:
- The string fits the pattern with and .
5. Give a production grammar for the language , the number of ’s in is multiple of 3}
- None of the above
Show me the answer
Answer: 1.
Explanation:
- The grammar ensures that the number of ’s in the string is a multiple of 3.
6. Let and : the union of and is given by
Show me the answer
Answer: 4.
Explanation:
- The union of and includes all strings where .
7. Give a production grammar for the language
- None of the above
Show me the answer
Answer: 2.
Explanation:
- The grammar generates strings where the number of ’s and ’s are not equal.
8. The production grammar is is
- Type-3 grammar
- Type-1 grammar
- Type-3 grammar
- Type-0 grammar
Show me the answer
Answer: 3. Type-3 grammar
Explanation:
- The grammar is a regular (Type-3) grammar as it generates regular languages.
9. Which of the following statement is wrong?
- A Turing machine cannot solve halting problem
- Set of recursively enumerable languages is closed under union
- A finite State Machine with 2 stacks
- Context sensitive grammar can be recognized by a linearly bounded memory machine
Show me the answer
Answer: 3. A finite State Machine with 2 stacks
Explanation:
- A finite state machine cannot have 2 stacks; it is a characteristic of a pushdown automaton.
10. Which of the following statement is wrong?
- Recursive language are closed under union
- Recursive language are closed under union
- If a language and its complement are both regular, then the language must be recursive
- A language is accepted by FA if and only if it is recursive
Show me the answer
Answer: 4. A language is accepted by FA if and only if it is recursive
Explanation:
- A language accepted by a finite automaton (FA) is regular, not necessarily recursive.
11. Which of the following statement is wrong?
- Every recursive language is recursively enumerable
- A language is accepted by FA if and only if it is context free
- Recursive languages are closed under intersection
- A language is accepted by a FA if and only if it is right linear
Show me the answer
Answer: 2. A language is accepted by FA if and only if it is context free
Explanation:
- A language accepted by a finite automaton (FA) is regular, not necessarily context-free.
12. Which of the following statement is true?
- All language can be generated by CFG
- The number of symbols unnecessary to simulate a Turing Machine (TM) with symbols and states is
- Any regular language has an equivalent CFG
- The class of CFG is not closed under union
Show me the answer
Answer: 3. Any regular language has an equivalent CFG
Explanation:
- Every regular language can be represented by a context-free grammar (CFG).
13. Recursively enumerable languages are not closed under
- Complementation
- Intersection
- Union
- None of the above
Show me the answer
Answer: 1. Complementation
Explanation:
- Recursively enumerable languages are not closed under complementation.
14. Regular expression denotes the set
Show me the answer
Answer: 2.
Explanation:
- The regular expression represents the set .
15. Regular expression denotes the set
Show me the answer
Answer: 1.
Explanation:
- The regular expression represents the set .
16. The regular expressions denote a language comprising all possible strings of even length over the alphabet
Show me the answer
Answer: 4.
Explanation:
- The regular expression generates all strings of even length over .
17. The regular expressions denote zero or more instances of an or is
Show me the answer
Answer: 3.
Explanation:
- The regular expression denotes zero or more instances of or .
18. The regular expression has all strings in which any number of 0’s is followed by any number of 1’s followed by any number of 2’s is:
Show me the answer
Answer: 3.
Explanation:
- The regular expression generates strings with any number of 0’s, followed by any number of 1’s, followed by any number of 2’s.
19. The regular expression have all strings of 0’s and 1’s with no two consecutive 0’s, is
Show me the answer
Answer: 2.
Explanation:
- The regular expression ensures no two consecutive 0’s.
20. The regular expression with all strings of 0’s and 1’s with at least two consecutive 0’s is:
Show me the answer
Answer: 3.
Explanation:
- The regular expression generates strings with at least two consecutive 0’s.
21. Which of the following is NOT the set of regular expression
- Ababbbbab
- Ababbabbbbab
- Abbbab
- Abababab
Show me the answer
Answer: 4. Abababab
Explanation:
- The string does not fit the pattern .
22. Which string can be generated by
- Aabccd
- Abcca
- Adabcca
- Abababd
Show me the answer
Answer: 1. Aabccd
Explanation:
- The string can be generated by the given grammar.
23. The regular sets are closed under
- Union
- Kleene’s closure
- Concentration
- All of the above
Show me the answer
Answer: 4. All of the above
Explanation:
- Regular sets are closed under union, Kleene’s closure, and concatenation.
24. Which of the following statement(s) is (are) wrong?
- The regular sets are closed under intersection
- The class of regular sets is closed under substitution
- The class of regular sets is closed under homomorphisms
- Context sensitive Grammar (CGS) can be recognized by Finite State Machine
Show me the answer
Answer: 4. Context sensitive Grammar (CGS) can be recognized by Finite State Machine
Explanation:
- Context-sensitive grammars cannot be recognized by finite state machines.
25. A Finite State Machine can be considered, having finite tape length without rewinding capability and unidirectional tape movement
- Turing machine
- Context free languages
- Pushdown automata
- Regular language
Show me the answer
Answer: 1. Turing machine
Explanation:
- A finite state machine with finite tape length and unidirectional tape movement behaves like a Turing machine.
26. Which of the following statement is wrong?
- A finite state machine can be considered to be a Turing Machine of finite tape length without rewinding capability and unidirectional tape movement
- Turing machine is more powerful than finite state machine because it has the capability to remember arbitrary long sequences of input symbol
- Palindromes can’t be recognized by any Finite State Machine (FSM) because an FSM can’t remember arbitrarily large amount of information
- Turing machine is more powerful than FMS because it has no final state
Show me the answer
Answer: 4. Turing machine is more powerful than FMS because it has no final state
Explanation:
- Turing machines are more powerful due to their ability to read/write and move in both directions, not because they lack a final state.
27. Let be a Language recognizable by Finite automation. The Language REVERSE is the reverse of where is
- Regular language
- Context-free language
- Context-sensitive language
- Recursively enumerable language
Show me the answer
Answer: 1. Regular language
Explanation:
- The reverse of a regular language is also regular.
28. The Grammar Where is is
- Recursively enumerable language
- Regular expression
- Context-sensitive language
- Context free language
Show me the answer
Answer: 4. Context free language
Explanation:
- The grammar is context-free as it generates a context-free language.
29. Any given transition graph has an equivalent
- Regular expression
- DFSM (Deterministic Finite State Machine)
- NDFSM
- All of them
Show me the answer
Answer: 4. All of them
Explanation:
- A transition graph can be converted into a regular expression, DFSM, or NDFSM.
30. The intersection of CFL and regular language
- Is always regular
- Both (A) and (C) above
- Is always context-free
- Need not be regular
Show me the answer
Answer: 2. Both (A) and (C) above
Explanation:
- The intersection of a context-free language (CFL) and a regular language is always context-free.
31. Context-sensitive Grammar can be recognized by
- Deterministic pushdown Automata
- Non-deterministic pushdown automata
- Finite State Machine (FSM)
- Linearly Bounded Memory Machine
Show me the answer
Answer: 4. Linearly Bounded Memory Machine
Explanation:
- Context-sensitive grammars are recognized by linearly bounded memory machines.
32. Which of the following regular expression identity’s are true?
- All of these
Show me the answer
Answer: 1.
Explanation:
- The identity is true for regular expressions.
33. The Language
- Context-sensitive language
- Context-free language
- Regular languages
- Recursively enumerable language
Show me the answer
Answer: 2. Context-free language
Explanation:
- The language is context-free as it can be generated by a context-free grammar.
34. Consider the production grammar
Which of the following regular expressions corresponding to the production grammar?
Show me the answer
Answer: 4.
Explanation:
- The grammar generates strings of the form .
35. Which of the following sentences is generated by production grammar?
- Abblod
- aabccd
- aabd
- ababccd
Show me the answer
Answer: 2. aabccd
Explanation:
- The string can be generated by the given grammar.
36. Consider a NDFA shown in figure below. The Automation accepts
- All words that contain the substring ab and end with a
- All words that contain the substring ba and end with a
- All words that end with a, but not the null string
- All words that end with a, and also the null string
Show me the answer
Answer: 3. All words that end with a, but not the null string
Explanation:
- The NDFA accepts words ending with but not the null string.
37. Which of the following is accepted by deterministic pushdown machine but not accepted by non-deterministic pushdown machine (NDPDM)?
- Strings end with a particular alphabet
- All strings in which a given symbol is present at least twice
- Even palindrome
- None of these
Show me the answer
Answer: 3. Even palindrome
Explanation:
- Even palindromes are accepted by deterministic pushdown machines but not by non-deterministic ones.
38. Consider the following grammar
Which of the regular expressions describe the same set of strings as the grammar?
Show me the answer
Answer: 1.
Explanation:
- The regular expression matches the strings generated by the grammar.
39. Which of the following instance of the post correspondence problem have a viable sequence?
- None of the above
Show me the answer
Answer: 3.
Explanation:
- The instance has a viable sequence.
40. Which of the following statement(s) is (are) correct?
- Recursively languages are closed under complementation
- If a language and its complement are both recursively enumerable then language is recursive
- Set of recursively enumerable language is closed under union
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- All the statements are correct regarding recursively enumerable languages.
41. Consider the following FA shown in figure below. The language accepted by the FA is
Show me the answer
Answer: 2.
Explanation:
- The FA accepts all strings ending with .
42. Which of the following statement is wrong
- Any regular language has an equivalent context-free grammar
- Some non-regular languages can’t be generated by any context-free grammar
- The intersection of context free languages and a regular language is always context-free
- All language can be generated by CFG
Show me the answer
Answer: 4. All language can be generated by CFG
Explanation:
- Not all languages can be generated by context-free grammars (CFGs).
43. Consider a grammar
The grammar will generate
- Regular language
- Context-free language
- Context sensitive language
- Recursively enumerable language
Show me the answer
Answer: 4. Recursively enumerable language
Explanation:
- The grammar generates a recursively enumerable language.
44. The language constructs which are useful in describing nested structures such as balanced parenthesis
- Regular expression
- Non-context free grammars
- Context-free grammar
- None of these
Show me the answer
Answer: 3. Context-free grammar
Explanation:
- Context-free grammars are used to describe nested structures like balanced parentheses.
45. A grammar that produce more than one parse free for same sentence is called
- Ambiguous
- Regular
- Unambiguous
- None of these
Show me the answer
Answer: 1. Ambiguous
Explanation:
- A grammar that produces more than one parse tree for the same sentence is ambiguous.
46. Which of the regular expression denotes a language containing all possible strings over the alphabet ?
Show me the answer
Answer: 4.
Explanation:
- The regular expression denotes all possible strings over .
47. Palindromes can’t be recognized by any Finite State Machine because
- An FSM can’t remember arbitrarily large amount of information
- An FSM can’t fix the mid-point
- FSM can’t find whether the second half of the string matches the first half
- All of these
Show me the answer
Answer: 4. All of these
Explanation:
- Finite State Machines (FSMs) cannot recognize palindromes due to their inability to remember large amounts of information and determine mid-points.
48. A language is accepted by FA if and only if it is
- Context-free
- Recursive
- Context sensitive
- Right-linear
Show me the answer
Answer: 4. Right-linear
Explanation:
- A language accepted by a finite automaton (FA) is right-linear.
49. A language is denoted by a regular expression . Which of the following is not a legal string within ?
- Yx
- yxx
- x
- xy xyx
Show me the answer
Answer: 4. xy xyx
Explanation:
- The string does not fit the pattern .
50. Can a DFA simulate NFA?
- No
- Sometimes
- Yes
- Depends on NFA
Show me the answer
Answer: 3. Yes
Explanation:
- A Deterministic Finite Automaton (DFA) can simulate a Non-deterministic Finite Automaton (NFA).