Question 1
A binary operation on a set of integers is defined as x y = x2 + y2. Which one of the following statements is TRUE about ?
 A Commutative but not associative B Both commutative and associative C Associative but not commutative D Neither commutative nor associative
GATE CS 2013    Set Theory & Algebra
Discuss it

Question 1 Explanation:
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 : [Tex]\oplus[/Tex] commutative as x[Tex]\oplus[/Tex]y is always same as y[Tex]\oplus[/Tex]x. [Tex]\oplus[/Tex] is not associative as (x[Tex]\oplus[/Tex]y)[Tex]\oplus[/Tex]z is (x^2 + y^2)^2 + z^2, but x[Tex]\oplus[/Tex](y[Tex]\oplus[/Tex]z) is x^2 + (y^2 + z^2)^2.
 Question 2
Suppose p is the number of cars per minute passing through a certain road junction between 5 PM and 6 PM, and p has a Poisson distribution with mean 3. What is the probability of observing fewer than 3 cars during any given minute in this interval?
 A 8 / (2e3) B 9 / (2e3) C 17 / (2e3) D 26 / (2e3)
GATE CS 2013    Probability
Discuss it

Question 2 Explanation:
See http://en.wikipedia.org/wiki/Poisson_distribution#Definition
PR(X < 3) = Pr(x = 0) + Pr(x = 1) + Pr(x = 2) = f(0, 3) + f(1, 3) + f(2, 3) Put [Tex]\lambda[/Tex] = 3 and k = 0, 1, 2 in the formula given at http://en.wikipedia.org/wiki/Poisson_distribution#Definition = 17 / (2e3)
 Question 3
Which one of the following does NOT equal to
 A A B B C C D D
GATE CS 2013    Linear Algebra
Discuss it

Question 3 Explanation:

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
The smallest integer that can be represented by an 8-bit number in 2’s complement form is
 A -256 B -128 C -127 D 0
GATE CS 2013    Number Representation
Discuss it

Question 4 Explanation:
See Two's complement For n bit 2's complement numbers, range of number is -(2(n-1)) to +(2(n-1)-1)
 Question 5
In the following truth table, V = 1 if and only if the input is valid. What function does the truth table represent?
 A Priority encoder B Decoder C Multiplexer D Demultiplexer
GATE CS 2013    Digital Logic & Number representation
Discuss it

Question 5 Explanation:
Since there are more than one outputs and number of outputs is less than inputs, it is a Priority encoder V=1 when input is valid and for priority encoder it checks first high bit encountered. Except all are having at least one bit high and ‘x’ represents the “don’t care” as we have found a high bit already. So answer is (A).
 Question 6
Which one of the following is the tightest upper bound that represents the number of swaps required to sort n numbers using selection sort?
 A O(log n) B O(n) C O(nLogn) D O(n^2)
GATE CS 2013
Discuss it

Question 6 Explanation:
To sort elements in increasing order, selection sort always picks the maximum element from remaining unsorted array and swaps it with the last element in the remaining array. So the number of swaps, it makes in n-1 which is O(n)
 Question 7
Which one of the following is the tightest upper bound that represents the time complexity of inserting an object into a binary search tree of n nodes?
 A O(1) B O(Logn) C O(n) D O(nLogn)
GATE CS 2013
Discuss it

Question 7 Explanation:
To insert an element, we need to search for its place first. The search operation may take O(n) for a skewed tree like following.
To insert 50, we will have to traverse all nodes.
10
\
20
\
30
\
40

 Question 8
Consider the languages L1 = and L2 = {a}. Which one of the following represents L1 L2* U L1*
 A A B B C C D D
GATE CS 2013    Regular languages and finite automata
Discuss it

Question 8 Explanation:
L1 L2* U L1* Result of L1 L2* is [Tex]\phi[/Tex]. {[Tex]\phi[/Tex]} indicates an empty language. Concatenation of [Tex]\phi[/Tex] with any other language is [Tex]\phi[/Tex]. It works as 0 in multiplication. L1* = [Tex]\phi[/Tex]* which is {[Tex]\epsilon[/Tex]}. Union of [Tex]\phi[/Tex] and {[Tex]\epsilon[/Tex]} is {[Tex]\epsilon[/Tex]}
 Question 9
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?
 A n/2 B n-1 C 2n-1 D 2n
GATE CS 2013    Parsing and Syntax directed translation
Discuss it

Question 9 Explanation:
Given in the question, a grammar with no epsilon- and unit-production (i.e., of type A -> є and A -> a) . 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 does'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 as maximum, which is ( n - 1) as n = 4 here. Thus, Option B.
 Question 10
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (the lowest priority). The scheduler re-evaluates the process priorities every T time units and decides the next process to schedule. Which one of the following is TRUE if the processes have no I/O operations and all arrive at time zero?
 A This algorithm is equivalent to the first-come-first-serve algorithm B This algorithm is equivalent to the round-robin algorithm. C This algorithm is equivalent to the shortest-job-first algorithm.. D This algorithm is equivalent to the shortest-remaining-time-first algorithm
GATE CS 2013    CPU Scheduling
Discuss it

Question 10 Explanation:
The scheduling algorithm works as round robin with quantum time equals to T. After a process's turn comes and it has executed for T units, its waiting time becomes least and its turn comes again after every other process has got the token for T units.
 Question 11
Match the problem domains in GROUP I with the solution technologies in GROUP II
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 
 A P-1, Q-2, R-3, S-4 B P-3, Q-4, R-2, S-1 C P-3, Q-1, R-4, S-2 D P-4, Q-3, R-2, S-1
GATE CS 2013    Software Engineering
Discuss it

Question 11 Explanation:
The answer can be easily guessed with XML. XML is used for information representation.
 Question 12
The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are:
 A TCP, UDP, UDP and TCP B UDP, TCP, TCP and UDP C UDP, TCP, UDP and TCP D TCP, UDP, TCP and UDP
GATE CS 2013    Transport Layer
Discuss it

Question 12 Explanation:
TCP (Transmission Control Protocol) and UDP(User Datagram Protocol) are two main transport layer protocols. TCP is connection oriented and UDP is connectionless, this makes TCP more reliable than UDP. But UDP is stateless (less overhead), that makes UDP is suitable for purposes where error checking and correction is less important than timely delivery. For real time multimedia, timely delivery is more important than correctness. --> UDP For file transfer, correctness is necessary. --> TCP DNS, timely delivery is more important --> UDP Email again same as file transfer --> TCP
 Question 13
Using public key cryptography, X adds a digital signature to message M, encrypts < M, >, and sends it to Y, where it is decrypted. Which one of the following sequences of keys is used for the operations?
 A Encryption: X’s private key followed by Y’s private key; Decryption: X’s public key followed by Y’s public key B Encryption: X’s private key followed by Y’s public key; Decryption: X’s public key followed by Y’s private key C Encryption: X’s public key followed by Y’s private key; Decryption: Y’s public key followed by X’s private key D Encryption: X’s private key followed by Y’s public key; Decryption: Y’s private key followed by X’s public key
GATE CS 2013    Network Security
Discuss it

Question 13 Explanation:
 Question 14
Assume that source S and destination D are connected through two intermediate routers labeled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D.
 A Network layer – 4 times and Data link layer – 4 times B Network layer – 4 times and Data link layer – 3 times C Network layer – 4 times and Data link layer – 6 times D Network layer – 2 times and Data link layer – 6 times
GATE CS 2013    Network Layer
Discuss it

Question 14 Explanation:
Router is a network layer device. See the following diagram from http://www.oreillynet.com/network/2001/04/13/net_2nd_lang.html So every packet passes twice through data link layer of every intermediate router.
 Question 15
An index is clustered, if
 A it is on a set of fields that form a candidate key. B it is on a set of fields that include the primary key. C the data records of the file are organized in the same order as the data entries of the index. D the data records of the file are organized not in the same order as the data entries of the index.
GATE CS 2013     File structures (sequential files, indexing, B and B+ trees)
Discuss it

Question 15 Explanation:
A database index is clustered if physical records on disk follow the index order.
 Question 16
Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the P operation (i.e., wait) on semaphores a, b and c; process Y executes the P operation on semaphores b, c and d; process Z executes the P operation on semaphores c, d, and a before entering the respective code segments. After completing the execution of its code segment, each process invokes the V operation (i.e., signal) on its three semaphores. All semaphores are binary semaphores initialized to one. Which one of the following represents a deadlock-free order of invoking the P operations by the processes?
 A X: P(a)P(b)P(c) Y: P(b)P(c)P(d) Z: P(c)P(d)P(a) B X: P(b)P(a)P(c) Y: P(b)P(c)P(d) Z: P(a)P(c)P(d) C X: P(b)P(a)P(c) Y: P(c)P(b)P(d) Z: P(a)P(c)P(d) D X: P(a)P(b)P(c) Y: P(c)P(b)P(d) Z: P(c)P(d)P(a)
Process Management    GATE CS 2013
Discuss it

Question 16 Explanation:
Option A can cause deadlock. Imagine a situation process X has acquired a, process Y has acquired b and process Z has acquired c and d. There is circular wait now. Option C can also cause deadlock. Imagine a situation process X has acquired b, process Y has acquired c and process Z has acquired a. There is circular wait now. Option D can also cause deadlock. Imagine a situation process X has acquired a and b, process Y has acquired c. X and Y circularly waiting for each other. See http://www.eee.metu.edu.tr/~halici/courses/442/Ch5%20Deadlocks.pdf   Consider option A) for example here all 3 processes are concurrent so X will get semaphore a, Y will get b and Z will get c, now X is blocked for b, Y is blocked for c, Z gets d and blocked for a. Thus it will lead to deadlock. Similarly one can figure out that for B) completion order is Z,X then Y. This question is duplicate of http://geeksquiz.com/operating-systems-process-management-question-8/
 Question 17
Which of the following statements is/are FALSE?
1. For every non-deterministic Turing machine,
there exists an equivalent deterministic Turing machine.
2. Turing recognizable languages are closed under union
and complementation.
3. Turing decidable languages are closed under intersection
and complementation.
4. Turing recognizable languages are closed under union
and intersection. 
 A 1 and 4 only B 1 and 3 only C 2 only D 3 only
GATE CS 2013    Recursively enumerable sets and Turing machines
Discuss it

Question 17 Explanation:
A recognizer of a language is a machine that recognizes that language. A decider of a language is a machine that decides that language. Both types of machine halt in the Accept state on strings that are in the language A Decider also halts if the string is not in the language A Recogizer MAY or MAY NOT halt on strings that are not in the language On all input: A Decider MUST halt (in Accept or Reject state) A Recogizer MAY or MAY NOT halt on some strings (Q: Which ones?) A language is Turing-decidable (or decidable) if some Turing machine decides it. Aka Recursive Language. A language is Turing-recognizable if some Turing machine recognizes it. Aka Recursively Enumerable Language. Source: http://www.radford.edu/~nokie/classes/420/Chap3-Langs.html Recursive (Turing Decidable) languages are closed under following Kleene star, concatenation, union, intersection, complement and set difference. Recursively enumerable language are closed under Kleene star, concatenation, union, intersection. They are NOT closed under complement or set difference.
 Question 18
Which of the following statements are TRUE?
1. The problem of determining whether there exists
a cycle in an undirected graph is in P.
2. The problem of determining whether there exists
a cycle in an undirected graph is in NP.
3. If a problem A is NP-Complete, there exists a
non-deterministic polynomial time algorithm to solve A. 
 A 1, 2 and 3 B 1 and 2 only C 2 and 3 only D 1 and 3 only
NP Complete    GATE CS 2013
Discuss it

Question 18 Explanation:
1. We can either use BFS or DFS to find whether there is a cycle in an undirected graph. For example, see DFS based implementation to detect cycle in an undirected graph. The time complexity is O(V+E) which is polynomial. 2. If a problem is in P, then it is definitely in NP (can be verified in polynomial time). See NP-Completeness 3. True. See See NP-Completeness
 Question 19
What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?
 A A B B C C D D
GATE CS 2013
Discuss it

Question 19 Explanation:
Time complexity of Bellman-Ford algorithm is O(VE) where V is number of vertices and E is number of edges. For a complete graph with n vertices, V = n, E = O(n^2). So overall time complexity becomes O(n^3)
 Question 20
In a k-way set associative cache, the cache is divided into v sets, each of which consists of k lines. The lines of a set are placed in sequence one after another. The lines in set s are sequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards. The main memory block numbered j must be mapped to any one of the cache lines from.
 A (j mod v) * k to (j mod v) * k + (k-1) B (j mod v) to (j mod v) + (k-1) C (j mod k) to (j mod k) + (v-1) D (j mod k) * v to (j mod k) * v + (v-1)
GATE CS 2013    Computer Organization and Architecture
Discuss it

Question 20 Explanation:
Number of sets in cache = v. So, main memory block j will be mapped to set (j mod v), which will be any one of the cache lines from (j mod v) * k to (j mod v) * k + (k-1). (Associativity plays no role in mapping- k-way associativity means there are k spaces for a block and hence reduces the chances of replacement.)
 Question 21
Which one of the following expressions does NOT represent exclusive NOR of x and y?
 A xy + x' y' B x ^ y' where ^ is XOR C x' ^ y where ^ is XOR D x' ^ y' where ^ is XOR
GATE CS 2013    Digital Logic & Number representation
Discuss it

Question 21 Explanation:
It is a simple De Morgan's laws question.
 Question 22
Which one of the following functions is continuous at x = 3?
 A A B B C C D D
GATE CS 2013    Numerical Methods and Calculus
Discuss it

Question 22 Explanation:
A function is continuous at some point c, Value of f(x) defined for x > c = Value of f(x) defined for x < c = Value of f(x) defined for x = c All values are 2 in option A
 Question 23
Function f is known at the following points:
 A 8.983 B 9.003 C 9.017 D 9.045
GATE CS 2013    Numerical Methods and Calculus
Discuss it

Question 23 Explanation:
Since the intervals are uniform, apply the uniform grid formula of trapezoidal rule. This solution is contributed by Anil Saikrishna Devarasetty
 Question 24
Consider an undirected random graph of eight vertices. The probability that there is an edge between a pair of vertices is 1/2. What is the expected number of unordered cycles of length three?
 A 1/8 B 1 C 7 D 8
GATE CS 2013    Graph Theory
Discuss it

Question 24 Explanation:
 Question 25
Which of the following statements is/are TRUE for undirected graphs?
P: Number of odd degree vertices is even.
Q: Sum of degrees of all vertices is even. 
 A P only B Q only C Both P and Q D Neither P nor Q
GATE CS 2013    Graph Theory
Discuss it

Question 25 Explanation:
 Question 26
The line graph L(G) of a simple graph G is defined as follows: · There is exactly one vertex v(e) in L(G) for each edge e in G. · For any two edges e and e' in G, L(G) has an edge between v(e) and v(e'), if and only if e and e'are incident with the same vertex in G. Which of the following statements is/are TRUE?
(P) The line graph of a cycle is a cycle.
(Q) The line graph of a clique is a clique.
(R) The line graph of a planar graph is planar.
(S) The line graph of a tree is a tree. 
 A P only B P and R only C R only D P, Q and S only
GATE CS 2013    Graph Theory
Discuss it

Question 26 Explanation:
 Question 27
What is the logical translation of the following statement?
  "None of my friends are perfect."
 A A B B C C D D
GATE CS 2013    Propositional and First Order Logic.
Discuss it

Question 27 Explanation:
F(x) ==> x is my friend
P(x) ==> x is perfect

A. There exist some friends which are not perfect

B. There are some people who are not my friend and are perfect

C. There exist some people who are not my friend and are not perfect.

D. There doesn't exist any person who is my friend and perfect 
 Question 28
Consider the following sequence of micro-operations.
     MBR ← PC
MAR ← X
PC ← Y
Memory ← MBR
Which one of the following is a possible operation performed by this sequence?
 A Instruction fetch B Operand fetch C Conditional branch D Initiation of interrupt service
GATE CS 2013    Computer Organization and Architecture
Discuss it

Question 28 Explanation:
MBR - Memory Buffer Register ( that stores the data being transferred to and from the immediate access store) MAR - Memory Address Register ( that holds the memory location of data that needs to be accessed.) PC - Program Counter ( It contains the address of the instruction being executed at the current time ) The 1st instruction places the value of PC into MBR The 2nd instruction places an address X into MAR. The 3rd instruction places an address Y into PC. The 4th instruction places the value of MBR ( which was the old PC value) into Memory. Now it can be seen from the 1st and the 4th instructions, that the control flow was not sequential and the value of PC was stored in the memory, so that the control can again come back to the address where it left the execution. This behavior is seen in the case of interrupt handling. And here X can be the address of the location in the memory which contains the beginning address of Interrupt service routine. And Y can be the beginning address of Interrupt service routine. In case of conditional branch (as for option C ) only PC is updated with the target address and there is no need to store the old PC value into the memory. And in the case of Instruction fetch and operand fetch ( as for option A and B), PC value is not stored anywhere else. Hence option D.
 Question 29
Consider a hard disk with 16 recording surfaces (0-15) having 16384 cylinders (0-16383) and each cylinder contains 64 sectors (0-63). Data storage capacity in each sector is 512 bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., surface no., sector no.> . A file of size 42797 KB is stored in the disk and the starting disk location of the file is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
 A 1281 B 1282 C 1283 D 1284
Input Output Systems    GATE CS 2013
Discuss it

Question 29 Explanation:
42797KB will take 85512 sectors (42797*1024 bytes / 512 bytes)

Since there are 64 sectors per surface, 85512/64 = 1337.406
sectors are required, so we take 1338 sectors these sectors are
distributed among 16 surfaces, so 1338/16 = 83.58 cylinders will be
required.

So the final ans will be 84+1200 = 1284.

one more fact to be noted is that the file occupies 83.58 cylinders,
but the 0.58 cannot be accommodated in the first one (the file storage
starts from <1200,9,40>). Hence, the file will be extended to 194
(85594-85400) more bytes of cylinder 1284. 
 Question 30
The number of elements that can be sorted in (log n) time using heap sort is
 A A B B C C D D
GATE CS 2013
Discuss it

Question 30 Explanation:
 Question 31
Consider the following function:
int unknown(int n) {
int i, j, k = 0;
for (i  = n/2; i <= n; i++)
for (j = 2; j <= n; j = j * 2)
k = k + n/2;
return k;
}

(A)
(B)
(C)
(D)
 A A B B C C D D
GATE CS 2013
Discuss it

Question 31 Explanation:
Here we have to tell the value of k returned not the time complexity.
for (i  = n/2; i <= n; i++)
for (j = 2; j <= n; j = j * 2)
k = k + n/2;
return k;

The outer loop runs n/2 times The inner loop runs logn times.(2^k = n => k = logn). Now looking at the value of k in inner loop, n is added to k, logn times as the inner loop is running logn times. Therefore the value of k after running the inner loop one time is n*logn. Therefore total time complexity is inner multiplied with outer loop complexity which (n for outer and nlogn for inner) n^2logn. See http://geeksquiz.com/algorithms-analysis-of-algorithms-question-5/ This solution is contributed by Parul Sharma.
 Question 32
Consider the following languages. Which one of the following statements is FALSE?
 A L2 is context-free. B L1 intersection L2 is context-free. C Complement of L2 is recursive. D Complement of L1 is context-free but not regular.
GATE CS 2013    Context free languages and Push-down automata
Discuss it

Question 32 Explanation:
(D) is false. L1 is regular, so its complement would also be regular. L1 is a regular language of the form 0^* 1^* 0^*. L2 on the other hand is a CFL as it can be derived from the following CFG L2 = { 0^p 1^q 0^r | p,q,r>0   And p notEqualTo r } S -> AC|CA C -> 0C0|B A -> 0A|0 B -> 1B|epsilon If coming up with a CFG for L2 is difficult, one can intuitively see that by reducing it to a simpler problem. L2 is very similar to a known CFL L3 = { a^m b^l | m notEqualTo n } (A) L2 is context free, which is true [CORRECT] (B) L1 intersection L2 is context free, which is again true because L1 is a regular language and L2 is a CFL. RL union CFL is always a CFL. Hence [CORRECT] (C) Complement of L2 is recursive, which is true due to the fact that complement of a CFL is CSL for sure (Context sensitive language), which in turn (CSL) is a subset of recursive languages. Hence [CORRECT] (D) Complement of L1 is context free but not regular, which is false due to closure laws of regular languages. Complement of a RL is always a RL. Hence [INCORRECT]   This solution is contributed by Vineet Purswani .
 Question 33
Consider the DFA given. Which of the following are FALSE?
1. Complement of L(A) is context-free.
2. L(A) = L((11*0+0)(0 + 1)*0*1*)
3. For the language accepted by A, A is the minimal DFA.
4. A accepts all strings over {0, 1} of length at least 2. 
 A 1 and 3 only B 2 and 4 only C 2 and 3 only D 3 and 4 only
GATE CS 2013    Regular languages and finite automata
Discuss it

Question 33 Explanation:
1 is true. L(A) is regular, its complement would also be regular. A regular language is also context free. 2 is true. 3 is false, the DFA can be minimized to two states. Where the second state is final state and we reach second state after a 0. 4 is clearly false as the DFA accepts a single 0.
 Question 34
A shared variable x, initialized to zero, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W and X reads x from memory, increments by one, stores it to memory, and then terminates. Each of the processes Y and Z reads x from memory, decrements by two, stores it to memory, and then terminates. Each process before reading x invokes the P operation (i.e., wait) on a counting semaphore S and invokes the V operation (i.e., signal) on the semaphore S after storing x to memory. Semaphore S is initialized to two. What is the maximum possible value of x after all processes complete execution?
 A -2 B -1 C 1 D 2
Process Management    GATE CS 2013
Discuss it

Question 34 Explanation:
Background Explanation: A critical section in which the process may be changing common variables, updating table, writing a file and perform another function. The important problem is that if one process is executing in its critical section, no other process is to be allowed to execute in its critical section. Each process much request permission to enter its critical section. A semaphore is a tool for synchronization and it is used to remove the critical section problem which is that no two processes can run simultaneously together so to remove this two signal operations are used named as wait and signal which is used to remove the mutual exclusion of the critical section. as an unsigned one of the most important synchronization primitives, because you can build many other Decrementing the semaphore is called acquiring or locking it, incrementing is called releasing or unlocking. Solution : Since initial value of semaphore is 2, two processes can enter critical section at a time- this is bad and we can see why. Say, X and Y be the processes.X increments x by 1 and Z decrements x by 2. Now, Z stores back and after this X stores back. So, final value of x is 1 and not -1 and two Signal operations make the semaphore value 2 again. So, now W and Z can also execute like this and the value of x can be 2 which is the maximum possible in any order of execution of the processes. (If the semaphore is initialized to 1, processed would execute correctly and we get the final value of x as -2.) Option (D) is the correct answer. Another Solution: Processes can run in many ways, below is one of the cases in which x attains max value Semaphore S is initialized to 2 Process W executes S=1, x=1 but it doesn't update the x variable. Then process Y executes S=0, it decrements x, now x= -2 and signal semaphore S=1 Now process Z executes s=0, x=-4, signal semaphore S=1 Now process W updates x=1, S=2 Then process X executes X=2 So correct option is D Another Solution: S is a counting semaphore initialized to 2 i.e., Two process can go inside a critical section protected by S. W, X read the variable, increment by 1 and write it back. Y, Z can read the variable, decrement by 2 and write it back. Whenever Y or Z runs the count gets decreased by 2. So, to have the maximum sum, we should copy the variable into one of the processes which increases the count, and at the same time the decrementing processed should run parallel, so that whatever they write back into memory can be overridden by incrementing process. So, in effect decrement would never happen.

Related Links: http://quiz.geeksforgeeks.org/process-synchronization-set-1/ http://geeksquiz.com/operating-systems-process-management-question-11/ for explanation This solution is contributed by Nitika Bansal
 Question 35
Consider the following relational schema.
    Students(rollno: integer, sname: string)
Courses(courseno: integer, cname: string)
Registration(rollno: integer, courseno: integer, percent: real)
Which of the following queries are equivalent to this query in English?
      "Find the distinct names of all students who score
more than 90% in the course numbered 107"
 A I, II, III and IV B I, II and III only C I, II and IV only D II, III and IV only
GATE CS 2013    ER and Relational Models
Discuss it

Question 35 Explanation:
Option A:

This is a SQL query expression. It first perform a cross product of Students
and Registration, then WHERE clause only keeps those rows in the cross product
set where the student is registered for course no 107, and percentage is > 90.
Then select distinct statement gives the distinct names of those students as the
result set.


Option B:

This is a relational algebra expression. It first perform a NATURAL JOIN
of Students and Registration (NATURAL JOIN implicitly joins on the basis
of common attribute, which here is rollno ), then the select operation( sigma)
keeps only those rows where the student is registered for courseno 107,
and percentage is > 90. And then the projection operation (pi) projects only
distinct student names from the set.

Note: Projection operation (pi) always gives the distinct result.

Option C:

This is a Tuple Relational Calculus (TRC) language expression,
It is not a procedural language (i.e. it only tells “what to do”,
not “how to do”). It just represents a declarative mathematical
expression.

Here T is a Tuple variable.

From left to right, it can be read like this, “It is a set of
tuples T, where, there exists a tuple S in Relation Students, and
there exist a tuple R in relation Registration, such that
S.rollno = R.rollno AND R.couseno = 107 AND R.percent > 90 AND
T.sname = S.sname”. And the schema of this result is (sname), i.e. each
tuple T will contain only student name, because only T.sname has been defined
in the expression.

As TRC is a mathematical expression, hence it is expected to give only distinct result set.

Option D:

This is a Domain Relational Calculus (DRC) language expression.
This is also not procedural. Here SN is a Domain Variable. It can be read
from left to right like this “The set of domain variable SN, where,
there exist a domain variable SR , and a domain variable Rp, such that,
SN and SR domain variables is in relation Students and SR,107,RP is a domain
variables set in relation Registration, AND RP > 90 “

Above, SN represents sname domain attribute in Students relation, SR
represents rollno domain attribute in Students relation, and RP represents
percentage domain attribute in Registration relation.
The schema for the result set is (SN), i.e. only student name.

As DRC is a mathematical expression, hence it is expected to
give only distinct result set.


 Question 36
Determine the maximum length of the cable (in km) for transmitting data at a rate of 500 Mbps in an Ethernet LAN with frames of size 10,000 bits. Assume the signal speed in the cable to be 2,00,000 km/s.
 A 1 B 2 C 2.5 D 5
Data Link Layer    GATE CS 2013
Discuss it

Question 36 Explanation:
Data should be transmitted at the rate of 500 Mbps.
Transmission Time >= 2*Propagation Time
=> 10000/(500*1000000) <= 2*length/200000
=> lenght = 2km (max)
so, answer will be: (B) 2km 
 Question 37
In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are
 A Last fragment, 2400 and 2789 B First fragment, 2400 and 2759 C Last fragment, 2400 and 2759 D Middle fragment, 300 and 689
GATE CS 2013    Network Layer
Discuss it

Question 37 Explanation:
M = 0 indicates that this packet is the last packet among all fragments of original packet. So the answer is either A or C. It is given that HLEN field is 10. Header length is number of 32 bit words. So header length = 10 * 4 = 40 Also, given that total length = 400. Total length indicates total length of the packet including header. So, packet length excluding header = 400 - 40 = 360 Last byte address = 2400 + 360 - 1 = 2759 (Because numbering starts from 0)
 Question 38
The following figure represents access graphs of two modules M1 and M2. The filled circles represent methods and the unfilled circles represent attributes. If method m is moved to module M2 keeping the attributes where they are, what can we say about the average cohesion and coupling between modules in the system of two modules?
 A There is no change. B Average cohesion goes up but coupling is reduced. C Average cohesion goes down and coupling also reduces. D Average cohesion and coupling increase.
GATE CS 2013    Software Engineering
Discuss it

Question 38 Explanation:
Answer is "No Change" Cohesion refers to the degree to which the elements of a module belong together. Coupling is the manner and degree of interdependence between software modules
Coupling between M1 and M2 = (Number of external links) /
(Number of modules)
= 2/2
= 1

Cohesion of a module = (Number of internal links) /
(Number of methods)

Cohesion of M1 = 8/4 = 2
Cohesion of M2 = 6/3 = 2

After moving method m to M2, we get following

Coupling = 2/2 = 1
Cohesion of M1 = 6/3 = 2
Cohesion of M2 = 8/4 = 2 
 Question 39
A certain computation generates two arrays a and b such that a[i]=f(i) for 0 ≤ i < n and b[i]=g(a[i]) for 0 ≤ i < n. Suppose this computation is decomposed into two concurrent processes X and Y such that X computes the array a and Y computes the array b. The processes employ two binary semaphores R and S, both initialized to zero. The array a is shared by the two processes. The structures of the processes are shown below.
Process X:                         Process Y:
private i;                         private i;
for (i=0; i < n; i++) {            for (i=0; i < n; i++) {
a[i] = f(i);                       EntryY(R, S);
ExitX(R, S);                       b[i]=g(a[i]);
}                                 }
Which one of the following represents the CORRECT implementations of ExitX and EntryY? (A)
ExitX(R, S) {
P(R);
V(S);
}

EntryY (R, S) {
P(S);
V(R);
}
(B)
ExitX(R, S) {
V(R);
V(S);
}

EntryY(R, S) {
P(R);
P(S);
}
(C)
ExitX(R, S) {
P(S);
V(R);
}
EntryY(R, S) {
V(S);
P(R);
}
(D)
ExitX(R, S) {
V(R);
P(S);
}
EntryY(R, S) {
V(S);
P(R);
}
 A A B B C C D D
Process Management    GATE CS 2013
Discuss it

Question 39 Explanation:
The purpose here is neither the deadlock should occur
nor the binary semaphores be assigned value greater
than one.
B can increase value of semaphores b/w 1 to n
D may increase the value of semaphore R and S to
2 in some cases
See http://geeksquiz.com/operating-systems-process-management-question-13/
 Question 40
Consider the following two sets of LR(1) items of an LR(1) grammar.
   X -> c.X, c/d
X -> .cX, c/d
X -> .d, c/d
X -> c.X, $X -> .cX,$
X -> .d, $ Which of the following statements related to merging of the two sets in the corresponding LALR parser is/are FALSE? 1. Cannot be merged since look aheads are different. 2. Can be merged but will result in S-R conflict. 3. Can be merged but will result in R-R conflict. 4. Cannot be merged since goto on c will lead to two different sets.  A 1 only B 2 only C 1 and 4 only D 1, 2, 3, and 4 GATE CS 2013 Parsing and Syntax directed translation Discuss it Question 40 Explanation: The given two LR(1) set of items are :  X -> c.X, c/d X -> .cX, c/d X -> .d, c/d and X -> c.X,$
X -> .cX, $X -> .d,$ 
The symbols/terminals after the comma are Look-Ahead symbols. These are the sets of LR(1) ( LR(1) is also called CLR(1) ) items. The LALR(1) parser combines those set of LR(1) items which are identical with respect to their 1st component but different with respect to their 2nd component. In a production rule of a LR(1) set of items, ( A -> B , c ) , A->B is the 1st component , and the Look-Ahead set of symbols, which is c here, is the second component. Now we can see that in the sets given, 1st component of the corresponding production rule is identical in both sets, and they only differ in 2nd component ( i.e. their look-ahead symbols) hence we can combine these sets to make a a single set which would be :

X -> c.X, c/d/$X -> .cX, c/d/$
X -> .d, c/d/\$
This is done to reduce the total number of parser states. Now we can check the statements given. Statement 1 : The statement is false, as merging has been done because 2nd components i.e. look-ahead were different. Statement 2 : In the merged set, we can't see any Shift-Reduce conflict ( because no reduction even possible, reduction would be possible when a production of form P -> q. is present) Statement 3 : In the merged set, we can't see any Reduce-Reduce conflict ( same reason as above, no reduction even possible, so no chances of R-R conflict ) Statement 4: This statement is also wrong, because goto is carried on Non-Terminals symbols, not on terminal symbols, and c is a terminal symbol. Thus, all statements are wrong, hence option D.
 Question 41
Which of the following is/are undecidable?
 A 3 only B 3 and 4 only C 1, 2 and 3 only D 2 and 3 only
GATE CS 2013    Undecidability
Discuss it

Question 41 Explanation:
• First is Emptiness for CFG.
• Second is everything for CFG.
• Third is Regularity for REC
• Fourth is equivalence for regular.
Second and third will be undecidable
 Question 42
What is the return value of f(p,p), if the value of p is initialized to 5 before the call? Note that the first parameter is passed by reference, whereas the second parameter is passed by value.
int f(int &x, int c) {
c = c - 1;
if (c==0) return 1;
x = x + 1;
return f(x,c) * x;
}
 A 3024 B 6561 C 55440 D 161051
GATE CS 2013
Discuss it

Question 42 Explanation:
 Question 43
The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal sequence of the same tree?
 A 10, 20, 15, 23, 25, 35, 42, 39, 30 B 15, 10, 25, 23, 20, 42, 35, 39, 30 C 15, 20, 10, 23, 25, 42, 35, 39, 30 D 15, 10, 23, 25, 20, 35, 42, 39, 30
GATE CS 2013
Discuss it

Question 43 Explanation:
In order to construct a binary tree from given traversal sequences, one of the traversal sequence must be Inorder. The other traversal sequence can be either Preorder or Postorder. We know that the Inorder traversal of Binary Search Tree is always in ascending order so the Inorder Traversal would be the ascending order of given Preorder traversal i.e 10, 15, 20, 23, 25, 30, 35, 39, 42.Now we have to construct a tree from given Inorder and Preorder traversals. References: http://www.geeksforgeeks.org/construct-tree-from-given-inorder-and-preorder-traversal/ http://www.geeksforgeeks.org/data-structures-and-algorithms-set-31/ This solution is contributed by Parul sharma.
 Question 44
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter.
MultiDequeue(Q){
m = k
while (Q is not empty and m  > 0) {
Dequeue(Q)
m = m - 1
}
}
What is the worst case time complexity of a sequence of n MultiDequeue() operations on an initially empty queue? (GATE CS 2013)
(A)
(B)
(C)
(D)

 A A B B C C D D
Queue    GATE CS 2013
Discuss it

Question 44 Explanation:
 Question 45
Consider an instruction pipeline with five stages without any branch prediction: Fetch Instruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) and Write Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 ns and 6 ns, respectively. There are intermediate storage buffers after each stage and the delay of each buffer is 1 ns. A program consisting of 12 instructions I1, I2, I3, …, I12 is executed in this pipelined processor. Instruction I4 is the only branch instruction and its branch target is I9. If the branch is taken during the execution of this program, the time (in ns) needed to complete the program is
 A 132 B 165 C 176 D 328
GATE CS 2013    Computer Organization and Architecture
Discuss it

Question 45 Explanation:
Pipeline will have to be stalled till Ei stage of l4 completes,
as Ei stage will tell whether to take branch or not.

After that l4(WO) and l9(Fi) can go in parallel and later the
following instructions.
So, till l4(Ei) completes : 7 cycles * (10 + 1 ) ns = 77ns
From l4(WO) or l9(Fi) to l12(WO) : 8 cycles * (10 + 1)ns = 88ns
Total = 77 + 88 = 165 ns
 Question 46
A RAM chip has a capacity of 1024 words of 8 bits each (1K × 8). The number of 2 × 4 decoders with enable line needed to construct a 16K × 16 RAM from 1K × 8 RAM is
 A 4 B 5 C 6 D 7
GATE CS 2013    Computer Organization and Architecture
Discuss it

Question 46 Explanation:
RAM chip size = 1k ×8[1024 words of 8 bits each]
RAM to construct =16k ×16
Number of chips required = (16k x 16)/ ( 1k x 8)
= (16k x 2)
[16 chips vertically with each having 2 chips
horizontally]
So to select one chip out of 16 vertical chips,
we need 4 x 16 decoder.

Available decoder is  2 x 4 decoder
To be constructed is 4 x 16 decoder

Hence 4 + 1 = 5 decoders are required. 
 Question 47
 A A B B C C D D
GATE CS 2013    Propositional and First Order Logic.
Discuss it

Question 47 Explanation:
Given statement is : ¬ ∃ x ( ∀y(α) ∧ ∀z(β) )
where ¬ is a negation operator, ∃ is Existential Quantifier with the
meaning of "there Exists", and ∀ is a Universal Quantifier
with the meaning   " for all " , and α, β can be treated as predicates.

here we can apply some of the standard
results of Propositional and 1st order logic on the given statement,
which are as follows :

[ Result 1 : ¬(∀x P(x)) <=> ∃ x¬P(x), i.e. negation
of "for all" gives "there exists" and negation also gets applied to scope of
quantifier, which is P(x) here. And also negation of "there exists" gives "for all",
and negation also gets applied to scope of quantifier  ]

[ Result 2 :  ¬ ( A ∧ B ) = ( ¬A  ∨ ¬B )  ]

[ Result 3 :  ¬P  ∨ Q <=> P -> Q ]

[ Result 4 : If P ->Q, then by Result of Contrapositive,  ¬Q -> ¬P  ]


Now we need to use these results as shown below:


¬ ∃ x ( ∀y(α) ∧ ∀z(β) )                 [ Given ]

=> ∀ x (¬∀y(α) ∨ ¬∀z(β) )          [ after applying Result 1 & Result 2 ]

=> ∀ x ( ∀y(α) -> ¬∀z(β) )     [after applying Result 3 ]

=> ∀ x ( ∀y(α) -> ∃z(¬β) )      [after applying Result 1]

which is same as the statement C.

Hence the Given Statement is logically Equivalent
to the statement C.

Now, we can also prove that given statement is logically equivalent to the statement
in option  B.

Let's see how !

The above derived statement is :

∀ x ( ∀y(α) -> ∃z(¬β) )

Now this statement can be written as (or equivalent to) :

=> ∀ x ( ∀z(β) -> ∃y(¬α) )     [after applying Result 4 ]

And this statement is same as statement B.
Hence the Given statement is also logically equivalent
to the statement B.

So, we can conclude that the Given statement is NOT logically equivalent to the
statements A and D.

Hence, the correct answer is Option A and Option D. But in GATE 2013, marks were given to all for this question.
 Question 48
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have atmost two source operands and one destination operand. Assume that all variables are dead after this code segment.
   c = a + b;
d = c * a;
e = c + a;
x = c * c;
if (x > a) {
y = a * a;
}
else {
d = d * d;
e = e * e;
}
Suppose the instruction set architecture of the processor has only two registers. The only allowed compiler optimization is code motion, which moves statements from one place to another while preserving correctness. What is the minimum number of spills to memory in the compiled code?
 A 0 B 1 C 2 D 3
GATE CS 2013    Computer Organization and Architecture
Discuss it

Question 48 Explanation:
r1......r2
a.......b......c = a + b
a.......c......x = c * c
a.......x......but we will have to store c in mem as we don't know if x > a
................. or not
y.......x......y = a * a
choosing the best case of x > a , min spills = 1 
 Question 49
Consider the same data as above question. What is the minimum number of registers needed in the instruction set architecture of the processor to compile this code segment without any spill to memory? Do not apply any optimization other than optimizing register allocation.
 A 3 B 4 C 5 D 6
GATE CS 2013    Computer Organization and Architecture
Discuss it

Question 49 Explanation:
Note that for solving the above problem we are not allowed for code motion. So, we will start analyzing the code line by line and determine how many registers will be required to execute the above code snippet. Assuming the registers are numbered R1, R2, R3 and R4. The analysis has been shown in the table below So from the above analysis we can conclude that we will need minimum 4 registers to execute the above code snippet. This explanation has been contributed by Namita Singh.
 Question 50
The procedure given below is required to find and replace certain characters inside an input character string supplied in array A. The characters to be replaced are supplied in array oldc, while their respective replacement characters are supplied in array newc. Array A has a fixed length of five characters, while arrays oldc and newc contain three characters each. However, the procedure is flawed
void find_and_replace(char *A, char *oldc, char *newc) {
for (int i = 0; i < 5; i++)
for (int j = 0; j < 3; j++)
if (A[i] == oldc[j]) A[i] = newc[j];
}
The procedure is tested with the following four test cases (1) oldc = "abc", newc = "dab" (2) oldc = "cde", newc = "bcd" (3) oldc = "bca", newc = "cda" (4) oldc = "abc", newc = "bac" The tester now tests the program on all input strings of length five consisting of characters ‘a’, ‘b’, ‘c’, ‘d’ and ‘e’ with duplicates allowed. If the tester carries out this testing with the four test cases given above, how many test cases will be able to capture the flaw?
 A Only one B Only Two C Only Three D All Four
GATE CS 2013
Discuss it

Question 50 Explanation:
 Question 51
In the above question, if array A is made to hold the string “abcde”, which of the above four test cases will be successful in exposing the flaw in this procedure?
 A None B 2 Only C 3 and 4 only D 4 only
GATE CS 2013
Discuss it

Question 51 Explanation:
 Question 52
A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table (T1), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes. What is the size of a page in KB in this computer?
 A 2 B 4 C 8 D 16
GATE CS 2013
Discuss it

Question 52 Explanation:
 Question 53
Consider the same data as above question. What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer?
 A 2 B 4 C 8 D 16
GATE CS 2013
Discuss it

Question 53 Explanation:
 Question 54
Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values. F = {CH -> G, A -> BC, B -> CFH, E -> A, F -> EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R. How many candidate keys does the relation R have?
 A 3 B 4 C 5 D 6
GATE CS 2013    Database Design(Normal Forms)
Discuss it

Question 54 Explanation:
A+ is ABCEFGH which is all attributes except D. B+ is also ABCEFGH which is all attributes except D. E+ is also ABCEFGH which is all attributes except D. F+ is also ABCEFGH which is all attributes except D. So there are total 4 candidate keys AD, BD, ED and FD
 Question 55
Consider the FDs given in above question. The relation R is
 A in 1NF, but not in 2NF. B in 2NF, but not in 3NF. C in 3NF, but not in BCNF. D in BCNF
GATE CS 2013    Database Design(Normal Forms)
Discuss it

Question 55 Explanation:
The table is not in 2nd Normal Form as the non-prime attributes are dependent on subsets of candidate keys. The candidate keys are AD, BD, ED and FD. In all of the following FDs, the non-prime attributes are dependent on a partial candidate key. A -> BC B -> CFH F -> EG
 Question 56
Which one of the following options is the closest in meaning to the word given below? Nadir
 A Highest B Lowest C Medium D Integration
GATE CS 2013    English
Discuss it

Question 56 Explanation:
Nadir means below 1. Astronomy A point on the celestial sphere directly below the observer, diametrically opposite the zenith. 2. The lowest point: the nadir of their fortunes. Source: http://www.thefreedictionary.com/nadir
 Question 57
Complete the sentence: Universalism is to particularism as diffuseness is to _________________
 A specificity B neutrality C generality D adaptation
GATE CS 2013    English
Discuss it

Question 57 Explanation:
 Question 58
What will be the maximum sum of 44, 42, 40, ...... ?
 A 502 B 504 C 506 D 500
GATE CS 2013    General Aptitude
Discuss it

Question 58 Explanation:
This is a decreasing arithmetic progression with difference as 2. The series is 44, 42, 40 ...... 0, -2, -4...... The sum would be maximum if we consider the series till 0 or 2. So sum would be 506 using the AP Sum formula given here
 Question 59
Were you a bird, you ______________ in the sky.
 A would fly B shall fly C should fly D shall have flown
GATE CS 2013    English
Discuss it

Question 59 Explanation:
Were you a bird, you would fly in the sky. See http://grammar.ccc.commnet.edu/grammar/conditional2.htm
 Question 60
Choose the grammatically INCORRECT sentence:
 A He is of Asian origin. B They belonged to Africa. C She is an European. D They migrated from India to Australia.
GATE CS 2013    English
Discuss it

Question 60 Explanation:
The correct sentence is "She is a European." 'an' applies to those words which get pronounced with a,e,i,o,u. Here pronunciation is "Uropean" ( E-silent) Hence a European.
 Question 61
Find the sum of the expression
 A 7 B 8 C 9 D 10
GATE CS 2013    General Aptitude
Discuss it

Question 61 Explanation:
The Series can be re-written as (√2-√1)/(√2+√1)(√2-√1) + (√3-√2)/(√2+√2)(√3-√2) + .......... which simplifies to (√2-√1) + (√3-√2) + ..... (√81-√80) which again simplifies to √81 - √1 which is 8
 Question 62
Out of all the 2-digit integers between 1 and 100, a 2-digit number has to be selected at random. What is the probability that the selected number is not divisible by 7?
 A 13/90 B 12/90 C 78/90 D 77/90
GATE CS 2013    Probability
Discuss it

Question 62 Explanation:
There are total 90 two digit numbers, out of them 13 are divisible by 7
 Question 63
After several defeats in wars, Robert Bruce went in exile and wanted to commit suicide. Just before committing suicide, he came across a spider attempting tirelessly to have its net. Time and again, the spider failed but that did not deter it to refrain from making attempts. Such attempts by the spider made Bruce curious. Thus, Bruce started observing the near-impossible goal of the spider to have the net. Ultimately, the spider succeeded in having its net despite several failures. Such act of the spider encouraged Bruce not to commit suicide. And then, Bruce went back again and won many a battle, and the rest is history. Which one of the following assertions is best supported by the above information?
 A Failure is the pillar of success. B Honesty is the best policy. C Life begins and ends with adventures. D No adversity justifies giving up hope.
GATE CS 2013    English
Discuss it

Question 63 Explanation:
None of A, B and C make sense. Only option D "No adversity justifies giving up hope" is related to the given information.
 Question 64
A tourist covers half of his journey by train at 60 km/h, half of the remainder by bus at 30 km/h and the rest by cycle at 10 km/h. The average speed of the tourist in km/h during his entire journey is
 A 36 B 30 C 24 D 18
GATE CS 2013    General Aptitude
Discuss it

Question 64 Explanation:
Let total distance be D Total Time = D(1/2*60 + 1/4*30 + 1/4*10) = D/24 Average Speed = Total distance / Total time = 24
 Question 65
The current erection cost of a structure is Rs. 13,200. If the labour wages per day increase by 1/5 of the current wages and the working hours decrease by 1/24 of the current period, then the new cost of erection in Rs. is
 A 16,500 B 15,180 C 11,000 D 10,120
GATE CS 2013
Discuss it

Question 65 Explanation:
Cost is proportional to wages per day and number of hours. Wages are increased by 1/5 and working hours are decreased by 1/24. So the cost becomes (current cost)*(1+1/5)*(1-/24) = 13200*(6/5)*(23/24) = 15180
There are 65 questions to complete.

## GATE CS Corner

See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.