GATE CS 2013
Question 1 |



Commutative but not associative | |
Both commutative and associative | |
Associative but not commutative | |
Neither commutative nor associative |
Discuss it








Question 2 |
Which one of the following does NOT equal to


D | |
C | |
B | |
A |
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 |
Question 3 |
-256 | |
-128 | |
-127 | |
0 |
Discuss it
Question 4 |

Priority encoder | |
Decoder | |
Multiplexer | |
Demultiplexer |
Discuss it
Question 5 |
O(log n) | |
O(n) | |
O(nLogn) | |
O(n^2) |
Discuss it
Question 6 |
O(1) | |
O(Logn) | |
O(n) | |
O(nLogn) |
Discuss it
To insert 50, we will have to traverse all nodes. 10 \ 20 \ 30 \ 40
Question 7 |
Consider the languages L1 = and L2 = {a}. Which one of the following represents L1 L2* U L1*
{[Tex]epsilon [/Tex]} | |
[Tex]phi [/Tex] | |
a* | |
{[Tex]epsilon [/Tex],a} |
Discuss it
L1 L2* U L1* Result of L1 L2* is . {
} indicates an empty language. Concatenation of
with any other language is
. It works as 0 in multiplication. L1* =
* which is {
}. Union of
and {
} is {
}
Question 8 |
What is the maximum number of reduce moves that can be taken by a bottom-up parser for a grammar with no epsilon- and unit-production (i.e., of type A -> є and A -> a) to parse a string with n tokens?
n/2 | |
n-1 | |
2n-1 | |
2n |
Discuss it
Given in the question, a grammar with no epsilon- and unit-production (i.e., of type A -> є and A -> a).
To get maximum number of Reduce moves, we should make sure than in each sentential form only one terminal is reduced. Since there is no unit production, so last 2 tokens will take only 1 move.
So To Reduce input string of n tokens, first Reduce n-2 tokens using n-2 reduce moves and then Reduce last 2 tokens using production which has . So total of n-2+1 = n-1 Reduce moves.
Suppose the string is abcd. ( n = 4 ).
We can write the grammar which accepts this string as follows:
S->aB B->bC C->cd
The 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 doesn't produce unit or epsilon productions,
S->abA A-> cd
The 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 is maximum, which is ( n - 1) as n = 4 here.
Thus, Option B.
Question 9 |
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 |
Discuss it
Question 10 |
GROUP I GROUP II (P) Service oriented computing (1) Interoperability (Q) Heterogeneous communicating systems (2) BPMN (R) Information representation (3) Publish-find-bind (S) Process description (4) XML
P-1, Q-2, R-3, S-4 | |
P-3, Q-4, R-2, S-1 | |
P-3, Q-1, R-4, S-2 | |
P-4, Q-3, R-2, S-1 |
Discuss it