0% found this document useful (0 votes)
14 views

automata MCQ

The document contains a series of multiple-choice questions related to Automata Theory, focusing on concepts such as regular languages, context-free grammars, finite automata, and the pumping lemma. It tests knowledge on definitions, properties, and applications of various theoretical constructs in computer science. The questions are designed for students in the 3rd and 5th semesters of a B. Tech program in Computer Science and Engineering.

Uploaded by

Aftaz Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

automata MCQ

The document contains a series of multiple-choice questions related to Automata Theory, focusing on concepts such as regular languages, context-free grammars, finite automata, and the pumping lemma. It tests knowledge on definitions, properties, and applications of various theoretical constructs in computer science. The questions are designed for students in the 3rd and 5th semesters of a B. Tech program in Computer Science and Engineering.

Uploaded by

Aftaz Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 42

Department of Computer Science & Engineering

B. Tech CSE
Year & Semester: 3rd & 5th
Subject: Automata Theory

1. Any language that cannot be expressed by a RE is said to be regular language.

a) True
b) False

2. If L1 and L2 are regular languages is/are also regular language(s).


a) L1 + L2
b) L1L2
c) L1
d) All of above

3. Let L be a language defined over an alphabet Σ, then the language of strings, defined over
Σ, not belonging to L, is called Complement of the language L, denoted by Lc or L’.
a) True

b) False

4. To describe the complement of a language, it is very important to describe the ----------- of


that language over which the language is defined.
a) Alphabet

b) Regular Expression

c) String
d) Word

5. For a certain language L, the complement of Lc is the given language L i.e. (Lc)c = Lc
a) True
b) False

6. If L is a regular language then, --------- is also a regular language.


a) Lm
b) Ls
c) Lx
d) Lc
7. Converting each of the final states of F to non-final states and old non-final states of F to
final states, FA thus obtained will reject every string belonging to L and will accept every
string, defined over Σ, not belonging to L. is called

a) Transition Graph of L
b) Regular expression of L
c) Complement of L

d) Finite Automata of L

8. If L1 and L2 are two regular languages, then L1 U L2 is not a regular.

a) True
b) False

9. If L1 and L2 are regular languages, then these can be expressed by the corresponding FAs.
a) True

b) False

10. The language that can be expressed by any regular expression is called a Non regular
language.
a) True
b) False

11. The languages -------------- are the examples of non regular languages.
a) PALINDROME and PRIME

b) PALINDROME and EVEN-EVEN


c) EVEN-EVEN and PRIME
d) FACTORIAL and SQURE

12. Let L be any infinite regular language, defined over an alphabet Σ then there exist three
strings x, y and z belonging to Such that all the strings of the form XY^ n Z for n=1,2,3, …
are the words in L. called.

a) Complement of L
b) Pumping Lemma

c) Kleene’s theorem
d) None in given

13. Languages are proved to be regular or non regular using pumping lemma.
a) True
b) False

14. ------------------- is obviously infinite language.


a) EQUAL-EQUAL
b) EVEN-EVEN
c) PALINDROME

d) FACTORIAL

15. If, two strings x and y, defined over Σ, are run over an FA accepting the language L, then x
and y are said to belong to the same class if they end in the same state, no matter that state is
final or not.
a) True

b) False

16. "CFG" stands for _________

a) Context Free Graph


b) Context Free Grammar

c) Context Finite Graph


d) Context Finite Grammar

17. ___________ states are called the halt states.

a) ACCEPT and REJECT

b) ACCEPT and READ


c) ACCEPT AND START
d) ACCEPT AND WRITE

18. The part of an FA, where the input string is placed before it is run, is called _______

a) State
b) Transition
c) Input Tape

d) Output Tape

19. In new format of an FA , This state is like dead-end non final state

a) ACCEPT
b) REJECT

c) START
d) READ
20. For language L defined over {a, b}, then L partitions {a, b}into …… classes

a) Infinite
b) Finite
c) Distinct

d) Non-distinct

21. The major problem in the earliest computers was

a) To store the contents in the registers


b) To display mathematical formulae

c) To load the contents from the registers


d) To calculate the mathematical formula

22. Between the two consecutive joints on a path

a) One character can be pushed and one character can be popped


b) Any no. of characters can be pushed and one can be popped character

c) One character can be pushed and any no. of characters can be popped
d) Any no. of characters can be pushed and any no. of characters can be popped

23. In pumping lemma theorem (x y^n z) the range of n is

a) n=1, 2, 3, 4……….

b) n=0, 1, 2, 3, 4……….
c) n=…….-3,-2,-1, 0, 1, 2, 3, 4……
d) n=…….-3,-2,-1, 1, 2, 3, 4……

24. The PDA is called non-deterministic PDA when there are more than one out going edges
from……… state

a) START or READ
b) POP or REJECT
c) READ or POP

d) PUSH or POP

25. There is a problem in deciding whether a state of FA should be marked or not when the
language Q is infinite.
a) True

b) False

26. If an effectively solvable problem has answered in yes or no, then this solution is called
---------

a) Decision procedure

b) Decision method
c) Decision problem
d) Decision making

27. The following problem(s) ------------- is/are called decidable problem(s).

a) The two regular expressions define the same language


b) The two FAs are equivalent
c) Both a and b

d) None of given

28. To examine whether a certain FA accepts any words, it is required to seek the paths from
------- state.

a) Final to initial
b) Final to final
c) Initial to final

d) Initial to initial

29. Grammatical rules which involve the meaning of words are called ---------------

a) Semantics

b) Syntactic
c) Both a and b
d) None of given

30. Grammatical rules which do not involve the meaning of words are called ---------------

a) Semantics
b) Syntactic

c) Both a and b
d) None of given
31. The symbols that can’t be replaced by anything are called -----------------

a) Productions
b) Terminals

c) Non-terminals
d) All of above

32. The symbols that must be replaced by other things are called __________

a) Productions
b) Terminals
c) Non-terminals

d) None of given

33. The grammatical rules are often called_____________

a) Productions

b) Terminals
c) Non-terminals
d) None of given

34. The terminals are designated by ________ letters.

a) Small

b) Capital
c) Both a and b
d) None of the above

35. The non-terminals are designated by ________ letters.

a) Small
b) Capital
c) Bold
d) None of the above

36. The language generated by __________ is called Context Free Language (CFL).

a) FA
b) TG
c) CFG

d) TGT
37. Σ = {a,b} Productions S→XaaX X→aX X→bX X→Λ
This grammar defines the language expressed by___________

a) (a+b)aa(a+b)

b) (a+b)a(a+b)a
c) (a+b)aa(a+b)aa
d) (a+b)aba+b)

38. S → aXb|b XaX → aX|bX|Λ The given CFG generates the language in English
__________

a) Beginning and ending in different letters

b) Beginning and ending in same letter


c) Having even-even language
d) None of given

39. The CFG is not said to be ambiguous if there exists atleast one word of its language that can
be generated by the different production trees,

a) TRUE
b) FALSE

40. The language generated by that CFG is regular if _________

a) Non terminal → semi word


b) Non terminal → word
c) Both a and b

d) None of given

41. The production of the form no terminal → Λ is said to be null production.

a) TRUE

b) FALSE

42. A production is called null able production if it is of the form N → Λ

a) TRUE
b) FALSE

43. The productions of the form nonterminal → one nonterminal, is called _________

a) Null production
b) Unit production

c) Null able production


d) None of given

44. CNF is stands for

a) Context Normal Form


b) Complete Normal Form
c) Chomsky Normal Form

d) Compared Null Form

45. If a TG has more than one start states(Kleene’s Theorem), then

a) Introduce the new start state


b) Eliminate the old start state
c) Replace the old start state with final state
d) Replace the old final state with new start state

46. (a+ b)= (a + b)this expression is __________


Select correct option:

a) True
b) False

47. Let FA3 be an FA corresponding to FA1+FA2, then the initial state of FA3 must correspond
to the initial state of
Select correct option:

a) FA1 only
b) FA2 only
c) FA1 or FA2
d) FA1 and FA2

48. Which of the following statement is NOT true about TG?


Select correct option:

a) There exists exactly one path for certain string


b) There may exist more than one paths for certain string
c) There may exist no path for certain string
d) There may be no final state
49. Kleene’s theorem states
Select correct option:

a) All representations of a regular language are equivalent.


b) All representations of a context free language are equivalent.
c) All representations of a recursive language are equivalent
d) Finite Automata are less powerful than Pushdown Automata.

50. What do automata mean?


Select correct option:

a) Something done manually


b) Something done automatically

51. A language accepted by an FA is also accepted by


Select correct option:

a) TG only
b) GTG only
c) RE only
d) All of the given

52. If r1 = (aa + bb) and r2 = (a + b) then the language (aa + bb)(a + b) will be generated by
Select correct option:

a) (r1)(r2)
b) (r1 + r2)
c) (r2)(r1)
d) (r1)

53. Which statement is true?

a) The tape of turing machine is infinite.

b) The tape of turing machine is finite.

c) The tape of turing machine is infinite when the language is regular


d) The tape of turing machine is finite when the language is nonregular.

54. A regular language:

a) Must be finite
b) Must be infinite

c) Can be finite or infinite


d) Must be finite and cannot be infinite
55. Every regular expression can be expressed as CFG but every CFG cannot be expressed as a
regular expression. This statement is:

a) Depends on the language


b) None of the given options
c) True

d) False

56.

Above given FA corresponds RE r. then FA corresponding to r will be

This statement is
a) True

b) False
c) Depends on language
d) None of these

57. Consider the language L of strings, defined over Σ = {a,b}, ending in a

a) There are finite many classes generated by L, so L is regular


b) There are infinite many classes generated by L, so L is regular
c) There are finite many classes generated by L, so L is non-regular
d) There are infinite many classes generated by L, so L is non-regular

58.

Above given TG has _____________ RE.


a) (aa+aa+(ab+ab)(aa+ab)(ab+ba))
b) (aa+bb+(ab+ba)(aa+bb)(ab+ba))

c) (aa+bb+(ab+ba)(aa+bb)(ab+ba))
d) None of these

59. TM is more powerful than FSM because

a) The tape movement is confined to one direction


b) It has no finite state control

c) It has the capability to remember arbitrary long sequences of input symbols


d) None of these

60. If L1 and L2 are expressed by regular expressions r1 and r2, respectively then the language
expressed by r1 + r2 will be _________

a) Regular

b) Ir-regular
c) Can’t be decided
d) Another Language which is not listed here

61.

The above machine is a ___________


a) Finite Automata
b) Turing machine

c) FA
d) TG

62. In FA, if one enters in a specific state but there is no way to leave it, then that specific state is
called

a) Dead State
b) Waste Basket
c) Davey John Locker
d) All of these

63. If L is a regular language then, Lc is also a _____ language.

a) Regular

b) Non-regular
c) Regular but finite
d) None of the given

64. Pumping lemma is generally used to prove that:

a) A given language is infinite


b) A given language is not regular

c) Whether two given regular expressions of a regular language are equivalent or not
d) None of these

65. Left hand side of a production in CFG consists of:

a) One terminal
b) More than one terminal
c) One non-terminal
d) Terminals and non-terminals

66. Match the following :


(i) Regular Grammar (a) Pushdown automaton
(ii) Context free Grammar (b) Linear bounded automaton
(iii) Unrestricted Grammar (c) Deterministic finite automaton
(iv) Context Sensitive Grammar(d) Turing machine
(c) (a) (b)
A (d)
B (c) (a) (d)
(b)
C (c) (b) (a)
(d
D (c) (b) (d)
(a)

67.
For which of the following application regular expressions cannot be used?
A Designing compilers
B Developing text editors
C Simulating sequential circuits
D All of these

68.
FSM can recognize
A Any grammar
B Only CFG
C Any unambiguous grammar
D Only regular grammar

69. Which of the following is the most general phase structured grammar ?

a) Regular
b) Context Sensitive
c) Context Free
d) None of the above
70.
The language accepted by finite automata is

a) Context Free
b) Regular
c) Non Regular
d) None of the above

71. A formal language theory is the discipline which studies

a) Formal grammars and languages


b) Unusual grammars and languages
c) Both A and B
d) None of the above
72. How many states can a process be in ?
a) 2
b) 3
c) 4
d) 5
73. Consider the regular expression (a + b) (a + b) … (a + b) (n-times). The minimum
number of states in finite automaton that recognizes the language represented by
this regular expression contains

a) n states
b) (n+1) states
c) (n+2) states
d) 2n states

74. Which of the following permanent database that has an entry for each terminal
symbol ?

a) Literal Table
b) Identifier Table
c) Terminal Table
d) Source Table

75. The classic formalization of generative grammars first proposed by


a) Alexender
b) Bill Gates
c) Noam Chomsky
Charles Babbage

76. A Language L is accepted by a Finite Automata if and only if


a) Context free
b) Context sensitive
c) Recursive
d) Right Linear

77. Finite automata are used for pattern matching in text editors for
a) Compiler lexical analysis
b) Programming in localized application
c) Both A and B
d) None of the above
78. Any syntactic construct that can be described by a regular expression can also
be described by a
a) Regular Grammar
b) Context Sensitive
c) Context Free
d) None of the above

79. Given the following statements :


(i) The power of deterministic finite state machine and nondeterministic finite state
machine are same.
(ii) The power of deterministic pushdown automaton and nondeterministic
pushdown automaton are same.

a) Both (i) and (ii)


b) Only (i)
c) Only (ii)
d) Neither (i) nor (ii)

80. Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
a) 1,2 and 3
b) 2,3 and 4
c) 1,2 and 4
d) 1,3 and 4

81. Regular languages are recognized by


a) Finite automaton
b) Push Down automaton
c) Turing Machine
d) All of the above
82. Set of regular languages over a given alphabet set,is not closed under

a) Union
b) Intersection
c) Complementation
d) None of the above

83. Two finite states are equivalent if they


a) Have same no. of states
b) Have same no. of Edges
c) Have same no. of States and Edges
d) Recognize same set of tokens

84. The regular expression for the following DFA

a) ab*(b + aa*b)*
b) a*b(b + aa*b)*
c) a*b(b* + aa*b)
d) a*b(b * + aa*b)*
85. CFG can be recognized by a

a) Push down automata


b) 2-way linear bounded automata
c) Finite state automata
d) None of the above
86. Which one of the following statement is false ?

a) Context-free languages are closed under union


b) Context-free languages are closed under concatenation
c) Context-free languages are closed under intersection
d) Context-free languages are closed under Kleene closure
87. CSG can be recognized by

a) Push down automata


b) 2-way linear bounded automata
c) Finite state automata
d) None of the above

88. Which is not the correct statement(s) ?


(i) Every context sensitive language is recursive.
(ii) There is a recursive language that is not context sensitive.

a) (i) is true, (ii) is false.


b) (i) is true and (ii) is true.
c) (i) is false, (ii) is false.
d) (i) is false and (ii) is true.
89. The behavior of a NFA can be stimulated by DFA
a. Always
b. Sometimes
c. Never
d. depend on NFA
90. A pushdown automaton is different than a finite automaton by
a. A read head
b. A memory in the form of stack
c. A set of states
d. All of the above
91. Context free language can be recognized by
a. Finite State Automaton
b. Linear bounded automaton
c. Pushdown automaton
d. Both B and C
92. A turing machine
a. Is a simple mathematical mode of general purpose computer
b. Models the computing power of any computer
c. Is capable of performing any calculation which can be performed by any
computing machine
d. All of the above
93. Which of the following statements is false?
a. The recursiveness problem of type 0 grammar is unsolvable
b. There is no algorithm that can determine whether or not a given a Turing
machine halts with complete blank tape when it starts with a given tape
configuration
c. The problem of determining whether or not a given context sensitive language is
context free is solvable
d. None of the above
94. Which of the following is not primitive recursive but partially recursive?
a. Carnot function
b. Rieman function
c. Bounded function
d. Ackermann function
95. A turing machine is similar to a finite automaton with only one difference of
a. Read/write
b. Input tape
c. Finite state control
d. All of these
96. Which of the following statements is false?
a. A turing machine is more powerful than finite state machine because it has no
finite state
b. A finite state machine can be assumed to be a turing machine of finite tape
length without rewinding capability and undirectional tape movement
c. Both A and B
d. None of the above
97. A PDM behaves like a TM when the number of auxiliary memory it has is
a. Zero
b. One or more
c. Two or more
d. None of these
98. Which of the following statements is/are FALSE?
(1) For every non-deterministic Turing machine, there exists an equivalent
deterministic Turing machine.
(2) Turing recognizable languages are closed under union and complementation.
(3) Turing decidable languages are closed under intersection and complementation
(4) Turing recognizable languages are closed under union and intersection.

a. 1,4
b. 1,3
c. 2
d. 3
99. Push down machine represents
a. Type 0 Grammar
b. Type 1 Grammar
c. Type 2 Grammar
d. Type 3 Grammar
100. Which of the following statements is false?
a. If a language is not recursively enumerable then its complement cannot be
recursive
b. The family of recursive languages is closed under union
c. The family of recursive languages is closed under intersection
d. None of the above

101.
Consider the following statements :
I. Recursive languages are closed under complementation.
II. Recursively enumerable languages are closed under union.
III. Recursively enumerable languages are closed under complementation.
Which of the above statements are true ?
A I only
B I and II
C I and III
D I and III

102.

A recursive enumerable language is


A Accepted by TM
B Not accepted by TM
C Sometimes accepted and sometimes not accepted
D None of the above

103.
Which of the following statements is false?
A Every context sensitive language is recursive
B Every recursive language is context sensitive
C Both A and B
D None of the above

104.
Pumping lemma is used for proving

A A given grammar is regular


B A given language is regular
C A given language is not regular
D All of the above

105.
The logic of pumping lemma is a good example of
A The pigeon hole principle
B Divide and conquer method
C Iteration
D Recursion

106. Which of the following is true?


a) (01)*0 = 0(10)*
b) (0+1)*0(0+1)*1(0+1) = (0+1)*01(0+1)*
c) (0+1)*01(0+1)*+1*0* = (0+1)*
d) All of the mentioned

107. . A language is regular if and only if


a) accepted by DFA
b) accepted by PDA
c) accepted by LBA
d) accepted by Turing machine

108. . Regular grammar is


a) context free grammar
b) non context free grammar
c) english grammar
d) none of the mentioned

109. 5. Let the class of language accepted by finite state machine be L1 and the class of
languages represented by regular expressions be L2 then
a) L1<l2
b) L1>=L2
c) L1 U L2 = .*
d) L1=L2

110. . Regular expression are


a) Type 0 language
b) Type 1 language
c) Type 2 language
d) Type 3 language

111.
. Which of the following is true?
a) Every subset of a regular set is regular
b) Every finite subset of non-regular set is regular
c) The union of two non regular set is not regular
d) Infinite union of finite set is regular

112.
. L and ~L are recursive enumerable then L is
a) Regular
b) Context free
c) Context sensitive
d) Recursive
113. . Regular expressions are closed under
a) Union
b) Intersection
c) Kleen star
d) All of the mentioned

114.
All strings having equal number of a and b can be recognized by

a) PDA

b) DFA

c) NDFA

d) All of these

115.
Which of the following statements is/are FALSE?
(1) For every non-deterministic Turing machine, there exists an equivalent
deterministic Turing machine.
(2) Turing recognizable languages are closed under union and complementation.
(3) Turing decidable languages are closed under intersection and complementation
(4) Turing recognizable languages are closed under union and intersection.

a) 1 and 4 only
b) 1 and 3 only
c) 2 only
d) 3 only

116.
Which of the following is not true?

A. Power of deterministic automata is equivalent to power of non deterministic automata


B. Power of deterministic pushdown automata is equivalent to power of non deterministic
pushdown automata
C. Power of deterministic turing machine is equivalent to power of deterministic turing
machine
D. All of the machine
117.

Set of regular languages over a given alphabet set,is not closed under

A. Union
B. Complementation
C. Intersection
D. None of the above
118.

A turing machine is similar to a finite automaton with only one difference of

A. Read/write
B. Input tape
C. Finite state control
D. All of these
119.
The behavior of a NFA can be stimulated by DFA

A. always
B. sometimes
C. never
D. depend on NFA

120.
How many states can a process be in ?

A. 2
B. 3
C. 4
D. 5
121.
Which of the following is the most phase structured grammar?

A. Regular
B. Context free
C. Context sensitive
D. None of the above

122. CSG can be recognized by

a) Push down automata


b) 2-way linear bounded automata
c) Finite state automata
d) None of the above

123.
The language accepted by finite automata is

A. Context free
B. Regular
C. Non regular
D. None of these

124.
CSG can be recognized by

A. Push down automata


B. 2-way linear bounded automata
C. Finite state automata
D. None of the above

125.
Which is not the correct statement(s) ?
(i) Every context sensitive language is recursive.
(ii) There is a recursive language that is not context sensitive.

A. (i) is true, (ii) is false.


B. (i) is true and (ii) is true.
C. (i) is false, (ii) is false.
D. (i) is false and (ii) is true.

126.
Context free languages are not closed under

A. Union
B. Concatenation
C. Closure
D. Iteration

127.
Contex-free Grammar (CFG) can be recognized by

A. Finite state automata


B. 2-way linear bounded automata
C. push down automata
D. both (B) and (C)

128.
Two finite states are equivalent if they

A. Have same number of states


B. Have same number of edges
C. Have same number of states and edges
D. Recognize same set of tokens

129.
Which of the following statements is false?

A. A turing machine is more powerful than finite state machine because it has no finite
state
B. A finite state machine can be assumed to be a turing machine of finite tape length
without rewinding capability and undirectional tape movement
C. Both A and B
D. None of the above

130.
Which of the following statements is false?

A. Every context sensitive language is recursive


B. Every recursive language is context sensitive
C. Both A and B
D. None of the above

131.
The logic of pumping lemma is a good example of

A. The pigeon hole principle


B. Divide and conquer method
C. Iteration
D. Recursion

132.
Given the following statements :
(i) The power of deterministic finite state machine and nondeterministic finite
state machine are same.
(ii) The power of deterministic pushdown automaton and nondeterministic
pushdown automaton are same.

A. Both (i) and (ii)


B. Only (i)
C. Only (ii)
D. Neither (i) nor (ii)

133.
A pushdown automaton is different than a finite automaton by

A. A read head
B. A memory in the form of stack
C. A set of states
D. All of the above
134.
FORTRAN is a

A. Regular language
B. Context free language
C. Context sensitive language
D. Turing machine

135.
Which of the following problem is decidable?
1. Does a given programm ever produce an output?
2. If L is a CFL,then, L is also Context Free?
3. If L is a regular Language,then, L is also Regular?
4. If L is a Recursive language,then, L is also Recursive?

A. 1,2,3,4
B. 1,2
C. 2,3,4
D. 3,4

136.
Any syntactic construct that can be described by a regular expression can also be
described by a

A. Context sensitive grammar


B. Context sensitive grammar
C. Context free grammar
D. None of the above

137.
Context free language can be recognized by

A. Finite State Automaton


B. Linear bounded automaton
C. Pushdown automaton
D. Both B and C

138.
The classic formalization of generative grammars first proposed by

A. Alexender
B. Bill Gates
C. Noam Chomsky
D. Charles Babbage
139.
A PDM behaves like a TM when the number of auxiliary memory it has is

A. Zero
B. One or more
C. Two or more
D. None of these
140.

A. A
B. B
C. C
D. D
141.
Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa

A. 1, 2 and 3
B. 2, 3 and 4
C. 1, 2 and 4
D. 1, 3 and 4

142.
Which of the following is most powerful?

A. DFA
B. NDFA
C. 2PDA
D. DPDA
143.
Push down machine represents

A. Type 0 Grammar
B. Type 1 grammar
C. Type-2 grammar
D. Type-3 grammar

144.

A push Down Machine behaves like a Turing Machine when number of auxiliary
memory it has

A. 2
B. 1
C. 0
D. 4
145.
Which of the following statements is false?

A. The recursiveness problem of type 0 grammar is unsolvable


B. There is no algorithm that can determine whether or not a given a Turing machine halts
with complete blank tape when it starts with a given tape configuration
C. The problem of determining whether or not a given context sensitive language is
context free is solvable
D. None of the above

146.
Finite automata are used for pattern matching in text editors for

A. Compiler lexical analysis


B. Programming in localized application
C. Both A and B
D. None of the above

147.
If two finite state machines are equivalent they should have the same number of

A. States
B. Edges
C. States and edges
D. None of these

148.
If every string of a language can be determined whether it is legal or illegal in finite
time the language is called

A. Decidable
B. Undecidable
C. Interpretive
D. Non deterministic
149.
The unit production is
Terminal --> Terminal
Terminal --> Non Terminal
C) Non terminal --> Terminal
D) Non terminal --> Non Terminal
150.
The input string is placed, before it runs, in

a. Stack
b. Memory
c. Tape
d. Ram
151.
The CFG is said to be ambiguous if there exist at least one word of its language that can

be generated by the …………

production trees

a.  One
b.  Two
c.  More than one
d.  At most one
152.
A _________ is the one for which every input string has a unique path through the
machine.

a.  deterministic PDA
b.  nondeterministic PDA
c.  PUSHDOWN store
d.  Input Tape
153.
For language L defined over {a, b}, then L partitions {a, b}* into …… classes
a.  Infinite
b.  Finite
c.  Distinct
d.  Non-distinct
154.
Let L be any infinite regular language, defined over an alphabet Σ then there exist three
strings x, y and z belonging to Σ* such that all the strings of the form for n=1,2,3, … are the
words in L. called.
a.  Complement of L
b.  Pumping Lemma
c.  Kleene’s theorem
d.  None in given

155. There are ______ tuples of a Finite Automata.


a) 5
b) 6
c) 4
d) 7

156. The transition function is represented by _____


a) Σ
b) ₵
c) Δ
d) δ

157. The finite automata can be represented by______


a) Transition Graph
b) Transition Table
c) Both a and b
d) None of the above

158. The Final State can be Represented by______


a) Ellipse
b) Diamond
c) Concentric Circle
d) None of the above

159. Transition Function of a DFA is ____


a) Q*Σ→Q
b) Q→Σ
c) Q→Q*Σ
d) Q*Σ→2Q

160. Transition Function of a NDFA is ____


a) Q*Σ→Q
b) Q→Σ
c) Q→Q*Σ
d) Q*Σ→2Q

161. String is acceptable in DFA when


a) Reaches to initial state
b) Reaches to Final State
c) Reaches to non-final state
d) None of the above

162. Which of the statement is true for DFA


a) On applying the i/p to any state,we get one and only one state.
b) On applying the i/p to any state,we get more than one state.
c) On applying the i/p to any state,we get infinite states.
d) On applying the i/p to any state,we get finite states.

163. Which of the statement is true for NDFA


a) On applying the i/p to any state,we get one and only one state.
b) On applying the i/p to any state,we get more than one state.
c) On applying the i/p to any state,we get infinite states.
d) None of the above.
164. To convert NDFA into DFA we make ______table?
a) New Table
b) Transition Table
c) Subset Table
d) Comparison Table

165. To find two automata are equivalent ,we have to reach____

a) To the non final states of both the automata.


b) To the final states of both the automata.
c) To one final and other non final state of both the automata.
d) None of the above

166. A language is a set of ____ involving ____ from some alphabet.


a) Symbols,strings
b) Strings,symbols
c) Alphabets,strings
d) Strings,alphabets

167. A regular expression is used to define a _______.


a) Alphabet
b) String
c) Language
d) None of the above

168. X + Y read as
a) X or Y
b) X plus Y
c) Either X or Y
d) X and Y

169. (PQ)*P=?
a) Q(pp)*
b) P(QP)*
c) P(P+Q)
d) Q(Q+P)

170. (P+Q)*=(P*Q*)*=?
a) (P*+Q*)*
b) (P*+Q)*
c) (P+Q)**
d) (Q*+P*)**
171. The regular expression which accept all strings beginning or ending with either 01
and 10 is
a) 01+ 01 + 10+
b) (01+10)(0+1)* + (0+1)*(01+10)
c) (0+1)*(01+10)
d) (01+10)(0+1)* + (0+1)*

172.

The above Finite Automata is equivalent to which Primitive Regular Expression

a) Λ
b) 
c) ɛ
d) ₵
173. According to the Arden’s Theorem the equation in R is R=Q+RP has a unique Solution given by
a) R=Q*P
b) Q=R*P
c) R=QP*
d) P=QP*
174. The unique solution R=QP* for the equation R=Q+RP is given by
a) Arden
b) Noam Chomsky
c) Ackerman
d) None of the above
175. We can apply the Arden’s theorem only when
a) FA doesn’t contain any Λ-move
b) The given Finite Automata contains only one start state
c) Both a and b
d) None of the above
176. Kleen Star of “ a “ can be written as
a) *a
b) a*
c) =a*
d) A=*
177. The tuples of a Grammar are
a) 4
b) 5
c) 3
d) 6
178. Regular grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
179. Unrestricted grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
180. Context Sensitive grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
181. Context Free grammar is known as
a) Type-0
b) Type-1
c) Type-2
d) Type-3
182. In Chomsky Hierarchy, the inner most layer contains______ grammar.

a) Type-0
b) Type-1
c) Type-2
d) Type-3
183. Example of NP-complete problem is______

a) SHORTEST PATH
b) UNARY KNAPSACK
c) EULER PATH
d) TRAVELING SALESMAN PROBLEM

184. If L is regular and L is a subset of Σ* then _______is also a regular set.


a) Σ*-L
b) L*-Σ
c) L*
d) None of the above

185. Proving that a language A is not regular using Pumping Lemma, the first condition is
a) XYiZ ϵ A
b) XYZi ϵ A
c) XiYZ ϵ A
d) XYiZ ϵ Σ

186. The node of a derivation tree is also known as


a) Leaf
b) Root
c) Child
d) Parent
187. In a derivation tree ,the concatenation of the labels of the leaves without repetition in the left to
right ordering is known as
a) Node
b) Parent
c) Yield
d) Root
188. In a Derivation tree ,if we apply a production only to the left most variable/non-terminal to every
step is known as
a) Left most Derivation
b) Right most Derivation
c) Both a and b
d) None of these
189. In a Derivation tree ,if we apply a production only to the Right most variable/non-terminal to every
step is known as
a) Left most Derivation
b) Right most Derivation
c) Both a and b
d) None of these
190. A CFG is called ______, if there exist more than one parse tree for some string W.
a) Left most Derivation
b) Right most Derivation
c) Ambiguous
d) None of these
191. For constructing Reduced grammar we have to eliminate _______
a) Useless symbols
b) Terminal Symbol
c) Non-Terminal Symbol
d) Generating Symbol
192. To eliminate useless symbols ,we have to eliminate__________
a) Non-generating Symbols
b) Non-reachable Symbols
c) a and b both
d) none of these
193. Non-terminal symbols which doesn’t derive any terminal string are called_______
a) Non-generating Symbols
b) Non-reachable Symbols
c) a and b both
d) none of these
194. Some symbols (Terminal and Non-Terminal ) doesn’t appear in any sequential form is known
as_____
a) Non-generating Symbols
b) Non-reachable Symbols
c) a and b both
d) none of these
195. Simpification of CFG contains which of the following
a) Construction of Reduced Grammar
b) Eliminating Null Production
c) Eliminating Unit Production
d) All of the above
196. Normal Form of ________type
a) 3
b) 2
c) 4
d) 1
197. A CFG is said to be in Chomsky Normal Form if each production in the grammar is of the form:
a) A→a, A→BC
b) A→B, A→BC
c) C→B, A→BA
d) A→BA,a→A
198. The rule for GNF is

a) Non Terminal → One terminal . Any no. of non terminal


b) Terminal → one terminal . Any no. of non terminal
c) Non Terminal → terminal . non terminal

d) Terminal → terminal . non terminal


199. GNF stands for
a) Greiback normal Form
b) General normal form
c) Generic normal form
d) Greiback negative form
200. CNF stands for
a) Context normal form
b) Chomsky normal form
c) Context negative form
d) Chomsky negative form
201. The stack in PDA is used for
a) Store result
b) Remember input
c) Store empty string
d) Non of these
202. Inserting string on to the stack is known as _________operation
a) Pop
b) Push
c) Insert
d) Enter
203. Removing a symbol from stack is called as __________operation
a) Pop
b) Push
c) Remove
d) Delete
204. The stack initially contains________
a) Δ
b) Σ
c) Ψ
d) ₵
205. PDA has ________tuples
a) 6
b) 5
c) 7
d) 4
206. The Turing machine consist of a tape having ________no. of cells.
a) Finite
b) Infinite
c) Both a and b
d) None of these
207. In the model of tiring machine the read/write head can move in _______direction
a) Right
b) Left
c) Right or left
d) One direction at a time
208. A turing machine has ________ memory which can remember long sequence of input.
a) Limited
b) External
c) Improved
d) Unlimited
209. The Instantaneous description of turing machine requires
a) The state of turing machine
b) The contents of the tape
c) The position of the tap head on the tape
d) All of the above
210) Semi infinite tape turing machine is infinite in
a) Right Direction
b) Left Direction
c) Both direction
d) none of these
211) If there is no algorithm that can takes as input an instance of the problem and determine
whether the answer to that instance is “yes” or “no”,such a problem is known as
a) Decidable
b) Undecidable
c) Generic Problem
d) Non of the above

212) Turing Machine is the machine format of———language


(a) Type 0
(b) Type 1
(c) Type 2
(d) Type 3

213) Which is not a part of the mechanical diagram of Turing Machine?


(a) Input tape
(b) Read-write head
(c) Finite Control
(d) Stack

214) Difference between Turing Machine and Two way FA is in


(a) Input Tape
(b) Read-write head
(c) Finite Control
(d) All of these

215) Difference between Turing Machine & Push down automata is in


(a) Input Tape
(b) Finite Control
(c) Stack
(d) All of these
216) which is not true for mechanical diagram of Turing Machine
a) The head moves in both directions.
b) The head reads as well as writes.
c) Input string is surrounded by infinite number of blank in both side.
d) Some symbols are pushed into the stack.

217) Consider three problems P1, P2 and P3. It is known that P1 has polynomial time solution
and P2 is NP-complete and P3 is in NP. Which one of the following is true.

a. P3 has polynomial time solution if P1 is polynomial time reducible to P3

b. P3 is NP complete if P3 is polynomial time reducible to P2

c. P3 is NP complete if P2 is reducible to P3

d. P3 has polynomial time complexity and P3 is reducible to P2

218) Let L and be a language and its complement. Which one of the following possibilities will not
hold?
a. L and are recursive
b. L is recursively enumerable but not recursive is not recursively enumerable
c. L and are not recursively enumerable
d. L and are recursively enumerable but not recursive
219) Consider S → SS|a.

What is the number of different derivation trees for aaaaa

a. 3

b. 5

c. 7

d. 14

220) Which of the following statements is false?

a. The halting problem for Turing machines is undecidable

b. determining whether a context-free grammar is ambiguous is un-decidable

c. given two arbitrary context-free grammar, G1 and G2, it is undecidable with L(G1) = L(G2)

d. given two regular grammars G1 and G2, it is undecidable whether L(G1) = L(G2)

221) Two of the following four regular expressions are equivalent. Which two?

i. (00)* (0 + ε)

ii. (00)*

iii. 0*

iv. 0(00)*

a. (i) and (ii)

b. (ii) and (iii)

c. (i) and (iii)

d. (iii) and (iv)


222) Which one of the following statement is FALSE?

a. context-free languages are closed under union

b. context-free languages are closed under concatenation

c. context-free languages are closed under intersection

d. context-free languages are closed under Kleene closure

223) Which of the following regular expression identity is true?

a. r(*) = r*

b. (r*s*)* = (r + s)*

c. (r + s)* = r* + s*

d. r*s* = r* + s*

224) Recursive languages are

a. a proper superset of CFL

b. always recognized by PDA

c. are also called type 0 languages

d. always recognized by FSA

225) Recursively enumerable languages are not closed under

a. union

b. homomorphism

c. complementation

d. concatenation

226) Consider the following statements

I. Recursive languages are closed under complementation


II. Recursively enumerable languages are closed under union

III. Recursively enumerable languages are closed under complementation

Which of the above statement are TRUE?

a. I only

b. I and II

c. I and III

d. II and III

227) Consider a language L for which there exists a Turing machine (TM), T, that accepts every word
in L and either rejects or loops for every word that is not in L. The language L is

a. NP hard

b. NP complete

c. recursive

d. recursively enumerable

228) Which of the following strings is not generated by the following grammar? S → SaSbS|ε

a. aabb

b. abab

c. aababb

d. aaabb

229) Which of the following is not primitive recursive but partially recursive?

a. McCarthy’s function

b. Riemann function

c. Ackermann’s function
d. Bounded function

230) A language L is accepted by a FSA iff it is

a. CFL

b. CSL

c. recursive

d. regular

You might also like