GATE CS 2010

  • Last Updated : 10 Nov, 2021

Question 1
Let G = (V,E) be a graph. Define ξ(G) = Σd id x d, where id is the number of vertices of degree d in G. If S and T are two different trees with ξ(S) = ξ(T),then
Cross
|S| = 2|T|
Cross
|S| = |T|-1
Tick
|S| = |T|
Cross
|S| = |T|+1


Question 1-Explanation: 
The expression ξ(G) is basically sum of all degrees in a tree.   For example, in the following tree, the sum is 3 + 1 + 1 + 1.
    a 
  / | \
 b  c  d
Now the questions is, if sum of degrees in trees are same, then what is the relationship between number of vertices present in both trees? The answer is, ξ(G) and ξ(T) is same for two trees, then the trees have same number of vertices. It can be proved by induction. Let it be true for n vertices. If we add a vertex, then the new vertex (if it is not the first node) increases degree by 2, it doesn't matter where we add it. For example, try to add a new vertex say 'e' at different places in above example tee.
Question 2

Newton-Raphson method is used to compute a root of the equation x2-13=0 with 3.5 as the initial value. The approximation after one iteration is
 

Tick

3.607
 

Cross

3.667
 

Cross

3.676
 

Cross

3.575
 



Question 2-Explanation: 

In Newton-Raphson's method, We use the following formula to get the next value of f(x). f'(x) is derivative of f(x). 
x_{n+1} = x_{n}- \frac{f(x_{n})}{f'(x_{n})}

 

f(x)  =  x2-13
f'(x) =  2x

Applying the above formula, we get
Next x = 3.5 - (3.5*3.5 - 13)/2*3.5
Next x = 3.607


 

Question 3

What is the possible number of reflexive relations on a set of 5 elements?
 

Cross

225
 

Tick

220
 

Cross

215
 

Cross

210
 



Question 3-Explanation: 

Number of reflexive relations is 2n2-n which is 220 for n = 5
 

Question 4
Consider the set S = {1, ω, ω2}, where ω and w2 are cube roots of unity. If * denotes the multiplication operation, the structure (S, *) forms
Tick
A group
Cross
A ring
Cross
An integral domain
Cross
A field


Question 4-Explanation: 
A group is a set of elements together with an operation that combines any two of its elements to form a third element also in the set while satisfying four conditions called the group axioms, namely closureassociativityidentity and invertibility. (Source: http://en.wikipedia.org/wiki/Group_(mathematics) (S, *)  is a group with identity as 1    
Question 5

What is the value of Limn->∞(1-1/n)2n ?
 

Cross

1
 

Tick

e-2
 

Cross

e-1/2
 

Cross

0
 



Question 5-Explanation: 

lim_{n to infty}left(1 - frac{1}{n}right)^{2n}\ = e^{(-1)*frac{1}{n}*2n}\ =e^{-2}

Question 6
The minterm expansion of f(P, Q, R) = PQ + QR' + PR' is
Tick
m2 + m4 + m6 + m7
Cross
m0 + m1 + m3 + m5
Cross
m0 + m1 + m6 + m7
Cross
m2 + m3 + m4 + m5


Question 6-Explanation: 
K-map,
= PQ + QR’ + PR’ 
= PQ(R+R’) + (P+P’)QR’ + P(Q+Q’)R’
= PQR + PQR’ +PQR’ +P’QR’ + PQR’ + PQ’R’ 
= PQR(m7) + PQR'(m6)+P’QR'(m2) +PQ’R'(m4) 
= m2 + m4 + m6 + m7 
Option (A) is correct.
Question 7

A main memory unit with a capacity of 4 megabytes is built using 1M × 1-bit DRAM chips. Each DRAM chip has 1K rows of cells with 1K cells in each row. The time taken for a single refresh operation is 100 nanoseconds. The time required to perform one refresh operation on all the cells in the memory unit is:- 
A.100 nanoseconds
B.100×210 nanoseconds
C.100×220 nanoseconds
D.3200×220 nanoseconds

Cross

A

Tick

B

Cross

C

Cross

D



Question 7-Explanation: 

Number of chips required for 4MB MM = (4 * 220 * 8) / (1 * 220) = 32 chips 

In a refresh cycle, a whole row of a memory chip is refreshed at once. This implies the given time of 100 ns for one refresh operation refreshes one row of memory chip. Since there are 1K=2^10 such rows, time for refreshing a whole chip would be: 2^10 * 100 ns. 

Second question arises, how to arrange these chips as there can be many possible arrangements. There is a logical arrangement provided in the problem statement itself as "1M x 1 bit chip". This indicates that to make a "1M x 32 bits" MM, we need to arrange all 32 chips in a line. It is to be noted that a row in all chips in series can be refreshed in one refresh cycle. This makes the total time to refresh the 4MBytes of memory as same as that of one chip. Hence, time required to refresh MM = 100 * 210 ns. So, option (B) is correct.

Question 8

P is a 16-bit signed integer. The 2's complement representation of P is (F87B)16.The 2's complement representation of 8*P
 

Tick

(C3D8)16
 

Cross

(187B)16
 

Cross

(F878)16
 

Cross

(987B)16
 



Question 8-Explanation: 

Explanation:

P = (F87B)16 is -1111 1000 0111 1011 in binary

Note that most significant bit in the binary representation is 1, which implies that the number is negative. To get the value of the number performs the 2's complement of the number. We get P as -1925 and 8P as -15400 

Since 8P is also negative, we need to find 2's complement of it (-15400) 
Binary of 15400 = 0011 1100 0010 1000 
2's Complement = 1100 0011 1101 1000 = (C3D8)16
 

Explanation 2 : (Easy way):

P = (F87B)16 is (1111 1000 0111 1011)2 in binary 

Note that the most significant bit in the binary representation is 1, which implies that the number is negative. To get the value of the number, the 2's complement of the number is performed. We get P as -1925

The binary of (1925)10 is (0000 0111 1000 0101)2

Now 8P= left shift P 3 times = (0011 1100 0010 1000)2   for a negative sign it is  (1011 1100 0010 1000)2

2's Complement = 1100 0011 1101 1000 = (C3D8)16

Quiz of this Question
Please comment below if you find anything wrong in the above post
 

Question 9

The Boolean expression for the output 'f' of the multiplexer shown below is:

 

Cross

(P(XOR)Q(XOR)R)'

Tick

P(XOR)Q(XOR)R

Cross

(P+Q+R)'

Cross

P+Q+R



Question 9-Explanation: 

For 4 to 1 mux truth table SEL                  INPUT                 O/P

QPRR’R’RF
00XXX11
01XX1X1
10X1XX1
111XXX1

 

In the 1st column there are 4 NOR Gates, number them as 1 to 4 ( top to down).

In the 2nd column there are 2 NOR Gates, number them as 5 and 6 ( top to down).

In the 3rd column there is only 1 NOR Gate, number it as 7.

1st numbered Gate gives output as : ( P + Q )'
2nd numbered Gate gives output as : ( Q + R )'
3rd numbered Gate gives output as : ( P + R )'
4th numbered Gate gives output as : ( R + Q )'


5th numbered Gate gives output as :
(( P + Q )' + ( Q + R )')'
= ((P + Q)'' . ( Q + R )'') ( De Morgan's law)
= (P + Q ) . ( Q + R ) ( Idempotent Law, A'' = A)
= (PQ + PR + Q + QR )
= (Q(1 + P + R) + PR) 

=> Q + PR ( as, 1 + " any boolean expression" = 1 )

Similarly 6th numbered Gate gives output as : R + PQ   (as this time R is common here)

Now 7th numbered Gate gives output as :
((Q + PR) + (R + PQ))'
= (Q( 1+P) + R(1+P))'
= (Q+R)' 

Question 10

What does the following program print?
 

C

#include
void f(int *p, int *q)
{
  p = q;
 *p = 2;
}
int i = 0, j = 1;
int main()
{
  f(&i, &j);
  printf("%d %d n", i, j);
  getchar();
  return 0;
}
Cross

2 2
 

Cross

2 1
 

Cross

0 1
 

Tick

0 2 
 



Question 10-Explanation: 

See below comments for explanation. 

 

/* p points to i and q points to j */
void f(int *p, int *q)
{
  p = q;    /* p also points to j now */
 *p = 2;   /* Value of j is changed to 2 now */
}


 

There are 64 questions to complete.