You are on page 1of 18

Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.

com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 1 of 18
Q.1 - Q.30 Carry One Mark Each

1. Given
( )
( ) ( )
( )
3 1 1
, and ,
4 3 3
P B P A B C P A B C P B C = = = =
(A)
1
12
(B)
1
9
(C)
1
15
(D)
1
18


2. If matrix A is of order 34 and matrix B is 4 5. The number of multiplication
operations and addition operations needed to calculate the matrix product AB
(A) 240, 60 (B) 60, 45 (C) 60, 60 (D) 240, 32

3. The maximum value of the rank of a 4 5 matrix is
(A) 4 (B) 5 (C) 9 (D) None

4. The distribution in which mode, median and mean are equal is called.
(A) binomial (B) possion (C) normal (D) None

5. As soon as a new value of a variable is found by iteration, it is used immediately
in
(A) gauss-seidal method (B) gauss-jordan method
(C) relaxation method (D) jacobis method

6. =
(A) (B) + (C) - (D) none

7. If u= x
2
+ y
2
then
2
u / x y=
(A) 0 (B) 1 (C)
2 2
x y + (D) None

8. The Maximum Directional Derivative of
3 2
x y z + at the point (-1,1,1)
(A) 14 (B) 3.74 (C) 1 (D) None

9. The extreme value of
1
X
x is:
(A) e (B)
1
e
e (C) 1 (D) 0

10. Maximum number of edges in a n-node undirected simple graph without cycles is
(A) n - 1 (B)
( ) 1
2
n n +
(C)
( ) 1
2
n n
(D) n

Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 2 of 18
11. If the following degree vertex, (5, 3, 2, 4, 3), cant form a simple graph then
which of the following degree vertex should be added to make it form a simple
graph?
(A) 1 (B) 5
(C) 2 (D) None of the above

12. How many edges are possible in a forest with n vertices and k trees ?
(A) n - k + 1 (B) n - k - 1
(C) n - k (D) Insufficient data

13. Given the following input, (131, 121, 110, 100, 90, 23, 11, 5) which of the
following hash functions would be considered the best
i) x mod 10
ii) x mod 11
iii) x mod 13
(A) (i) only (B) (ii) only
(C) (iii) only (D) both (ii) and (iii)

14. Which of the following statements is/are true?
i) Spanning tree will always have |V| - 1 edge
ii) Adding an edge to the spanning tree always creates a cycle
iii) The intermediate graphs obtained from both prims and Kruskals algorithms
in finding minimum cost spanning tree are always trees
(A) All of the above (B) only (i)
(C) only (ii) (D) both (i) and (ii)

15. Which of the following statement is not correct?
(A) The complement of a recursive language is recursive
(B) The union of two recursive languages is recursive
(C) If a language L and its complement L1 are both recursively enumerable,
then L is recursive
(D) The union of two recursively enumerable languages is not recursively
enumerable

16. What is printed for the following c program
int main( )
{
char *s = "abcd;
char p[] = "abcd;
p[2] = s[2] = `e;
printf("%s, %s, s, p);
}
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 3 of 18
(A) aecd, aecd (B) abed, abed
(C) result is undefined for s and for p it prints abed
(D) result is undefined for p and for s it prints abed

17. What does the following function do if s and t are two non empty strings
terminated with null character?
Void f (char *s, char *t)
{
while ( (*s)++ = (*t)++);
}
(A) copies string t into s
(B) copies string t into s after incrementing each character of t by 1
(C) copies string t into s before incrementing each character of t by 1
(D) compile time error

18. Which of the following requires a device driver ?
(A) Register (B) RAM (C) Keyboard (D) CPU

19. Which of the following is not a valid deadlock prevention scheme?
(A) Release all resources before requesting a new resource
(B) Number the resources uniquely and never request a lower numbered
resource than the last one requested
(C) Never request a resource after releasing a resource
(D) Request and all required resources must be allocated before execution.

20. The Boolean function


1 1 1 1 1 1 1 1
x y z xy z x yz xyz + + + is equivalent to
(A)
1
x y (B)
1
xy

(C)
1
z

(D)
1
y


21. The simultaneous equations on Boolean variables x, y, z and w

1 1
1, 0, 1, 0 x y z xy xz w xy z w + + = = + = + =
The solutions for x, y, z and w respectively
(A) 0100 (B) 1101 (C) 1011 (D) 1000

22. How many integral solutions are there to
1 2 3 4 5
20 x x x x x + + + + = where each
2?
i
x
(A) C(14, 10) (B) C(12, 10) (C) C(13, 10) (D) C(11, 10)



Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 4 of 18
23. The performance of a pipelined processor suffers if
(A) The pipeline stages have different delays
(B) Consecutive instructions are dependent on each other
(C) The pipeline stages share hardware resources
(D) All of the above

24. How many 8-bit characters can be transmitted per second over a 8800 baud
serial communication link using asynchronous mode of transmission with one
start bit, 8 data bits and two stop bits ?
(A) 1100 (B) 800 (C) 880 (D) 3000

25. Microprogramming is the design of
(A) CPU (B) ALU (C) ROM (D) control unit

26. Internet address can be used to refer to networks as well as individual hosts. By
convention, the network address has host id with all bits
(A) 0 (B) 1
(C) combination of 0s and 1s (D) depends on the network class

27. How many hosts can successfully send data simultaneously on Ethernet?
(A) 1 (B) 2 (C) 3 (D) unlimited

28. Which of the following statement is true?
(A) The packet addressing should be taken care by data link layer
(B) Two different IP packets destined to router B and originating from router A
may take two different routes in reaching B
(C) Every subnet address should be registered at NIC
(D) Both UDP and TCP are connectionless protocols

29. Let S and T be languages over { } , a b

represented by the regular expressions


( ) ( ) ( )
* *
* *
and a b a b + + , which of the following is true?
(A) S T (B) T S (C) S = T (D) S T =

30. Assume that all the following numbers are in 2s complement form.
X = 11110101
Y = 00001000
Z = 11111110
What is result of
( ) XY
Z
?
(A) 11010100 (B) 00101100 (C) 00011100 (D) 11011000
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 5 of 18

Q.31 - Q.80 Carry Two Marks each

31. The Fourier Sine Transform of e
-ax
/x
(A) tan
-1
(s/(a)) (B) tan
-1
(s(a)) (C) sin
-1
(s/(a)) (D) sin
-1
(s(a))

32. A six faced fair die is thrown until 1 comes , then the probability that 1 comes in
the even number of trails is:
(A)
5
11
(B)
5
6
(C)
6
11
(D)
1
6


33. The function ( )
2
250
5 f y x
x
= + = attains:
(A) maximum (B) minimum (C) neither (D) either

34. Evaluate
6
2
0
1
dx
x +

by Simpsons
3
th
8
rule.
(A) 1.3662 (B) 1.3571 (C) 1.4056 (D) None

35. If
3 1
1 1
2 2
,
0 1
1 3
2 2
P A




= =







2005
and , then X is equal to:
T T
Q PAP X P Q P = =
(A)
1 2005
0 1



(B)
4 2005 3 6015
2005 4 2005 3

+




(C)
2 3 1 1
4
1 2 3

+



(D)
2005 2 3 1
4
2 3 2005


+



36. In a lottery , 2 tickets are drawn at a time out of 6 tickets numbered from 1 to 6.
The expected value of the sum of the numbers on the tickets drawn is
(A) 7 (B) 6 (C) 5 (D) 4

37. If A is the Area Bounded by the lines x=0, x=1, y=0, y=2. Then xydA

is:
(A) 2 (B)
1
2
(C) 1 (D) 4



Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 6 of 18
38. How many simple distinct unlabelled graphs are possible with 5 vertices and 2
edges?
(A) 1 (B) 2 (C) 10 (D) 8

39. In which order the following numbers, 10, 3, 2, 4, 6, 7, 5, 1, should be inserted
in an empty binary search tree to get a search tree of height 5?
(A) 1, 2, 3, 6, 5, 7, 10, 4 (B) 1, 2, 3, 5, 10, 6, 7, 4
(C) 1, 2, 3, 4, 6, 7, 10, 5 (D) 1, 2, 3, 10, 4, 7, 6, 5

40. In which order the following numbers, 7, 5, 1, 8, 3, and 2, should be inserted
into an empty binary search tree to get in order and preorder traversal
sequences as same.
(A) 3, 2, 1, 8, 7, 5 (B) 8, 7, 5, 3, 2, 1
(C) 1, 2, 3, 5, 7, 8 (D) 3, 2, 8, 7, 5, 1

41. If an edge with weight 5 is to be inserted in the following simple graph to get 2
minimal spanning trees then where should it be inserted?







(A) df (B) de (C) ce
(D) Not possible to get two minimal spanning trees

42. If n numbers are inserted into a binary search tree then which of the following
traversal outputs the numbers in sorted order?
(A) preorder (B) in order (C) post order (D) breadth-first

43. If a queue is implemented using an array then what are the worst case time
complexities of both enqueue and dequeue operations
(A) O(1), O(n) (B) O(n), O(1) (C) O(1), O(1) (D) O(n), O(n)

44. The minimum number of colours required to color the following graph is:





(A) 1 (B) 2 (C) 3 (D) 4
a
b
f
9
e
c
d
8
2
12
4
3
7
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 7 of 18

45. If the following elements, 5, 3, 4, 2, 6, 7, and 1, are inserted into a heap then
what is printed for an in order traversal of the heap
(A) 2, 5, 3, 7, 4, 6, 1 (B) 3, 5, 2, 7, 4, 6, 1
(C) 4, 6, 3, 7, 2, 5, 1 (D) 4, 6, 3, 7, 1, 5, 2

46. If we run Dijkstras single source shortest path algorithm on the following edge-
weighted directed graph with vertex 5 as the source








In what order do the nodes get included into the set of vertices for which the
shortest path distances are finalized.
(A) 5, 6, 7, 4, 8, 3, 1, 2 (B) 5, 6, 7, 4, 8, 3, 2, 1
(C) 5, 6, 7, 4, 8, 2, 3, 1 (D) 5, 6, 7, 4, 8, 2, 1, 3

47. What does the following c function implement?
int f(int number)
{
int value = 0;
for (value = 0; (number &= (number - 1)); value++)
;
return value;
}
(A) counts the number of 0s in number
(B) counts the number of 1s in number
(C) complements the 0s and 1s in number
(D) None of the above

48. Consider the following C program
struct cellNode {
struct cellNode *leftChild;
int element;
struct cellNode *rightChild;
};

5
4
6
7
3
2
1
8
10
3
17
15
14 2
10
8
10
9
10
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 8 of 18
int value = 0;
void DoSomething (struct cellNode *ptr)
{
if ( (ptr->leftChild == NULL) && (ptr->rightChild == NULL))
value++;
else {
if (ptr->leftChild)
DoSomething(ptr->leftChild);
if (ptr->rightChild)
DoSomething(ptr->rightChil(D);
}
}
What does "value contain at the end of all calls when a pointer to the root of a
non-empty tree is passed as an argument
(A) The number of nodes in the tree
(B) The number of leaf nodes in the tree
(C) The number of internal nodes in the tree
(D) The height of the tree

49. What does the following function do?
void DoSomething (struct cellNode *ptr)
{
struct cellNode *tmpptr;
if (ptr) {
tmpptr = ptr->leftChild;
ptr->leftChild = ptr->rightChild;
ptr->rightChild = tmpptr;
if (ptr->leftChild)
DoSomething(ptr->leftChild);
if (ptr->rightChild)
DoSomething(ptr->rightChild);
}
(A) swaps the left and right children of every node
(B) swaps only the left and right children of intermediate nodes
(C) swaps only the left and right children of leaf nodes
(D) None of the above




Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 9 of 18
50. Consider the following C program ?
int f (int n)
{
if (n <= 1) return 1;
n = (n - 1)
2
- 2 - n
2
+ 3 * n;
f(n);
printf("%d , n);
}
What is the output, if the initial call is f(6)
(A) 5 5 5 5 5 (B) 1 1 1 1 1 (C) 5 4 3 2 1 (D) 1 2 3 4 5

51. What is printed for the following c program
void f(char *a)
{
a = (char *) malloc ( 10 * sizeof(char));
strcpy(a, "GATE2006);
}
int main()
{
char *str = "GATE;
f(str);
printf("%s, str);
}
(A) GATE (B) GATE2006
(C) Segmentation fault (D) None of the above

52. What is printed for the following C program
int f (int n)
{
if (n == 0 || n == 1) return 1;
else return f(n - 1);
}
int main()
{
int i;
i = f(8);
printf("%d, i);
}
(A) 8 (B) 1 (C) 36 (D) 40

Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 10 of 18
53. What is the time complexity of the above function f?
(A) O(1) (B) O(log n) (C) O(n) (D) O(2
n
)

54. How many states are possible in the smallest finite automata that accepts the
following language?
L = {x | x is a binary string with number of 0s divisible by 2 and number 1s
divisible by 3 }
(A) 6 (B) 5 (C) 3 (D) 2

55. If the following Automata has to accept the following language then which states
should be marked as final?
L = {w | w {a, b}
*
, w has an odd number of as and even number of bs or w
has an odd number of bs and even number of as}









(A)
1 3
& S S (B)
2 4
& S S (C)
1 2
& S S (D)
2 3
& S S

56. Let L denote the language generated by the grammar S 00T, T 11S | 11. If S
is the start symbol then which of the following is true?
(A) L = (0 + 1)
*
(B) L is regular but not (0 + 1)
*

(C) L is context free but not regular (D) L is not context free

57. Which of the following grammars violate Chomsky Normal Form
(i) S AB, A a, B | b
(ii) S AcB, A a, B b
(iii) S AB, A a, B b
(A) All of the above (B) (i) only
(C) (i) & (ii) only (D) (ii) & (iii) only

58. What is the equivalent CFL for the following 0 1 0 0 1 1 CFG S S S
(A) { x x is a palindrome (string reading same forward as backward)}
(B) { x x = 0 1
n n
for n 0}
S2
S4 S3
S1
a a
b
b
a a
b
b
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 11 of 18
(C) { x x has equal number of 0s and 1s }
(D) { x x = 1 0
n n
for n 0}

59. Which language does the following PDA accept?
M = ({q0, q1}, {0, 1}, {Z0, X}, , q0, Z0, } and is given by
(q0, 1, Z0) = {(q0, XZ0)}, (q0, 1, X} = {(q0, XX)},
(q0, 0, X) = {(q1, X)}, (q0, , Z0) = {(q0, )},
(q1, 1, X) = {(q1, )}, (q1, 0, Z0) = {(q0, Z0)}
(A) L = {1 01 0,
n n
where n 1} (B) L = {1 01 0,
n n
, where n 0}
(C) L = {1 01 ,
n n
, where n 1} (D) L = {1 01 ,
n n
, where n 0}

60. A Unix style I-node has 8 direct pointers, one double and one triple indirect
pointers. Disk block size is 1KB, disk block address is 32 bits. What is the
maximum possible file size?
(A)
24
2

bytes (B)
32
2

bytes (C)
34
2

bytes (D)
48
2

bytes

61. What is the average waiting time for the following jobs if preemptive SJF
scheduling algorithm is used?

Job Arrival Time Burst Time
J1 0 3
J2 1 3
J3 2 1
J4 3 2

(A) 2 (B) 1.75 (C) 1.5 (D) 2.25

62. Consider a machine with 128MB physical memory and a 32-bit virtual address
space. If the page size is 2KB, what is the approximate size of the page table?
(A) 2MB (B) 4MB (C) 8MB (D) 16MB

63. The main memory size is assumed to be 4KB and the page size is 1KB. If LFU
(Least Frequently Used) algorithm is used for page replacement then what pages
should reside in main memory the end for the following sequence of page
references ?
4, 8, 2, 3, 2, 8, 3, 1, 2, 6, 7
(A) 7, 8, 2, 3 (B) 2, 4, 7, 8 (C) 1, 2, 6, 7 (D) 1, 2, 3, 8


Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 12 of 18


64. If an SR latch is made the following way








What is the value of Q and Qfor R =1 and S = 0?
(A) Q = Q = 1 (B) Q = 0, Q = 1
(C) Q = 1, Q = 0 (D) Indeterminate states

65. A circuit takes a number in the form of 4 bits. If the sum of bits is 3 then the
circuit outputs a 1. Otherwise it outputs a 0. If n-input AND gates, n-input OR
gates and 1-input NOT gates are provided, what is the maximum number of
gates required to implement the circuit?
(A) 3 (B) 4 (C) 5 (D) 6

66. Consider a multiplexer with X and Y as data inputs and Z as control input. Z = 0
selects input X and Z = 1 selects input Y. What are the connections required to
realize the 2-variable Boolean function f = TR without using any additional H/W.
(A) connect R to X, 1 to Y, and T to Z
(B) connect R to X, 0 to Y, and T to Z
(C) connect 0 to X, R to Y, and T to Z
(D) connect 1 to X, R to Y, and T to Z

67. In the following circuit the initial value of X is 1 and P is 0 when the circuit is
initialized. A 0 on TRST resets the flip-flop. What logic values should be applied to
get a `0 on X?









(A) D = 0, P = 0 (B) TRST = 0, P = 0
Q
Q
S
Clock Pulse
R
P
D
D
CP
TRST
X
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 13 of 18
CP
A4
A3
A2
A1
K
K K K
J Q
J
Q J
Q
J
Q
J
(C) D = 1, P = 0 (D) None of the above

68. What is the minimum sum of product expression for ( ) , , , f w x y z shown in the
following Karnaugh-map?









(A) zx z x + (B) zx z x + (C) yx zx +

(D)
yx zx +


69. Consider the following logic circuits whose inputs are functions
1 2 3
, , f f f and output
f is:




Given that ( ) ( ) ( ) ( ) ( ) ( )
1 2 3
, , 0,1,3,5 , , , 6,7 and , , 1, 4,5 f x y z f x y z f x y z = = =


What is ( ) , , f x y z ?
(A) ( ) 4

(B) ( ) 4,5

(C) ( ) 1, 4,5

(D) ( ) 6,7



70. If the initial values of
4 3 2 1
0111, A A A A = what are the outputs of
4 3 2 1
A A A A after CP
is triggered and the inputs (J, K) of all flip flops are tied to 1?









(A) 1000 (B) 0100 (C) 0111 (D) 0110


1

0

1
1
0
0
00 01 11 10
00
01
11
10
yz
wx
1
0 1
0 0 1

0
( )
1
, , f x y z
( )
2
, , f x y z
( )
3
, , f x y z
( ) , , f x y z
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 14 of 18

71. The following prepositional statement is
( ) ( ) ( ) p r q r p q r


(A) tautology (B) contradiction
(C) neither tautology nor contradiction (D) not decidable

72. Identify the correct translation into logical notation of the following assertion
Every connected and bipartite graph is not planar
(A) x [~connected(x) ~bipartite(x) ~planar(x)]
(B) x [~connected(x) ~bipartite(x) ~planar(x)]
(C) x [~connected(x) ~bipartite(x) ~planar(x)]
(D) x [~connected(x) ~bipartite(x) ~planar(x)]

73. Consider the following binary relation
S = { (x, y) | y = x + 1 and x, y {0, 1, 2, .}}
The symmetric closure of S is
(A) {(x, y) | x = y + 1 and x, y {0, 1, 2, .}}
(B) {(x, y) | y = x + 1 and x, y {0, 1, 2, .}}
(C) {(x, y) | y = x 1 and x, y {0, 1, 2, .}}
(D) None of the above

74. Which of the following statements is not true ?
(A) If z is the set of integers and is the usual ordering on z, then [z; ] is
partially ordered and totally ordered
(B) If z is the set of integers and is the usual ordering on z, then [z; ] is
partially ordered but not totally ordered
(C) U be an arbitrary set and A = P(U) be the collection of all subsets of U. Then
[P(U); ] is a poset
(D) If U contains more than one element then it is not totally ordered

75. What does the following recurrence relation evaluates to?

1 0
3 where 1
n
n n
a a a

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

(B)
( )
1
3 1
2
n+

(C)
( )
2
3 1
2
n+

(D)
( )
1
3 1
2
n



76. There are 10 telegrams and 2 messenger boys. In how many different ways can
the telegrams be distributed to messenger boys and then delivered to 10
different people if the telegrams are distinguishable ?
(A)
10
2 .10 (B) ( )
10
2 . 10! (C)
10 10
2 .2

(D)
10
2
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 15 of 18


77. Consider the following relation schema pertaining to suppliers-parts database.
S(S#, SNAME), P(P#, COLOR) and SP denotes the product of S and P. What does
the following SQL query produces?
SELECT DISTINCT S.NAME
FROM S
WHERE S.S# IN
(SELECT SP.S#
FROM SP
WHERE SP.P# IN
(SELECT P.P#
FROM P
WHERE P.COLOR = `RED));
(A) Get supplier names for suppliers who supply only RED parts
(B) Get supplier names for suppliers who supply at least one red part
(C) Get supplier names for suppliers who do not supply red parts
(D) None of the above

78. A relation R is defined as R(S#, STATUS, CITY, SNAME) where S# is the primary
key. If R decomposed into two relations
1 2
and R R , which of the following is not a
lose less decomposition
(A)
1
R (S#, STATUS),
2
R (S#, CITY, SNAME)
(B)
1
R (S#, STATUS),
2
R (STATUS, CITY, SNAME)
(C)
1
R (S#, STATUS, CITY),
2
R (CITY, SNAME)
(D)
1
R (S#, STATUS, SNAME),
2
R (CITY, STATUS)

79. R is a relation with attributes A, B, C, D and the following FDs:
A BC, B C, A B, AB C, AC D
What is the equivalent irreducible set of FDs for the above set:
(A) A B, B C, A D (B) A B, B C, A C
(C) A B, A C, A D (D) A B, B C, C D

80. A relation NADDR is defined with attributes NAME (unique), STREET, CITY, STATE
and ZIP. For any given ZIP, there is just one CITY and STATE. Also, for any given
STREET, CITY and STATE, there is just one ZIP. What is the highest normal form
satisfied by above decomposition?
(A) 1NF (B) 2NF (C) 3NF (D) BCNF


Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 16 of 18



Linked Answer Questions: Q.81a to Q.85b Carry Two Marks Each

Linked Answer Questions 81a & 81b:

81. Let us say that a queue is implemented using stacks.
[a] What are the minimum number of stacks needed to represent it
(A) 1 (B) 2 (C) 3 (D) 4

[b] For the above representation what are the time complexities of enqueue and
dequeue operations.
(A) O(1), O(n) (B) O(n), O(n)
(C) O(1), O(1) (D) None of the above

Linked Answer Questions 82a & 82b:

82. Suppose we want to synchronize two concurrent processes P and Q using binary
semaphores S, T and U.

Process P: Process Q:
P(S) W:
P(T) X:
P(U) Y:
Print `a; print `a;
Print `b; print `b;
V(S) A:
V(T) B:
V(U) C:

[a] What statements should be written at W if no deadlock should occur?
(A) P(T) (B) P(U) (C) P(S)
(D) Not possible to avoid deadlock

[b] What should be written at X and Y for the above problem?
(A) P(S), P(T) (B) P(T), P(U) (C) P(S), P(U)
(D) None of the above


Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 17 of 18



Linked Answer Questions 83a & 83b:

83. Consider the following assembly language program for a hypothetical processor.
A, B and C are 8 bit integers. The meanings of various instructions are shown as
comments.

MOV B, #0 ; B 0
MOV C, #8 ; C 8
Z: CMP C, #0 ; compare C with 0
JZX ; Jump to X if zero flag is set
SUB C, #1 ; C C - 1
LRC A, #1 ; Left rotate A through carry by one bit. Thus if the
Initial value of A and the carry flag are a7a6.a0 and c0
Respectively, their values after the execution will be
a6a5.a0c0 and a7 respectively.
JC Y ; Jump to Y if carry flag is set
JMP Z ; Jump to Z
Y: ADD B, #1 ; B B + 1
JMP Z ; Jump to Z
X:

[a] If the initial value of register A is A0, the value of register B after the
program execution will be
(A) The number of 0 bits in A (B) The sum of all bits in A
(C) A0 (D) 8

[b] Which of the following instructions should be inserted at location X to
ensure that the value of register A after program execution is the same as
its initial value.
(A) NOP (B) LRC A, #1 (C) ADD A, #1 (D) RRC A, #1

Linked Answer Questions 84a & 84b:

84. A class B network address 130.50.0.0 is subnetted as follows. The last 10 bits of
the host id are allotted for host number and the remaining 6 bits are reserved for
subnet number.
[a] How many subnets and hosts are possible with the above addressing
scheme?
(A) 62, 1022 (B) 30, 510
Tcst ID: 00 A!! India FREE Mnck GATE Tcst uuu.guteforum.com
All rights reserved by GATE Forum Educational Services Pvt. Ltd. No part of this booklet may be reproduced or utilized in any form without the
written permission. Discuss this questions paper at www.gateforum.com. Page 18 of 18
(C) 14, 254 (D) None of the above


[b] What are the starting addresses of 1
st
and 4
th
subnets?
(A) 130.50.4.1 and 130.50.16.1 (B) 130.50.1.1 and 130.50.4.1
(C) 130.50.0.0 and 130.50.3.0 (D) None of the above

Linked Answer Questions 85a & 85b:

85. Consider the following relation schema pertaining to a students database
student (rollno, name, courseno)
Enroll(rollno, courseno, coursename)
Where the primary keys are underlined. The number of tuples in the student and
Enroll tables is 30 and 40 respectively.

[a] If the natural join is performed on rollno, what are the maximum and
minimum number of tuples that are possible ?
(A) 30, 30 (B) 120, 30 (C) 40, 30 (D) 120, 40

[b] If the natural join is performed on courseno, what are the maximum and
minimum numbers of tuples possible?
(A) 30, 30 (B) 120, 30 (C) 40, 30 (D) 120, 40

You might also like