## GATE CS 2010

 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
 A |S| = 2|T| B |S| = |T|-1 C |S| = |T| D |S| = |T|+1
GATE CS 2010    Graph Theory
Discuss it

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
 A 3.575 B 3.676 C 3.667 D 3.607
GATE CS 2010    Numerical Methods and Calculus
Discuss it

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).
```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?
 A 210 B 215 C 220 D 225
GATE CS 2010    Combinatorics
Discuss it

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
 A A group B A ring C An integral domain D A field
GATE CS 2010    Set Theory & Algebra
Discuss it

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 ?
 A 0 B e-2 C e-1/2 D 1
GATE CS 2010    Numerical Methods and Calculus
Discuss it

Question 5 Explanation:
The value of e (mathematical constant) can be written as following   And the value of 1/e can be written as following. Limn-> ∞( 1-1/n)2n  =  (Limn-> ∞(1-1/n)n)2  =  e-2
 Question 6
The minterm expansion of f(P, Q, R) = PQ + QR' + PR' is
 A m2 + m4 + m6 + m7 B m0 + m1 + m3 + m5 C m0 + m1 + m6 + m7 D m2 + m3 + m4 + m5
GATE CS 2010    Digital Logic & Number representation
Discuss it

Question 6 Explanation:
 Question 7
A main memory unit with a capacity of 4 megabytes is built using 1M x 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*210 nanoseconds B 100*220 nanoseconds C 3200*220 nanoseconds
GATE CS 2010    Computer Organization and Architecture
Discuss it

Question 7 Explanation:
```Number of chips required for 4MB MM =
(4 * 2^20 * 8) / (1 * 2^20) = 32

Time required to refresh one chip = 2^20 * 100 ns.

Hence, time required to refresh MM = 32 * 2^20 * 100 ns
= 3200 * 2^20 ns ```
 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
 A (C3D8)16 B (187B)16 C (F878)16 D (987B)16
GATE CS 2010    Number Representation
Discuss it

Question 8 Explanation:
P = (F87B)16 is -1111 1000 0111 1011 in bianry 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 perform 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
 Question 9
The Boolean expression for the output 'f' of the multiplexer shown below is
 A (P(XOR)Q(XOR)R)' B P(XOR)Q(XOR)R C (P+Q+R)' D P+Q+R
GATE CS 2010    Digital Logic & Number representation
Discuss it

Question 9 Explanation:
For 4 to 1 mux truth table SEL                  INPUT                 O/P
 Q P R R’ R’ R F 0 0 X X X 1 1 0 1 X X 1 X 1 1 0 X 1 X X 1 1 1 1 X X X 1
p’q’r+p’qr’+pq’r’+pqr pXORqXORr
 Question 10
What does the following program print?
```#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;
}
```
 A 2 2 B 2 1 C 0 1 D 0 2
Pointer Basics    GATE CS 2010
Discuss it

Question 10 Explanation:
```/* p points to i and q points to j */