# GATE CS 2013

Question 1 |

^{2}+ y

^{2}. Which one of the following statements is TRUE about ?

Commutative but not associative | |

Both commutative and associative | |

Associative but not commutative | |

Neither commutative nor associative |

**GATE CS 2013**

**Set Theory & Algebra**

**Discuss it**

**Associativity:**A binary operation ∗ on a set S is said to be associative if it satisfies the associative law: a ∗ (b ∗c) = (a ∗b) ∗c for all a, b, c ∈S.

**Commutativity:**A binary operation ∗ on a set S is said to be commutative if it satisfies the condition: a ∗b=b ∗a for all a, b, ∈S. In this case, the order in which elements are combined does not matter.

**Solution:**Here a binary operation on a set of integers is defined as x⊕ y = x2 + y2. for Commutativity: x ⊕y= y ⊕x. LHS=> x ⊕y= x^2+ y^2 RHS=> y ⊕x= y^2+x^2 LHS = RHS. hence commutative. for Associativity: x ⊕ (y ⊕ z) =(x ⊕ y) ⊕ z LHS=> x ⊕ (y⊕ z) = x ⊕ ( y^2+z^2)= x^2+(y^2+z^2)^2 RHS=> (x ⊕y) ⊕z= ( x^2+y^2) ⊕z=(x^2+y^2)^2+z^2 So, LHS ≠ RHS, hence not associative. Reference: http://faculty.atu.edu/mfinan/4033/absalg3.pdf This solution is contributed by

**Nitika Bansal**

**Another Solution :**commutative as xy is always same as yx. is not associative as (xy)z is (x^2 + y^2)^2 + z^2, but x(yz) is x^2 + (y^2 + z^2)^2.

Question 2 |

8 / (2e ^{3}) | |

9 / (2e ^{3}) | |

17 / (2e ^{3}) | |

26 / (2e ^{3}) |

**GATE CS 2013**

**Probability**

**Discuss it**

PR(X < 3) = Pr(x = 0) + Pr(x = 1) + Pr(x = 2) = f(0, 3) + f(1, 3) + f(2, 3) Put = 3 and k = 0, 1, 2 in the formula given at http://en.wikipedia.org/wiki/Poisson_distribution#Definition = 17 / (2e

^{3})

Question 3 |

A | |

B | |

C | |

D |

**GATE CS 2013**

**Linear Algebra**

**Discuss it**

First of all, you should know the basic properties of determinants before approaching For these kind of problems. 1) Applying any row or column transformation does not change the determinant 2) If you interchange any two rows, sign of the determinant will change

A = | 1 x x^2 | | 1 y y^2 | | 1 z z^2 |

To prove option (b)

=> Apply column transformation C2 -> C2+C1

C3 -> C3+C1

=> det(A) = | 1 x+1 x^2+1 | | 1 y+1 y^2+1 | | 1 z+1 z^2+1 |

To prove option (c),

=> Apply row transformations R1 -> R1-R2

R2 -> R2-R3

=> det(A) = | 0 x-y x^2-y^2 | | 0 y-z y^2-z^2 | | 1 z z^2 |

To prove option (d),

=> Apply row transformations R1 -> R1+R2

R2 -> R2+R3

=> det(A) = | 2 x+y x^2+y^2 | | 2 y+z y^2+z^2 | | 1 z z^2 |

This solution is contributed by **Anil Saikrishna Devarasetty** .

Question 4 |

-256 | |

-128 | |

-127 | |

0 |

**GATE CS 2013**

**Number Representation**

**Discuss it**

^{(n-1)}) to +(2

^{(n-1)}-1)

Question 5 |

Priority encoder | |

Decoder | |

Multiplexer | |

Demultiplexer |

**GATE CS 2013**

**Digital Logic & Number representation**

**Combinational Circuits**

**Discuss it**

Question 6 |

O(log n) | |

O(n) | |

O(nLogn) | |

O(n^2) |

**GATE CS 2013**

**Discuss it**

Question 7 |

O(1) | |

O(Logn) | |

O(n) | |

O(nLogn) |

**GATE CS 2013**

**Discuss it**

To insert 50, we will have to traverse all nodes. 10 \ 20 \ 30 \ 40

Question 8 |

A | |

B | |

C | |

D |

**GATE CS 2013**

**Regular languages and finite automata**

**Discuss it**

Question 9 |

n/2 | |

n-1 | |

2n-1 | |

2 ^{n} |

**GATE CS 2013**

**Parsing and Syntax directed translation**

**Discuss it**

S->aB B->bC C->cdThe Right Most Derivation for the above is:

S -> aB ( Reduction 3 ) -> abC ( Reduction 2 ) -> abcd ( Reduction 1 )We can see here that no production is for unit or epsilon. Hence 3 reductions here. We can get less number of reductions with some other grammar which also does't produce unit or epsilon productions,

S->abA A-> cdThe Right Most Derivation for the above as:

S -> abA ( Reduction 2 ) -> abcd ( Reduction 1 )Hence 2 reductions. But we are interested in knowing the maximum number of reductions which comes from the 1st grammar. Hence total 3 reductions as maximum, which is ( n - 1) as n = 4 here. Thus, Option B.

Question 10 |

This algorithm is equivalent to the first-come-first-serve algorithm | |

This algorithm is equivalent to the round-robin algorithm. | |

This algorithm is equivalent to the shortest-job-first algorithm.. | |

This algorithm is equivalent to the shortest-remaining-time-first algorithm |

**GATE CS 2013**

**OS CPU Scheduling**

**Discuss it**