Model Question Paper
Subject Code: BC0052
Subject Name: Fundamentals of Theory of Computer Science
Credits: 4 Marks: 140
Part A (One mark questions)
1. A set which contains a single element is called a ……………..
A) Singleton
B) One set
C) Proper set
D) Improper set
2. The set of all subsets of A is called
A) Improper set of A
B) Proper set of A
C) Power set of A
D) Subset of A
Ans: C
3. The sequence 1, 4, 16, 64,………. can be explicitly be defined by the formula
A) f(n) = 4n
B) f(n) = 4n
C) f(n) = n4
D) f(n) = 4 + n
4. The value of 5! recursively is ……………..
A) 125
B) 130
C) 110
D) 120
5. n.......321
A) 2
)1( nn
B) 2
)1( nn
C) 3
)1( nn
D) 2
)1(2 nn
6. The value of 2222 ........321 n
A) 4
)12)(1( nnn
B) 6
)12)(1( nnn
C) 5
)12)(1( nnn
D) 5
)12)(1( nnn
7. If there are more than one edge associated with a given pair of vertices, then these edges are
called …………………
A) loop
B) Combined edges
C) lines
D) Parallel edges
8. Graphs containing either parallel edges or loops is referred as ……………..
A) Pendant graph
B) General Graph
C) infinite graph
D) finite graph
9. A ……………….. consists of a finite set of rules or productions which specify the syntax of
the language.
A) Tree
B) Automata
C) Roots
D) Grammar
10. The …………….. of a string is the number of symbols in the string.
A) Structure
B) Graph
C) length
D) finite graph
11. An automaton system in which the output depends only on the present input is called a
…………………….
A) Mealy machine
B) Moore machine
C) Dot machine
D) DF machine
12. The machine which has a finite number of states is called a ………………..
A) Finite automata
B) Finite control
C) Deterministic finite machine
D) finite graph
13. A string is a sequence of symbols obtained from ………………
A) £
B) ¥
C)
D)
14. Digital computers are …………………………
A) automata controlled
B) Finite controlled
C) Deterministic machines
D) finite graph structured
15. A DFA is a ------ tuple
A) 4
B) 5
C) 3
D) 2
16. A DFA is ………………..
A) easy to construct
B) difficult to construct
C) not constructable
D) only being imagined
17. …………………. are used to represent a set of strings and include symbols that are
arranged using certain syntax rules.
A) irregular expressions
B) normal expressions
C) regular expressions
D) abnormal expressions
18. The union of two regular expressions is a ………………….
A) irregular expression
B) regular expression
C) null set
D) matrix
19. If L1 and L2 are regular, then the regular language is closed under …………………
A) Multiplication
B) division
C) addition
D) complementation
20. Let and be the set of alphabets, then the function f: is called as………………
A) Isomorphism
B) endomorphism
C) homomorphism
D) epimorphism
21. The language for the grammar ),},{,}1,0{( SSVVG NT where the set of
productions : S11S, S0 is
A) L(G) = {0, 000, 11000, 1111110,……………..}
B) L(G) = {0, 110, 10000, 1111110,……………..}
C) L(G) = {0, 110, 11110, 1110000,……………..}
D) L(G) = {0, 110, 11110, 1111110,……………..}
22. A ……………….. is an ordered tree in which each vertex is labeled with the left sides of a
production and in which the children of a vertex represents its corresponding right sides.
A) complete tree
B) derivation tree
C) ordered tree
D) binary tree
23. ………….. of a relation R is the smallest transitive relation containing R.
A) transitive closure
B) reflexive closure
c) symmetric closure
D) equivalence closure
24. The value of e =
A) 3
B) 2
C) 1
D) 0
25. The ………………….. is the assymption that for some fixed but arbitrary n 0, P holds for
each natural number 0, 1, 2, …..,n
A) Hypothesis
B) Induction hypothesis
C) Alternate hypothesis
D) Principal hypothesis
26. A connected graph with n vertices and n – 1 edges is a ………………..
A) Forest
B) Branch
C) Tree
D) Leaf
27. If S = {a, b} then x = abab is a …………… on S
A) Alphabet
B) String
C) Letter
D) Grammar
28. The lexical analysis phase of a computer is often based on the ……………… of a finite
automaton.
A) Simulation
B) Artification
C) Simplification
D) Addition
29. At regular intervals the automaton reads one symbol from the ………………
A) Output tape
B) Input tape
C) Monitor
D) Initial tape
30. The …………… is called the finite control.
A) White box
B) Black box
C) Yellow box
D) Red box
31. All the edges of the transition graph are labeled as …………………
A) Input
B) Output
C) Input/Output
D) Input transition.
32. If Q is the set of states, then the number of set of subsets of Q is ……………
A) 3Q
B) 2Q
C) 4Q
D) 5Q
33. The start state of MN is the start state of ………………..
A) NM
B) MP
C) MQ
D) MD
34. In the output (q(t), x(t)), here q(t) is the ………………
A) present state
B) present input
C) Mealy state
D) Moore state
35. A ……………………….. can be accepted both by deterministic as well as nondeterministic
automata.
A) Irregular expression
B) Regular expression
C) Transit expression
D) Intransit expression
36. …………….. is a regular expression denoting empty language.
A)
B)
C)
D)
37. Let x, y , here x + y represents the set ………………
A) {x, y}
B) {x, y, z}
C) {y, z}
D) {x, z}
38. A set which is represented using a regular expression is known as a ………………
A) Irregular set
B) Regular set
C) Empty set
D) Finite set
39. If L1 and L2 are regular then L1 denotes
A) Language
B) Irregular language
C) Regular Language
D) Grammar
40. A =
A)
B) A
C) N
D)
Part B (Two mark questions)
41. State true(T) or false(F)
i. }/{ BxandAxxBA
ii. }/{ BxorAxxBA
A) (i) T (ii) T
B) (i) F (ii) F
C) (i) T (ii) F
D) (i) F (ii) T
42. State true(T) or false(F)
(i) AxorAxxA }/{
(ii) }/{ xandAxxA
A) (i) T (ii) T
B) (i) F (ii) F
C) (i) T (ii) F
D) (i) F (ii) T
43. The G.C.D of (81, 36) is ……………
A) 5
B) 9
C) 6
D) 4
44. The value of
3
1 1i i
i =
A) 23
12
B) 12
23
C) 23
10
D) 10
23
45. For any finite set A, the cardinality of the power set of A is
A) 2n
B) 2A
C) 2n(A)
D) 2
46. A binary tree is a tree in which no parent can have more than ……………. children.
A) 0
B) 1
C) 3
D) 2
47. State true(T) or false(F)
(i) The number of edges incident on a vertex v is called the degree of v.
(ii) The sum of the degrees of the vertices of a graph G is twice the number of vertices.
A) (i) T (ii) F
B) (i) F (ii) T
C) (i) T (ii) T
D) (i) F (ii) F
48. State true(T) or false(F)
(i) A vertex having no incident edge is called a vertex.
(ii) A vertex having degree one is called a pendant vertex.
A) (i) T (ii) F
B) (i) F (ii) T
C) (i) T (ii) T
D) (i) F (ii) F
49. State true(T) or false(F)
(i) A sentential form is any derivative of the unique non-terminal symbol S.
(ii) Language is a superset of all terminal strings over VT.
A) (i) T (ii) F
B) (i) F (ii) T
C) (i) T (ii) T
D) (i) F (ii) F
50. State true(T) or false(F)
(i) A grammar in which there are no restrictions on its productions is called a type-0 grammar.
(ii) A grammar that contains only productions of the form where is called a type-1
grammar.
A) (i) F (ii) T
B) (i) T (ii) F
C) (i) T (ii) T
D) (i) F (ii) F
51. State true(T) or false(F)
In a transition graph
(i) The final state, q1 is represented by two concentric circles.
(ii) The directed edges from the initial state to the final state are labeled as input/output.
A) (i) T (ii) F
B) (i) F (ii) T
C) (i) T (ii) T
D) (i) F (ii) F
52. State true(T) or false(F)
(i) qqq ),(̂),(
(ii) ),),(̂(),( awqwaq
A) (i) F (ii) T
B) (i) T (ii) F
C) (i) T (ii) T
D) (i) F (ii) F
53. State true(T) or false(F)
(i) qqq ),(̂),(
(ii) jAwaq ),(
A) (i) T (ii) F
B) (i) F (ii) T
C) (i) T (ii) T
D) (i) F (ii) F
54. State true(T) or false(F)
(i) When the input to a Moore machine is , the output is (q0).
(ii) In a Moore machine represents the output alphabet.
A) (i) F (ii) T
B) (i) T (ii) F
C) (i) T (ii) T
D) (i) F (ii) F
55. Consider the finite state automaton defined by the following table.
States a b c
q0
q1
q2
q1 q0 q2
q0 q3 q0
q3 q2 q0
q1 q0 q1
Then the states are
A) M = {q0, q1, q2, q3}
B) M = {0, 1, 2, 3}
C) M = {q0, q1, q2}
D) M = {1, 2, 3}
56. Considering the above table (q0, c) =
A) q1
B) q0
C) q3
D) q2
q3
57. State whether true(T) or false(F)
A regular expression is recursively defined as follows
(i) is a regular expression denoting an empty language.
(ii) a is a regular expression which indicates the language containing only
A) (i) T (ii) T
B) (i) T (ii) F
C) (i) F (ii) T
D) (i) F (ii) F
58. A grammar G=(VN, VT, S, ) is said to be a regular grammar the grammar is
A) right regular
B) left regular
C) A) and B)
D) A) or B)
59. State whether true(T) or false(F)
(i) If L1 and L2 are regular, then the regular language is not closed under difference
(ii) If L is regular and f is homomorphism, then homomorphic image f(L) is regular
A) (i) T (ii) T
B) (i) T (ii) F
C) (i) F (ii) T
D) (i) F (ii) F
60. State true(T) OR false(F)
(i) L = {anblcn+l/ n, l 0} is regular.
(ii) L = {0n/n is prime} is not regular.
A) (i) T (ii) T
B) (i) F (ii) F
C) (i) T (ii) F
D) (i) F (ii) T
Part C (Four mark questions)
61. The language L(G) generated by the grammar G = {VT = {x, y, z}, VN = {S, A}, S, } where
:SxS, SyA, AyA, AZ is
A) L(G) = {XnYmZ/ n0, m1}
B) L(G) = {XnYmZ/ n0, m1}
C) L(G) = {XnYm/ n0, m1}
D) L(G) = {XYnZm/n0,m1}
62. The language L(G), generated by the grammar
G=(VT={a, b}, VN= {S},S,) where :SaaS, Sa, Sb is
A) L(G) = {a2/n0} {a2nb/n0}
B) L(G) = {a2n/n0} {a2nb/n0}
C) L(G) = {a2n+1/n0} {a2nb/n0}
D) L(G) = {a2n+1/n0} {a2nb/n0}
63. If A = {1, 2, 3} and }/),{( yxyxR then MR =
A)
000
100
001
B)
000
110
001
C)
100
100
001
D)
000
100
110
64. The concatenation of 1110 and 0111 is ………………….
A) 11100111
B) 11000111
C) 10000011
D) 11111001
65. A tree G with n vertices has …………….. edges.
A) 2n + 1
B) 2n – 1
C) n – 1
D) n + 1
66. State true(T) or false(F)
(i) A connected graph without circuits is called a tree.
(ii) A graph is connected if it has exactly one component.
(iii) A tree with n vertices has n + 1 edges.
(iv) In a binary tree the number of pendant vertices is 2
n
A) (i) T (ii) F (iii) T (iv) F
B) (i) F (ii) T (iii) F (iv) T
C) (i) T (ii) T (iii) F (iv) F
D) (i) F (ii) F (iii) T (iv) T
67. The language generated by 1/)( ncbaGL nnnby the following grammar
G = ({S,B,C}, {a, b, c}, S, ) where consists of productions,
S asBC
S aBC
CB BC
aB ab
bB bb
bC bc
cC cc
A) aabbcc
B) abbbcc
C) aaaacc
D) bbbcaa
68. State whether true(T) or false(F)
(i) State relation helps to determine the next state that the automaton system is going to attain.
(ii) The symbol O is used for output alphabet.
(iii) In an automaton system states are represented by triangles
(iv) Transition system are also known as transition blocks
A) (i) T (ii)T (iii)T (iv) T
B) (i) T (ii) F (iii) T (iv) F
C) (i) T (ii) T (iii) F (iv) F
D) (i) T (ii) T (iii) T (iv) F
69. State whether true(T) or false(F)
In a Moore machine with a 6-tuple (Q, , , , , q0)
(i) Q is non-empty, finite set of states.
(ii) is non-empty, finite set of input alphabets.
(iii) is transition function
(iv) is the input function
A) (i) T (ii)T (iii)T (iv) T
B) (i) T (ii) F (iii) T (iv) F
C) (i) T (ii) T (iii) F (iv) F
D) (i) T (ii) T (iii) T (iv) F
70. Drawing the state diagram for the finite automation FqQM ,,,, 0 where
= {a, b}, 210 q,q,qQ , F = {q0, q1}, QIxQ: defined by
Verify whether or not the string “aaab” is acceptable by M.
A) not accepted by M
B) accepted by M
C) cannot say
D) either A) or B)
71. State whether true(T) or false(F)
(i) Set of strings of a’s and b’s of any length including the NULL string is (a + b)
(ii) Set of strings of a’s and b’s ending with the string abb is (a+b)abb.
(iii) Set of strings of a’s and b’s starting with the string ab is ab(a+b)
a b
q0 q
0 q1
q1 q0 q2
q2 q2 q2
(iv) Set of strings of a’s and b’s having a substring aa is (a+b)aa
A) (i) T (ii) T (iii) F (iv) F
B) (i) T (ii) T (iii) T (iv) F
C) (i) F (ii) T (iii) F (iv) T
D) (i) F (ii) F (iii) T (iv) T
72. State whether true(T) or false(F)
Some of the non-regular languages are
(i) {w{0, 1} / w contains an equal number of 0’s and 1’s}
(ii) {0n1n{0, 1} / n0}
(iii) {ap{a}/ p 2 is a composite number}
(iv) The principle used in pumping lemma is similar to the Pigeonhole principle.
A) (i) T (ii) F (iii) F (iv) T
B) (i) T (ii) T (iii) T (iv) F
C) (i) F (ii) T (iii) F (iv) T
D) (i) F (ii) F (iii) T (iv) T
73. State true(T) or false(F)
In a context-free-grammar
(i) Every nonterminal symbol is enclosed in angle brackets.
(ii) The terminal symbols are written without any special making.
(iii) The symbol :: is used instead of and should be read as “is defined as”.
(iv) BNK form is a context free grammar
A) (i) T (ii) T (iii) T (iv) T
B) (i) T (ii) T (iii) T (iv) F
C) (i) F (ii) T (iii) T (iv) T
D) (i) T (ii) F (iii) T (iv) T
74. Let R be the relation from the set A = {1, 3, 4} on itself, if R is defined by
R = {(1,1), (1, 3), (3,3), (4,4)} then the relation matrix for R is
A)
100
010
011
RM
B)
000
010
011
RM
C)
100
011
011
RM
D)
100
010
111
RM
75. If 01
1
1 ....)( axaxaxaxf nn
nn
where nn aaaa ,........,,, 110 are real numbers
then f(x) is
A) O(xn–1)
B) O(xn–2)
C) O(xn)
D) O(xn–3)
Answer Keys
Part - A Part - B Part - C
Q. No. Ans. Key Q. No. Ans. Key Q. No. Ans. Key Q. No. Ans. Key
1 A 21 D 41 C 61 A
2 C 22 B 42 A 62 D
3 B 23 A 43 B 63 D
4 D 24 A 44 B 64 A
5 A 25 B 45 C 65 C
6 B 26 C 46 D 66 C
7 D 27 B 47 C 67 A
8 B 28 A 48 B 68 C
9 D 29 B 49 A 69 D
10 C 30 B 50 B 70 A
11 B 31 C 51 C 71 B
12 C 32 B 52 C 72 A
13 C 33 D 53 C 73 B
14 C 34 A 54 A 74 A
15 B 35 B 55 A 75 C
16 B 36 C 56 D
17 C 37 A 57 A
18 B 38 B 58 D
19 D 39 C 59 C
20 C 40 B 60 C