Sie sind auf Seite 1von 21

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) = 4
n

C) f(n) = n
4

D) f(n) = 4 + n




4. The value of 5! recursively is ..
A) 125
B) 130
C) 110
D) 120

5. = + + + + n ....... 3 2 1
A)
2
) 1 ( + n n

B)
2
) 1 ( n n

C)
3
) 1 ( n n

D)
2
) 1 (
2
n n


6. The value of = + + + +
2 2 2 2
........ 3 2 1 n
A)
4
) 1 2 ) ( 1 ( + + n n n

B)
6
) 1 2 ) ( 1 ( + + n n n

C)
5
) 1 2 ) ( 1 ( + + n n n

D)
5
) 1 2 ) ( 1 ( + n n n


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) o

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 I be the set of alphabets, then the function f: I
-
is called as
A) Isomorphism
B) endomorphism
C) homomorphism
D) epimorphism

21. The language for the grammar ) , } , { , } 1 , 0 { ( S S V V G
N T
u = = = where the set of
productions u: 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) 3
Q

B) 2
Q

C) 4
Q

D) 5
Q


33. The start state of MN is the start state of ..


A) N
M

B) M
P

C) M
Q

D) M
D


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) e
B)
C) |
D) u

37. Let x, y e , 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 L
1
and L
2
are regular then L
1
-
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. } / { B x and A x x B A e e =
ii. } / { B x or A x x B A e e =
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) A x or A x x A = e e = } / { | |
(ii) | | | = e e = } / { x and A x x A
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
1
i
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) 2
n

B) 2
A

C) 2
n(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 o| where | o > 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, q
1
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) q q q = . = . ) , (

) , ( o o
(ii) ) , ) , (

( ) , ( a w q wa q o o o =
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) q q q = . = . ) , (

) , ( o o
(ii)
j
A wa q = ) , ( o
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 v, the output is (q
0
).
(ii) In a Moore machine A 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.

E
States a b c
q
0
q
1
q
2


q
1
q
0
q
2
q
0
q
3
q
0
q
3
q
2
q
0
q
1
q
0
q
1

Then the states are
A) M = {q
0
, q
1
, q
2
, q
3
}
B) M = {0, 1, 2, 3}
C) M = {q
0
, q
1
, q
2
}
D) M = {1, 2, 3}

56. Considering the above table o(q
0
, c) =
A) q
1

B) q
0

C) q
3

D) q
2


q
3


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=(V
N
, V
T
, S, u) 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 L
1
and L
2
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 = {a
n
b
l
c
n+l
/ n, l >0} is regular.
(ii) L = {0
n
/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 = {V
T
= {x, y, z}, V
N
= {S, A}, S, u} where
u:SxS, SyA, AyA, AZ is
A) L(G) = {X
n
Y
m
Z/ n>0, m>1}
B) L(G) = {X
n
Y
m
Z/ ns0, ms1}
C) L(G) = {X
n
Y
m
/ n>0, m>1}
D) L(G) = {XY
n
Z
m
/n>0,m>1}

62. The language L(G), generated by the grammar
G=(V
T
={a, b}, V
N
= {S},S,u) where u:SaaS, Sa, Sb is
A) L(G) = {a
2
/ns0} {a
2n
b/n>0}
B) L(G) = {a
2n
/ns0} {a
2n
b/n>0}
C) L(G) = {a
2n+1
/ns0} {a
2n
b/ns0}
D) L(G) = {a
2n+1
/n>0} {a
2n
b/n>0}
63. If A = {1, 2, 3} and } / ) , { ( y x y x R < = then M
R
=
A)
(
(
(

0 0 0
1 0 0
0 0 1



B)
(
(
(

0 0 0
1 1 0
0 0 1

C)
(
(
(

1 0 0
1 0 0
0 0 1

D)
(
(
(

0 0 0
1 0 0
1 1 0


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 / ) ( > = n c b a G L
n n n
by the following grammar
G = ({S,B,C}, {a, b, c}, S, u) where u 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, , A, o, , q
0
)
(i) Q is non-empty, finite set of states.
(ii) is non-empty, finite set of input alphabets.
(iii) o 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 ( ) F q Q M , , , ,
0
o E = where
E = {a, b}, { }
2 1 0
q , q , q Q= , F = {q
0
, q
1
}, Q I x Q : o 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 as and bs of any length including the NULL string is (a + b)
-

(ii) Set of strings of as and bs ending with the string abb is (a+b)
-
abb.
(iii) Set of strings of as and bs starting with the string ab is ab(a+b)
-

o a b
q
0

q
0
q
1

q
1
q
0
q
2

q
2
q
2
q
2



(iv) Set of strings of as and bs 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) {we{0, 1} / w contains an equal number of 0s and 1s}
(ii) {0
n
1
n
e{0, 1}
-
/ ns0}
(iii) {a
p
e{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)
(
(
(

=
1 0 0
0 1 0
0 1 1
R
M
B)
(
(
(

=
0 0 0
0 1 0
0 1 1
R
M
C)
(
(
(

=
1 0 0
0 1 1
0 1 1
R
M
D)
(
(
(

=
1 0 0
0 1 0
1 1 1
R
M

75. If
0 1
1
1
.... ) ( a x a x a x a x f
n
n
n
n
+ + + + =

where
n n
a a a a , ........, , ,
1 1 0
are real numbers
then f(x) is
A) O(x
n1
)
B) O(x
n2
)
C) O(x
n
)
D) O(x
n3
)





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

Das könnte Ihnen auch gefallen