Gate-1996

Question 1
Let A and B be sets and let Ac and Bc denote the complements of the sets A and B. The set (A – B) ∪ (B - A) ∪ (A∩B) is equal to
A
A ∪ B
B
Ac ∪ Bc
C
A ∩ B
D
Ac ∩ Bc
       CN
Question 1 Explanation: 
(A – B) ∪ (B - A) ∪ (A∩B)

(A - B) = 1
(B - A) = 2
(A∩B) = 3
A∪B = (1∪2∪3)
(A – B) ∪ (B - A) ∪ (A∩B) = 1∪2∪3 = (A∪B)
Question 2
Let X = {2,3,6,12,24}, Let ≤ be the partial order defined by X ≤ Y if x divides y. Number of edge as in the Hasse diagram of (X,≤) is
A
3
B
4
C
9
D
None of the above
       CN
Question 2 Explanation: 

No. of edges = 4
Question 3
Suppose X and Y are sets and X Y and are their respective cardinalities. It is given that there are exactly 97 functions from X to Y. from this one can conclude that  
A
|X| = 1, |Y| = 97
B
|X| = 97, |Y| = 1
C
|X| = 97, |Y| = 97
D
None of the above
       CN
Question 3 Explanation: 
From the given information we can write,
|Y||X| = 97
→ Option A only satisfies.
Question 4
Which of the following statements is false?
A
The set of rational numbers is an abelian group under addition.
B
The set of integers in an abelian group under addition.
C
The set of rational numbers form an abelian group under multiplication.
D
The set of real numbers excluding zero in an abelian group under multiplication.
       CN
Question 4 Explanation: 
Rational number consists of number '0'. If 0 is present in a set inverse is not possible under multiplication.
Question 5
Two dice are thrown simultaneously. The probability that at least one of them will have 6 facing up is
A
B
C
D
       CN
Question 5 Explanation: 
1 - no. 6 on both dice
1 - (5/6 × 5/6) = 1 - (25/36) = 11/36
Question 6
The formula used to compute an approximation for the second derivative of a function f at a point X0 is
A
B
C
D
       DBMS
Question 6 Explanation: 
The formula which is used to compute the second derivation of a function f at point X is
Question 7

Let Ax = b be a system of linear equations where A is an m × n matrix and b is a m × 1 column vector and X is a n × 1 column vector of unknows. Which of the following is false?

A
The system has a solution if and only if, both A and the augmented matrix [A b] have the same rank.
B
If m < n and b is the zero vector, then the system has infinitely many solutions.
C
If m = n and b is non-zero vector, then the system has a unique solution.
D
The system will have only a trivial solution when m = n, b is the zero vector and rank (A) = n.
       DBMS
Question 7 Explanation: 
→ It belongs to linear non-homogeneous equations. So by having m=n, we can't say that it will have unique solution.
→ Solution can be depends on rank of matrix A and matrix [A B].
→ If rank[A] = rank[A B] then it can have solution otherwise no solution.
Question 8
 
A
(i) and (ii)
B
(ii) and (iii)
C
(i) and (iii)
D
(iii) and (iv)
       DBMS
Question 8 Explanation: 
(00)*(ε+0),0*
In these two, we have any no. of 0's as well as null.
Question 9
Which of the following statements is false?
A
The Halting problem of Turing machines is undecidable.
B
Determining whether a context-free grammar is ambiguous is undecidbale.
C
Given two arbitrary context-free grammars G1 and G2 it is undecidable whether L(G1) = L(G2).
D
Given two regular grammars G1 and G2 it is undecidable whether L(G1) = L(G2).
       DBMS
Question 9 Explanation: 
Equivalenceof regular languages is decidable under
1) Membership
2) Emtiness
3) Finiteness
4) Equivalence
5) Ambiguity
6) Regularity
7) Everything
8) Disjointness
All are decidable for Regular languages.
→ First 3 for CFL.
→ Only 1st for CSL and REC.
→ None for RE.
Question 10
Let L ⊆ Σ* where Σ = {a, b}. Which of the following is true?
A
L = {x|x has an equal number of a's and b's } is regular
B
L = {anbn|n≥1} is regular
C
L = {x|x has more a's and b's} is regular
D
L = {ambn|m ≥ 1, n ≥ 1} is regular
       DBMS
Question 10 Explanation: 
L = {ambn|m ≥ 1, n ≥ 1}
Here, m and n are independent.
So 'L' Is Regular.
Question 11
Which of the following is false?
A
B
C
D
       TOC
Question 11 Explanation: 
Question 12
 
A
(ii) and (iii) are true
B
(i) and (ii) are true
C
(iii) and (iv) are true
D
(ii) and (iv) are true
       TOC
Question 12 Explanation: 
(i) FIFO computation efficiently supported by queues.
(iv) LIFO computation efficiently supported by stacks.
Then given (i) and (iv) are false.
Answer:- A
Question 13
An advantage of chained hash table (external hashing) over the open addressing scheme is
A
Worst case complexity of search operations is less?
B
Space used is less
C
Deletion is easier
D
None of the above
       TOC
Question 13 Explanation: 
In chained hash tables have advantages over open addressed hash tables in that the removal operation is simple and resizing can be postponed for longer time.
Question 14
   
A
1
B
3
C
7
D
8
       TOC
Question 14 Explanation: 

a, b, c are going to unbalance.
Question 15
Which of the following sequences denotes the post order traversal sequence of the tree of question 14?
A
f e g c d b a
B
g c b d a f e
C
g c d b f e a
D
f e d g c b a
       TOC
Question 15 Explanation: 
Postorder:-
Left → Right → Root
g c d b f e a
Question 16
Relative mode of addressing is most relevant to writing
A
coroutines
B
position – independent code
C
shareable code
D
interrupt handlers
       DS
Question 16 Explanation: 
The main advantage of PC- relative addressing is that code may be position independent, i.e., it can be loaded anywhere in memory without the need to adjust any address.
Question 17
 
A
1, 2, 1, 2
B
2, 1, 2, 1
C
2, 1, 1, 2
D
1, 2, 2, 2
       DS
Question 17 Explanation: 
The functionalities from pass 1 and pass 2 are:
Pass 1:
1) Assign addresses to all statements in the program.
2) Save the values assigned to all labels for use in pass 2.
3) Perform some processing of assembler directives.
Pass 2:
1) Assemble instructions.
2) Generate data values defined by BYTE, WORD etc.
3) Perform processing of assembler directives not done during pass 1.
4) Write the program and assembling listing.
Question 18
 
A
a batch operating system
B
an operating system with a preemptive scheduler
C
an operating system with a non-preemptive scheduler
D
a uni-programmed operating system
       DS
Question 18 Explanation: 
Transaction from running → ready present.
So this is preemptive.
Question 19
A critical section is a program segment
A
which should run in a certain specified amount of time
B
which avoids deadlocks
C
where shared resources are accessed
D
which must be enclosed by a pair of semaphore operations, P and V
       DS
Question 19 Explanation: 
In CS, share resources are accessed.
Question 20
Which of the following is an example of spooled device?
A
A line printer used to print the output of a number of jobs.
B
A terminal used to enter input data to a running program.
C
A secondary storage device in a virtual memory sytem.
D
A graphic display device.
       DS
Question 20 Explanation: 
Example of spooled device is a line printer used to print the output of a number of jobs.
Question 21
A ROM is sued to store the table for multiplication of two 8-bit unsigned integers. The size of ROM required is
A
256 × 16
B
64 K × 8
C
4 K × 16
D
64 K × 16
       OS
Question 21 Explanation: 
When we multiply the two 8 bit numbers result will reach upto 16 bits. So we require 16 bits for each multiplication output.
No. of results possibe = 28 × 28 = 216 = 64K
Then total size of ROM = 64K × 16
Question 22
Number of machine cycles required for RET instruction in 8085 microprocessor is
A
1
B
2
C
3
D
5
       OS
Question 22 Explanation: 
1 for instruction fetch.
2 for stack operation.
Total no. of cycles = 2+1 = 3
Question 23
Both’s algorithm for integer multiplication gives worst performance when the multiplier pattern is
A
101010 …..1010
B
100000 …..0001
C
111111 …..1111
D
011111 …..1110
       OS
Question 23 Explanation: 
When the pairs 01 (or) 10 occur frequently in the multiplier. In that case Booth multiplication gives worst performance.
Question 24
For the daisy chain scheme of connecting I/O devices, which of the following statements is true?
A
It gives non-uniform priority to various devices.
B
It gives uniform priority to all devices.
C
It is only useful for connecting slow devices to a processor device.
D
It requires a separate interrupt pin on the processor for each device.
       OS
Question 24 Explanation: 
Daisy chaining technique tells the processor in which order the interrupt should be handle by providing priority devices.
→ In this all devices connected serially.
→ High priority devices placed first, followed by low priority devices.
Question 25
 
A
0 to 1
B
0.5 to 1
C
2-23 to 0.5
D
0.5 to (1-2-23)
       OS
Question 25 Explanation: 
Maximum value of mantissa will be 23, is where a decimal point is assumed before first 1. So the value is 1 - 2-23.
Question 26
Let R denotes the set of real numbers. Let f: R×R → R×R be a bijective function defined by f(x, y) = (x+y, x-y). the inverse function of f is given by  
A
B
C
D
       Algorithms
Question 26 Explanation: 
Question 27
Let R be a non-empty relation on a collection of sets defined by A R B if and only if A ∩ B = ф. Then, (pick the true statement)
A
R is reflexive and transitive
B
R is symmetric and not transitive
C
R is an equivalence relation
D
R is not reflexive and not symmetric
       Algorithms
Question 27 Explanation: 
Let A = {1, 2, 3} and B = {4, 5} and C = {1, 6, 7}
Now,
A ∩ B = ф
& B ∩ C = ф
But A ∩ B ≠ ф
So, R is not transitive.
A ∩ B = A, so R is not reflexive.
If A ∩ B = ф
then definitely B ∩ A = ф.
Hence, R is symmetric.
So, option (B) is true.
Question 28
Which of the following is false? Read ∧ as AND, ∨ as OR, ~ as NOT, → as one way implication and ↔ as two way implication.
A
((x → y) ∧ x) → y
B
((x → y) ∧ (x ∧ y)) → x
C
(x → (x ∨ ψ))
D
((x ∨ y) ↔ (x → y)
       Algorithms
Question 28 Explanation: 
When x = F and y = F
then option (D) will be False.
Question 29
Which one of the following is false?
A
The set of all bijective functions on a finite set forms a group under function composition.
B
The set {1, 2, ……., p–1} forms a group under multiplication mod p where p is a prime number.
C
The set of all strings over a finite alphabet forms a group under concatenation.
D
A subset s ≠ ф of G is a subgroup of the group if and only if for any pair of elements a, b ∈ s, a* b-1 ∈ s.
       Algorithms
Question 29 Explanation: 
Option (C) is False because string concatatieon operation is monoid(doesn't have inverse to become a group).
Question 30
   
A
B
C
D
       Algorithms
Question 30 Explanation: 
Note: Out of syllabus.
Question 31
 
A
if a = b or θ = nπ, is an integer
B
always
C
never
D
if a cos θ ≠ b sin θ
       CD
Question 31 Explanation: 
Question 32
The probability that top and bottom cards of a randomly shuffled deck are both aces in  
A
B
C
D
       CD
Question 32 Explanation: 
E1 : First card being ace
E2 : Last card being ace
Note that E1 and E2 are dependent events, i.e., probability of last card being ace if first is ace will be lesser than the probability of last card being ace if first card is not ace.
So, probability of first card being ace = 4/52
Probability of last card being ace given that first card is ace is,
P(E2 / E1) = 3/51
∴ P(E1 and E2) = P(E1) ⋅ P(E2 / E1) = 4/52 * 3/51
Question 33
If L1 and L2 are context free languages and R a regular set, one of the languages below is not necessarily a context free language. Which one?
A
L1, L2
B
L1 ∩ L2
C
L1 ∩ R
D
L1 ∪ L2
       CD
Question 33 Explanation: 
Context free languages are not closed under intersection.
Question 34
 
A
the set of all binary strings with unequal number of 0’s and 1’s
B
the set of all binary strings including the null string
C
the set of all binary strings with exactly one more 0’s than the number of 1’s or one more 1 than the number of 0’s
D
None of the above
       CD
Question 34 Explanation: 
(B) is the answer. Because for any binarystring of 0's and 1's we can append another string to make it contain equal no. of 0's and 1's, i.e., any string over {0,1} is a prefix of a string in L.
Question 35
   
A
the sentence
if a then if b then c:=d
B
the left most and right most derivations of the sentence
if a then if b then c:=d
give rise top different parse trees
C
the sentence
if a then if b then c:=d else c:=f
has more than two parse trees
D
the sentence
if a then if then c:=d else c:=f
has two parse trees
       CD
Question 35 Explanation: 
We have to generate
"if a then if b then c:=d else c:=f".
Parse tree 1:

Parse tree 2:
Question 36
 
A
0
B
1
C
2
D
3
       DLD
Question 36 Explanation: 
Lets draw first heap from given sequence,

Question 37
 
A
O(n)
B
O(log n)
C
D
None of the above
       DLD
Question 37 Explanation: 
Apply Master's theorem.
Question 38
The average number of key comparisons done on a successful sequential search in list of length n is
A
B
C
D
       DLD
Question 38 Explanation: 
Total comparisons required
= No. of comparisons if element present in 1st position + No. of comparisons if element present in 2nd position + ............. + No. of comparisons if element present in nth position
= 1 + 2 + 3 + ... + n
= n(n+1)/2
Since there are n elements in the list, so average no. of comparisons
= Total comparisons/Total no. of elements
= (n(n+1)/2)/n
= n+1/2
Question 39
   
A
(4, 7)
B
(7, 4)
C
(8, 3)
D
(3, 8)
       DLD
Question 39 Explanation: 
50 is the root node in BST.
So greater than 50 will be in right subtree of 50 and less than 50 in left subtree.
So, answer will be (7, 4).
Question 40
 
A
C1 < C2
B
C1 > C2
C
C1 = C2
D
we cannot say anything for arbitrary n.
       DLD
Question 40 Explanation: 
Both are the worst cases of Quick sort, i.e., either the elements are already in increasing order or the elements are already in decreasing order.
So, option is (C) is correct.
Question 41
 
A
(ii) only
B
(i) only
C
both (i) and (ii)
D
None of the above
       CO
Question 41 Explanation: 
If M2 macro is called with X=0, then it will go into an infinite loop.
Question 42
 
A
A – 3 B – 4 C – 1 D – 2
B
A – 4 B – 3 C – 1 D – 2
C
A – 4 B – 3 C – 2 D – 1
D
A – 3 B – 4 C – 2 D – 1
       CO
Question 42 Explanation: 
Each time a subroutine is called its activation record is created.
An assembler uses location counter value to give address to each instruction which is needed for relative addressing as well as for jump labels.
Reference count is used by garbage collector to clear the memory whose reference count be comes 0.
Linker loader is a loader which can load several compiled codes and link them together into a single executable. Thus it needs to do relocation of the object codes.
Question 43
A 1000 Kbyte memory is managed using variable partitions but to compaction. It currently has two partitions of sizes 200 Kbytes and 260 Kbytes respectively. The smallest allocation request in Kbytes that could be denied is for
A
151
B
181
C
231
D
541
       CO
Question 43 Explanation: 
200 and 260 are already hold by some other processes. Now we have to model the partition in such a way so that smallest allocation request could be denied. So, we can do the division as,

So, smallest allocation request which can be denied is 181 KB.
Question 44
A solution to the Dining Philosophers Problem which avoids deadlock is
A
ensure that all philosophers pick up the left fork before the right fork
B
ensure that all philosophers pick up the right fork before the left fork
C
ensure that one particular philosopher picks up the left fork before the right fork, and that all other philosophers pick up the right fork before the left fork
D
None of the above
       CO
Question 44 Explanation: 
In the Dining philosopher problem, each philosopher needs exactly two chopsticks to eat food but the problem is: each philosopher is going to take one chopstick at a time, which is placed at its right-hand side or at its left-hand side, but remember all should choose in the same manner like if first one chooses in a clockwise manner then each one should choose in clockwise, this type of picking cause, a circular waiting loop because each one is depending on other. This is also called as circular waiting and it leads to deadlock.
To avoid this, atleast one philosopher should choose its first chopstick in different way so that circular loop is not formed.
Question 45
Four jobs to be executed on a single processor system arrive at time 0+ in the order A, B, C, D. their burst CPU time requirements are 4, 1, 8, 1 time units respectively. The completion time of A under round robin scheduling with time slice of one time unit is
A
10
B
4
C
8
D
9
       CO
Question 45 Explanation: 
Time quantum is 1 unit.

∴ Completion time of A is 9 unit.
Question 46
 
A
Binary of Hex conversion
B
Binary to BCD conversion
C
Binary to grey code conversion
D
Binary to radix-12 conversion
       CN
Question 46 Explanation: 
Here ф means 0.
Whenever, b2 = b3 = 1, then only 0100, i.e., 4 is added to the given binary number. Lets write all possibilities for b.

Note that the last 4 combinations leads to b3 and b2 as 1. So, in these combinations only 0010 will be added.
1100 is 12
1101 is 13
1110 is 14
1111 is 15
in binary unsigned number system.
1100 + 0100 = 10000
1101 + 0100 = 10001, and so on.
This is conversion to radix 12.
Question 47
 
A
B
C
D
       CN
Question 47 Explanation: 
Question 48
 
A
4
B
3
C
2
D
1
       CN
Question 48 Explanation: 
3 states are required in the minimized machine states B and C can be combined as follows:
Question 49
   
A
B
C
D
E
None of the above
       CN
Question 49 Explanation: 
Correct option is

Question 50
A micro program control unit is required to generate a total of 25 control signals. Assume that during any microinstruction, at most two control signals are active. Minimum number of bits required in the control word to generate the required control signals will be
A
2
B
2.5
C
10
D
12
       CN
Question 50 Explanation: 
To generate 1 out of 25 different control signals we need 5 bits. But at any time atmost 2 signals can be active. So control word length
= 5+5
= 10 bits
There are 50 questions to complete.