Question 1 |

Which of the following options is the closest in meaning to the phrase underlined in the sentence
below?

*It is fascinating to see life forms cope with varied environmental conditions.*adopt to | |

adapt to | |

adept in | |

accept with |

**English**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 1 Explanation:

In the above phrase, underlined part is *cope with*.
"Cope" - It's a verb.
Meaning - deal effectively with some difficulty.
Example Sentence - "his ability to cope with stress"
"adopt" - verb.
Meaning - choose to take up or follow (an idea, method, or course of action).
Sentence - "this approach has been adopted by many big banks"
"adapt" - verb.
Meaning - become adjusted to new conditions.
sentence -"a large organization can be slow to adapt to change"
"adept" - adjective
Meaning - very skilled or proficient at something.
Sentence - "she is adept at cutting through red tape"
"accept" - verb
Meaning - consent to receive or undertake (something offered).
Sentence - "he accepted a pen as a present"
Hence, only "adapt" goes right with the phrase described in the question.

Question 2 |

Choose the most appropriate word from the options given below to complete the following sentence.
He could not understand the judges awarding her the first prize,
because he thought that her performance was quite __________.

superb | |

medium | |

mediocre | |

exhilarating |

**English**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 2 Explanation:

Here, superb and exhilarating would imply that the performance was brilliant. But, the fact that he could not understand why she got awarded the first prize indicates that her performance was not that amazing in his opinion.

**So, A and D are incorrect.**Medium is more used as a noun, and denoted intermediate in quality, value, etc.**So, B is incorrect**Mediocre is used as an adjective (to represent quality) and means low in performance, i.e., normal and not extraordinary and**C is the correct choice.**Question 3 |

In a press meet on the recent scam, the minister said, "The buck stops here". What did the minister convey by the statement?

He wants all the money | |

He will return the money | |

He will assume final responsibility | |

He will resist all enquiries |

**English**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 3 Explanation:

Question 4 |

IF (z + 1/z)

^{2}= 98, compute (z^{2}+ 1/z^{2})96 | |

99 | |

100 | |

94 |

**General Aptitude**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 4 Explanation:

(z + 1/z)

^{2}= (z^{2}+ 1/z^{2}) + 2*z*1/z (z^{2}+ 1/z^{2}) = (z + 1/z)^{2}- 2 = 98 - 2 = 96Question 5 |

The roots of ax

^{2}+ bx + c are real and positive. a, b and c are real. Then ax^{2}+ b|x| + c has no roots | |

2 real roots | |

3 real roots | |

4 real roots |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 5 Explanation:

The second equation has both +vs and -ve values of roots of first equation as root.

Question 6 |

The Palghat Gap (or Palakkad Gap), a region about 30 km wide in the southern part of the Western Ghats in India, is lower than the hilly terrain to its north and south. The exact reasons for the formation of this gap are not clear. It results in the neighbouring regions of Tamil Nadu getting more rainfall from the South West monsoon and the neighbouring regions of Kerala having higher summer temperatures. What can be inferred from this passage?

The Palghat gap is caused by high rainfall and high temperatures in southern Tamil Nadu and Kerala | |

The regions in Tamil Nadu and Kerala that are near the Palghat Gap are low-lying | |

The low terrain of the Palghat Gap has a significant impact on weather patterns in neighbouring parts of Tamil Nadu and Kerala | |

Higher summer temperatures result in higher rainfall near the Palghat Gap area |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 6 Explanation:

Here the passage is asking, " what can be inferred ? ", i.e. it's asking about the hidden conclusion of the passage.
Why not Option A ? - because it is clearly given in the passage : "The exact reasons for the formation of this gap are not clear ".
Why not Option B ? - because the passage no where talks about the low-lying regions of Kerala and Tamil Nadu near the Palghat Gap.
Why not option D ? - Because the passage only says : "neighbouring regions of Kerala having higher summer temperatures", it doesn't say that this high temperature results in rainfall.
Note: We have to think and conclude only from what is given in the passage. We can't make our own conclusions.
Why Option C ? - because the passage says : " It results in the neighbouring regions of Tamil Nadu getting more rainfall from the South West monsoon and the neighbouring regions of Kerala having higher summer temperatures",
hence we can conclude here that the weather is getting affected due to the Gap.
Therefore, option C is correct.

Question 7 |

Geneticists say that they are very close to confirming the genetic roots of psychiatric illnesses such as depression and schizophrenia, and consequently, that doctors will be able to eradicate these diseases through early identification and gene therapy.
On which of the following assumptions does the statement above rely?

Strategies are now available for eliminating psychiatric illnesses
| |

Certain psychiatric illnesses have a genetic basis | |

All human diseases can be traced back to genes and how they are expressed | |

In the future, genetics will become the only relevant field for identifying psychiatric illnesses |

**General Aptitude**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 7 Explanation:

- A says that strategies are
**now**available for eliminating psychiatric illnesses but it is mentioned in the very first line that the geneticists are very close but the strategy is not available till now.**So, A is incorrect**. - The given data says that the geneticists are working on the genetic roots of psychiatric illnesses such as depression and schizophrenia, which implies that these two diseases have genetic basis.
**Thus, B is the correct option.** - C says that
**all**human diseases can be traced back to genes and how they are expressed, but the data given in the question talks about psychiatric illnesses such as depression and schizophrenia only.**So, C is also incorrect.** - D says that in future, genetics will be the
**only**relevant field for identifying psychiatric illnesses, which cannot be inferred from the given data.**So, D is also incorrect.**

**So, B is the correct option**

Question 8 |

Round-trip tickets to a tourist destination are eligible for a discount of 10% on the total fare. In addition, groups of 4 or more get a discount of 5% on the total fare. If the one way single person fare is Rs 100, a group of 5 tourists purchasing round-trip tickets will be charged Rs _________.

850 | |

900 | |

800 | |

1000 |

**General Aptitude**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 8 Explanation:

One way single person fare is 100. Therefore 2 way is 200. For 5 persons it is 200 x 5 = 1000 Now 1st discount is of 10 % on total fare, which is 100( 10 % of 1000). And as the group is of more than 4, an additional discount of 5 % on total fare, which is 50( 5 % of 1000). Hence total discount is equal to 100 + 50 = 150. Therefore tickets are charged at Rs 1000 - 150 = 850.

Question 9 |

In a survey, 300 respondents were asked whether they own a vehicle or not. If yes, they were further asked to mention whether they own a car or scooter or both. The irresponses are tabulated below.
What percent of respondents do not own a scooter?

48 | |

40 | |

50 | |

45 |

**General Aptitude**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 9 Explanation:

No. of respondents do not own scooter = No. of persons who have car alone + No. of persons who don't have both. In men, 40 + 20 = 60 and In women 34 + 50 = 84. Total 60 + 84 = 144 . Now the percentage is, (144/300) *100 = 48

Question 10 |

When a point inside of a tetrahedron (a solid with four triangular surfaces) is connected by straight lines to its corners, how many (new) internal planes are created with these lines? _____________

6 | |

8 | |

4 | |

10 |

**General Aptitude**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 10 Explanation:

The Tetrahedron has 4 triangular surfaces with 4 vertices/corners ( say A,B,C and D) as can be seen here. http://www.sjsu.edu/faculty/wa...
Now if you take a point inside a tetrahedron (suppose O) and connect it with any two of its corners which are nothing but vertices( suppose A and B), you will get 1 internal plane as OAB.
So we can see from here that, no of new internal planes = no of different pair of corners or vertices
Similarly you can take any other 2 corners like (A,C) or (A,D) or (B,C) or (B,D) or (C,D),
hence total possible pair of corners are 6. Therefore 6 new internal planes possible.
We could also calculate the possible corners by using combinations formula,
which is nCr, i.e. no of ways to select a combination of r things from a given set of n things.
here n = 4 ( as total 4 vertices, A,B,C and D)
and r =2 ( as we need two corners at a time)
Thus, 4C2 = 6.

Question 11 |

Consider the statement

“Not all that glitters is gold”Predicate

*glitters(x)*is true if x glitters and predicate*gold(x)*is true if x is gold. Which one of the following logical formulae represents the above statement?A | |

B | |

C | |

D |

**English**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 11 Explanation:

The statement “Not all that glitters is gold” can be expressed as follows :

¬(∀x(glitters(x)⇒gold(x)) ... (1)

Where ∀x(glitters(x)⇒gold(x) refers that all glitters is gold. Now ,

∃x¬(glitters(x)⇒gold(x)) ... (2) , Since we know ¬∀x() = ∃x¬()

(Where ∀ refers to -> All and ∃x refers to -> There exists some).

As we know, A⇒B is true only in the case that either A is false or B is true. It can also defined in the other way :

A⇒B=¬A∨B (negationA or B ) ... (3)

From equation (2) and (3) , we have ∃x(¬(¬glitters(x)∨gold(x))

⇒∃x(glitters(x)∧¬gold(x)) ... (4) , Negation cancellation ¬(¬) = () : and ¬(()∨()) = (¬()∧¬()) .

So Answer is (D) .

This solution is contributed by** N****irmal Bharadwaj.**

Question 12 |

Suppose you break a stick of unit length at a point chosen uniformly at random. Then the expected length of the shorter stick is ________

0.24 to 0.27 | |

0.15 to 0.30 | |

0.20 to 0.30 | |

0.10 to 0.15 |

**Probability**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 12 Explanation:

Question 13 |

Let G=(V,E) be a directed graph where V is the set of vertices and E the set of edges. Then which one of the following graphs has the same strongly connected components as G ?

A | |

B | |

C | |

D |

**Graph Theory**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 13 Explanation:

If we reverse directions of all arcs in a graph, the new graph has same set of strongly connected components as the original graph. Se http://www.geeksforgeeks.org/strongly-connected-components/ for more details.

Question 14 |

Consider the following system of equations:

3x + 2y = 1 4x + 7z = 1 x + y + z = 3 x – 2y + 7z = 0The number of solutions for this system is __________________

1 | |

0 | |

2 | |

3 |

**Numerical Methods and Calculus**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 14 Explanation:

rank(Augmented Matrix) = rank(Matrix) = no of unknowns.
Hence it has a unique solution.

Question 15 |

The value of the dot product of the eigenvectors corresponding to any pair of different eigenvalues of a 4-by-4 symmetric positive definite matrix is _____________________.

0 | |

1 | |

-1 | |

2 |

**Numerical Methods and Calculus**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 15 Explanation:

The eigen vectors corresponding to different eigen values of a real symmetric matrix are orthogonal to each other. And dot product of orthogonal vectors is 0.

Question 16 |

I only | |

II only | |

Both I and II | |

Neither I nor II |

**Numerical Methods and Calculus**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 17 |

A | |

B | |

C | |

D |

**Digital Logic & Number representation**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 17 Explanation:

F= PQ+P’QR+P’QR’S
=Q(P+P’+P’R’S)
USE PROP a+a’b=a+b
=Q(P+R+P’R’S)
=Q(P+P’R’S+R)
USE PROP a+a’b=a+b
=Q(P+R’S+R)
=Q(P+R+R’S)
USE PROP a+a’b=a+b
=Q(P+R+S)
=PQ+QR+QS
Ans (a)

Question 18 |

The base (or radix) of the number system such that the following equation holds is____________.

312/20 = 13.1

3 | |

4 | |

5 | |

6 |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 18 Explanation:

Let x (≠ 0) be the base of the given equation.
We have,
LHS = ( 3x

^{2}+ x + 2 ) / ( 2x) = ( 3x / 2 ) + ( 1 / 2 ) + ( 1 / x ) RHS = x + 3 + ( 1 / x ) Now, for the equation to hold true, LHS = RHS ( 3x / 2 ) + ( 1 / 2 ) + ( 1 / x ) = x + 3 + ( 1 / x ) ⇒ 3x + 1 = 2x + 6 ⇒ x = 5**So, the base is 5.**Question 19 |

Consider the following program in C language:

#include <stdio.h> main() { int i; int *pi = &i; scanf("%d", pi); printf("%d\n", i+5); }Which one of the following statements is TRUE?

Compilation fails. | |

Execution results in a run-time error. | |

On execution, the value printed is 5 more than the address of variable i. | |

On execution, the value printed is 5 more than the integer value entered. |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 19 Explanation:

There is no problem in the program as pi points to a valid location.
Also, in scanf() we pass address of a variable and pi is an address.

Question 20 |

Let G be a graph with n vertices and m edges. What is the tightest upper bound on the running time on Depth First Search of G? Assume that the graph is represented using adjacency matrix.

O(n) | |

O(m+n) | |

O(n ^{2}) | |

O(mn) |

**Graph Traversals**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 20 Explanation:

Depth First Search of a graph takes O(m+n) time when the graph is represented using adjacency list.
In adjacency matrix representation, graph is represented as an "n x n" matrix. To do DFS, for every vertex, we traverse the row corresponding to that vertex to find all adjacent vertices (In adjacency list representation we traverse only the adjacent vertices of the vertex). Therefore time complexity becomes O(n

^{2})Question 21 |

Consider a rooted Binary tree represented using pointers. The best upper bound on the time required to determine the number of subtrees having having exactly 4 nodes O(n

^{a}Logn^{b}). Then the value of a + 10b is ________1 | |

11 | |

12 | |

21 |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 21 Explanation:

We can find the subtree with 4 nodes in O(n) time. Following can be a simple approach.
1) Traverse the tree in bottom up manner and find size of subtree rooted with current node
2) If size becomes 4, then print the current node.
Following is C implementation
1

Question 22 |

The graph doesn't have any topological ordering | |

Both PQRS and SRPQ are topological ordering | |

Both PSRQ and SPRQ are topological ordering | |

PSRQ is the only topological ordering |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 22 Explanation:

The graph doesn't contain any cycle, so there exist topological ordering.
P and S must appear before R and Q because there are edges from P to R and Q, and from S to R and Q.
See Topological Ordering for more details.

Question 23 |

Let P be a QuickSort Program to sort numbers in ascending order using the first element as pivot. Let t1 and t2 be the number of comparisons made by P for the inputs {1, 2, 3, 4, 5} and {4, 1, 5, 3, 2} respectively. Which one of the following holds?

t1 = 5 | |

t1 < t2 | |

t1 > t2 | |

t1 = t2 |

**Sorting**

**GATE-CS-2014-(Set-1)**

**QuickSort**

**Discuss it**

Question 23 Explanation:

When first element or last element is chosen as pivot, Quick Sort's worst case occurs for the sorted arrays.
In every step of quick sort, numbers are divided as per the following recurrence.
T(n) = T(n-1) + O(n)

Question 24 |

A | |

B | |

C | |

D |

**Regular languages and finite automata**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 24 Explanation:

(A) L = {a n b n |n >= 0} is not regular because there does not exists a finite automaton that can
derive this grammar. Intuitively, finite automaton has finite memory, hence it can’t track
number of as. It is a standard CFL though.
(B) L = {a n b n |n is prime} is again not regular because there is no way to remember/check if
current n is prime or not. Hence, no finite automaton exists to derive this grammar, thus it
is not regular.
(C) L = {w|w has 3k+1 bs} is a regular language because k is a fixed constant and we can easily
emulate L as a ∗ ba ∗ .....ba ∗ such that there are exactly 3k + 1 bs and a ∗ s surrounding each b in
the grammar.
(D) L = {ww| w ∈ Σ ∗ } is again not a regular grammar, infact it is not even a CFG. There is no
way to remember and derive double word using finite automaton.
Hence, correct answer would be (C).
This solution is contributed by

**vineet purswani**.Question 25 |

{q0, q1, q2} | |

{q0, q1} | |

{q0, q1, q2, q3} | |

{q3} |

**Regular languages and finite automata**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 26 |

A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is an unsigned integer, the maximum value of the immediate operand is ____________.

16383 |

**Computer Organization and Architecture**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 26 Explanation:

1 Word = 32 bits Each instruction has 32 bits To support 45 instructions, opcode must contain 6-bits Register operand1 requires 6 bits, since the total registers are 64. Register operand 2 also requires 6 bits. 14-bits are left over for immediate Operand Using 14-bits, we can give maximum 16383, Since 2^14=16384(from 0 to 16383)

Question 27 |

Which one of the following is FALSE?

A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end. | |

Available expression analysis can be used for common subexpression elimination. | |

Live variable analysis can be used for dead code elimination. | |

x = 4 ∗ 5 => x = 20 is an example of common subexpression elimination. |

**Code Generation and Optimization**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 27 Explanation:

(A) A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end is TRUE.
(B) Available expression analysis can be used for common subexpression elimination is TRUE. Available expressions is an analysis algorithm that determines for each point in the program the set of expressions that need not be recomputed. Available expression analysis is used to do global common subexpression elimination (CSE). If an expression is available at a point, there is no need to re-evaluate it.
(C)Live variable analysis can be used for dead code elimination is TRUE.
(D) x = 4 ∗ 5 => x = 20 is an example of common subexpression elimination is FALSE.
Common subexpression elimination (CSE) refers to compiler optimization replaces identical expressions (i.e., they all evaluate to the same value) with a single variable holding the computed value when it is worthwhile to do so.
Below is an example

In the following code: a = b * c + g; d = b * c * e; it may be worth transforming the code to: tmp = b * c; a = tmp + g; d = tmp * e;Sources: https://en.wikipedia.org/wiki/Common_subexpression_elimination https://en.wikipedia.org/wiki/Available_expression

Question 28 |

Match the following:

1) Waterfall model a) Specifications can be developed incrementally 2) Evolutionary model b) Requirements compromises are inevitable 3) Component-based c) Explicit recognition of risk software engineering 4) Spiral development d) Inflexible partitioning of the project into stages

1-a, 2-b, 3-c, 4-d | |

1-d, 2-a, 3-b, 4-c | |

1-d, 2-b, 3-a, 4-c | |

1-c, 2-a, 3-b, 4-d |

**Software Engineering**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 28 Explanation:

**Waterfall Model:**We can not go back in previous project phase as soon as as we proceed to next phase ,So inflexible**Evolutionary:**It keeps changing with evolution so incremental in nature**Component based:**Reuse-based approach to defining, implementing and composing loosely coupled independent components into systems**Spiral:**Spiral model is the most advanced .It includes four faces one of which is Risk.- Phases: Planning,
**Risk Analysis**, Engineering and Evaluation

- Phases: Planning,

Question 29 |

Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder 100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and 145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for cylinder 90 is serviced after servicing ____________ number of requests.

1 | |

2 | |

3 | |

4 |

**Input Output Systems**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 29 Explanation:

In Shortest-Seek-First algorithm, request closest to the current position of the disk arm and head is handled first.
In this question, the arm is currently at cylinder number 100. Now the requests come in the queue order for cylinder numbers 30, 85, 90, 100, 105, 110, 135 and 145.
The disk will service that request first whose cylinder number is closest to its arm. Hence 1st serviced request is for cylinder no 100 ( as the arm is itself pointing to it ), then 105, then 110, and then the arm comes to service request for cylinder 90. Hence before servicing request for cylinder 90, the disk would had serviced 3 requests.
Hence option C.

Question 30 |

Which one of the following is FALSE?

User level threads are not scheduled by the kernel.
| |

When a user level thread is blocked, all other threads of its process are blocked. | |

Context switching between user level threads is faster than context switching between kernel level threads. | |

Kernel level threads cannot share the code segment |

**Process Management**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 30 Explanation:

User level thread |
Kernel level thread |
---|---|

User thread are implemented by user processes. |
kernel threads are implemented by OS. |

OS doesn’t recognized user level threads. | Kernel threads are recognized by OS. |

Implementation of User threads is easy. | Implementation of Kernel thread is complicated. |

Context switch time is less. |
Context switch time is more. |

Context switch requires no hardware support. | Hardware support is needed. |

If one user level thread perform blocking operation then entire process will be blocked. |
If one kernel thread perform blocking operation then another thread can continue execution. |

Example : Java thread, POSIX threads. | Example : Window Solaris. |

Question 31 |

Consider the relation scheme R = {E, F, G, H, I, J, K, L, M, M} and the set of functional dependencies {{E, F} -> {G}, {F} -> {I, J}, {E, H} -> {K, L}, K -> {M}, L -> {N} on R. What is the key for R?

{E, F} | |

{E, F, H} | |

{E, F, H, K, L} | |

{E} |

**Database Design(Normal Forms)**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 31 Explanation:

All attributes can be derived from {E, F, H}
To solve these kind of questions that are frequently asked in GATE paper, try to solve it by using shortcuts so that enough amount of time can be saved.

**Fist Method:**Using the given options try to obtain closure of each options. The solution is the one that contains R and also minimal Super Key, i.e Candidate Key.A) {EF}+ = {EFGIJ} ≠ R(The given relation) B) {EFH}+ = {EFGHIJKLMN} = R (Correct since each member of the given relation is determined) C) {EFHKL}+ = {EFGHIJKLMN} = R (Not correct although each member of the given relation can be determined but it is not minimal, since by the definition of Candidate key it should be minimal Super Key) D) {E}+ = {E} ≠ R

**Second Method:**Since, {EFGHIJKLMN}+ = {EFGHIJKLMN} {EFGHIJKLM}+ = {EFGHIJKLMN} ( Since L -> {N}, hence can replace N by L) In a similar way K -> {M} hence replace M by K {EFGHIJKL}+ = {EFGHIJKLMN} Again {EFGHIJ}+ = {EFGHIJKLMN} (Since {E, H} -> {K, L}, hence replace KL by EH) {EFGH}+ = {EFGHIJKLMN} (Since {F} -> {I, J} ) {EFH}+ = {EFGHIJKLMN} (Since {E, F} -> {G} )This explanation is contributed by

**Manish Rai.**Learn more here: Finding Attribute Closure and Candidate Keys using Functional DependenciesQuestion 32 |

Given the following statements:

S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL. S2: Given the table R(a,b,c) where a and b together form the primary key, the following is a valid table definition. CREATE TABLE S ( a INTEGER, d INTEGER, e INTEGER, PRIMARY KEY (d), FOREIGN KEY (a) references R)Which one of the following statements is CORRECT?

S1 is TRUE and S2 is FALSE. | |

Both S1 and S2 are TRUE. | |

S1 is FALSE and S2 is TRUE. | |

Both S1 and S2 are FALSE. |

**SQL**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 32 Explanation:

S1: A foreign key declaration can always be replaced by an equivalent check assertion in SQL.

**False:**Check assertions are not sufficient to replace foreign key. Foreign key declaration may have cascade delete which is not possible by just check insertion.

S2: Given the table R(a,b,c) where a and b together form the primary key, the following is a valid table definition. CREATE TABLE S ( a INTEGER, d INTEGER, e INTEGER, PRIMARY KEY (d), FOREIGN KEY (a) references R)

**False:**Foreign key in one table should uniquely identifies a row of other table. In above table definition, table S has a foreign key that refers to field 'a' of R. The field 'a' in table S doesn't uniquely identify a row in table R.

Question 33 |

Consider the following three statements about link state and distance vector routing protocols, for a large network with 500 network nodes and 4000 links.

[S1] The computational overhead in link state protocols is higher than in distance vector protocols. [S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol. [S3] After a topology change, a link state protocol will converge faster than a distance vector protocol.Which one of the following is correct about S1, S2, and S3 ?

S1, S2, and S3 are all true. | |

S1, S2, and S3 are all false. | |

S1 and S2 are true, but S3 is false | |

S1 and S3 are true, but S2 is false |

**Network Layer**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 33 Explanation:

Source: http://www.cs.cmu.edu/~srini/15-441/S05/lectures/10-Routing.pptLink-state:Every node collects complete graph structure Each computes shortest paths from it Each generates own routing tableDistance-vectorNo one has copy of graph Nodes construct their own tables iteratively Each sends information about its table to neighbors

[S1] The computational overhead in link state protocols is higher than in distance vector protocols. [S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link state protocol. [S3] After a topology change, a link state protocol will converge faster than a distance vector protocol.

**S1**is clearly true as in Link State all nodes compute shortest path for whole network graph.

**S3**is also true as Distance Vector protocol has count to infinity problem and converges slower.

**S2**is false. In distance vector protocol, split horizon with poison reverse reduces the chance of forming loops and uses a maximum number of hops to counter the 'count-to-infinity' problem. These measures avoid the formation of routing loops in some, but not all, cases

Question 34 |

Which of the following are used to generate a message digest by the network security protocols?

(P) RSA (Q) SHA-1 (R) DES (S) MD5

P and R only | |

Q and R only | |

Q and S only | |

R and S only |

**Network Security**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 34 Explanation:

- RSA – It is an algorithm used to
**encrypt and decrypt**messages. - SHA 1 – Secure Hash Algorithm 1, or SHA 1 is a
**cryptographic hash function**. It produces a 160 bit (20 byte) hash value (message digest). - DES – Data Encryption Standard, or DES is a
**symmetric key algorithm for encryption**of electronic data. - MD5 – Message Digest 5, or MD5 is a widely used
**cryptographic hash function**that produces a 128 bit hash value (message digest).

**Q and S i.e SHA 1 and MD5 are used to generate a message digest by the network security protocols.**

**So, C is the correct choice.**

Question 35 |

Identify the correct order in which the following actions take place in an interaction between a web browser and a web server.

1. The web browser requests a webpage using HTTP. 2. The web browser establishes a TCP connection with the web server. 3. The web server sends the requested webpage using HTTP. 4. The web browser resolves the domain name using DNS.

4,2,1,3 | |

1,2,3,4 | |

4,1,2,3 | |

2,4,1,3 |

**Application Layer**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 35 Explanation:

The web browser first need to figure out IP address of site from url using DNS, then establishes a TCP connection, typically at port 80. Once the TCP connection is established, the browser sends a HTTP request using GET. Finally web server responds with HTTP response.

Question 36 |

Consider a token ring network with a length of 2 km having 10 stations including a monitoring station. The propagation speed of the signal is 2 × 10

^{8}m/s and the token transmission time is ignored. If each station is allowed to hold the token for 2 μsec, the minimum time for which the monitoring station should wait (in μsec)before assuming that the token is lost is _______.28 to 30 | |

20 to 22 | |

0 to 2 | |

31 to 33 |

**Data Link Layer**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 36 Explanation:

Length = 2 km Propagation Speed v = 2*10^8 m/s Token Holding Time = 2 micro sec Waiting time = length/speed + (#stations - 1)*(token holding time) to length/speed + (#stations)*(token holding time) = 28 to 30

Question 37 |

Let the size of congestion window of a TCP connection be 32 KB when a timeout occurs. The round trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is _________.

1100 to 1300 | |

800 to 1000 | |

1400 to 1600 | |

1500 to 1700 |

**Transport Layer**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 37 Explanation:

Current size of congestion window in terms of number of segments = (Size in Bytes)/(Maximum Segment Size) = 32KB / 2KB = 16 MSS When timeout occurs, in TCP's Slow Start algorithm, threshold is reduced to half which is 16KB or 8MSS. Also, slow start phase begins where congestion window is increased twice. So from 1MSS to 8 MSS window size will grow exponentially. Congestion window becomes 2MSS after one RTT and becomes 4MSS after 2 RTTs and 8MSS after 3 RTTs. At 8MSS, threshold is reached and congestion avoidance phase begins. In congestion avoidance phase, window is increased linearly. So to cover from 8MSS to 16MSS, it needs 8 RTTs Together, 11RTTs are needed (3 in slow start phase and 8 in congestion avoidance phase).

Question 38 |

Consider a selective repeat sliding window protocol that uses a frame size of 1 KB to send data on a 1.5 Mbps link with a one-way latency of 50 msec. To achieve a link utilization of 60%, the minimum number of bits required to represent the sequence number field is ________.

3 | |

4 | |

5 | |

6 |

**Data Link Layer**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 38 Explanation:

Transmission delay = Frame Size/bandwidth = (1*8*10^3)/(1.5 * 10^6)=5.33ms Propagation delay = 50ms Efficiency = Window Size/(1+2a) = .6 a = Propagation delay/Transmission delay So, window size = 11.856(approx) min sequence number = 2*window size = 23.712 bits required in Min sequence number = log_{2}(23.712) Answer is 4.56 Ceil(4.56) = 5

Question 39 |

Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable.

A | |

B | |

C | |

D |

**Transactions and concurrency control**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 39 Explanation:

In option D, there is no interleaving of operations. The option D has first all operations of transaction 2, then 3 and finally 1 There can not be any conflict as it is a serial schedule with sequence 2 --> 3 -- > 1

Question 40 |

Given the following two statements:

S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF. S2: AB->C, D->E, E->C is a minimal cover for the set of functional dependencies AB->C, D->E, AB->E, E->C.Which one of the following is CORRECT?

S1 is TRUE and S2 is FALSE. | |

Both S1 and S2 are TRUE. | |

S1 is FALSE and S2 is TRUE. | |

Both S1 and S2 are FALSE. |

**Database Design(Normal Forms)**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 40 Explanation:

S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF.A relational schema R is in BCNF iff in Every non-trivial Functional Dependency X->Y, X is Super Key. If we can prove the relation is in BCNF then by default it would be in 1NF, 2NF, 3NF also. Let R(AB) be a two attribute relation, then

- If {A->B} exists then BCNF since {A}+ = AB = R
- If {B->A} exists then BCNF since {B}+ = AB = R
- If {A->B,B->A} exists then BCNF since A and B both are Super Key now.
- If {No non trivial Functional Dependency} then default BCNF.

**Hence S1 is true.**

S2: AB->C, D->E, E->C is a minimal cover for the set of functional dependencies AB->C, D->E, AB->E, E->C.As we know Minimal Cover is the process of eliminating redundant Functional Dependencies and Extraneous attributes in Functional Dependency Set. So each dependency of F = {AB->C, D->E, AB->E, E->C} should be implied in minimal cover. As we can see AB->E is not covered in minimal cover since {AB}+ = ABC in the given cover {AB->C, D->E, E->C}

**Hence, S2 is false.**This explanation has been contributed by

**Manish Rai.**

**Learn more about Normal forms here:**Database Normalization | Introduction Database Normalization | Normal Forms

Question 41 |

An operating system uses the Banker’s algorithm for deadlock avoidance when managing the allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given below presents the current system state. Here, the Allocation matrix shows the current number of resources of each type allocated to each process and the Max matrix shows the maximum number of resources of each type required by each process during its execution.
There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is
currently in a safe state. Consider the following independent requests for additional resources in the
current state:

REQ1: P0 requests 0 units of X, 0 units of Y and 2 units of Z REQ2: P1 requests 2 units of X, 0 units of Y and 0 units of ZWhich one of the following is TRUE?

Only REQ1 can be permitted. | |

Only REQ2 can be permitted. | |

Both REQ1 and REQ2 can be permitted. | |

Neither REQ1 nor REQ2 can be permitted |

**GATE-CS-2014-(Set-1)**

**Deadlock**

**Discuss it**

Question 41 Explanation:

This is the current safe state.

Now, if the request REQ1 is permitted, the state would become :

Now, with the current availability, we can service the need of P1. The state would become :

With the resulting availability, it would not be possible to service the need of either P0 or P2, owing to lack of Z resource.
Therefore, the system would be in a deadlock.
⇒ We cannot permit REQ1.
Now, at the given safe state, if we accept REQ2 :

With this availability, we service P1 (P2 can also be serviced). So, the state is :

With the current availability, we service P2. The state becomes :

Finally, we service P0. The state now becomes :

The state so obtained is a safe state. ⇒ REQ2 can be permitted.
So, only REQ2 can be permitted.
Hence, B is the correct choice.
Please comment below if you find anything wrong in the above post.

AVAILABLE | X=3, Y=2, Z=2 | |

MAX | ALLOCATION | |

X Y Z | X Y Z | |

P0 | 8 4 3 | 0 0 1 |

P1 | 6 2 0 | 3 2 0 |

P2 | 3 3 3 | 2 1 1 |

AVAILABLE | X=3, Y=2, Z=0 | ||

MAX | ALLOCATION | NEED | |

X Y Z | X Y Z | X Y Z | |

P0 | 8 4 3 | 0 0 3 | 8 4 0 |

P1 | 6 2 0 | 3 2 0 | 3 0 0 |

P2 | 3 3 3 | 2 1 1 | 1 2 2 |

AVAILABLE | X=6, Y=4, Z=0 | ||

MAX | ALLOCATION | NEED | |

X Y Z | X Y Z | X Y Z | |

P0 | 8 4 3 | 0 0 3 | 8 4 0 |

P1 | 6 2 0 | 3 2 0 | 0 0 0 |

P2 | 3 3 3 | 2 1 1 | 1 2 2 |

AVAILABLE | X=1, Y=2, Z=2 | ||

MAX | ALLOCATION | NEED | |

X Y Z | X Y Z | X Y Z | |

P0 | 8 4 3 | 0 0 1 | 8 4 2 |

P1 | 6 2 0 | 5 2 0 | 1 0 0 |

P2 | 3 3 3 | 2 1 1 | 1 2 2 |

AVAILABLE | X=7, Y=4, Z=2 | ||

MAX | ALLOCATION | NEED | |

X Y Z | X Y Z | X Y Z | |

P0 | 8 4 3 | 0 0 1 | 8 4 2 |

P1 | 6 2 0 | 5 2 0 | 0 0 0 |

P2 | 3 3 3 | 2 1 1 | 1 2 2 |

AVAILABLE | X=10, Y=7, Z=5 | ||

MAX | ALLOCATION | NEED | |

X Y Z | X Y Z | X Y Z | |

P0 | 8 4 3 | 0 0 1 | 8 4 2 |

P1 | 6 2 0 | 5 2 0 | 0 0 0 |

P2 | 3 3 3 | 2 1 1 | 0 0 0 |

AVAILABLE | X=18, Y=11, Z=8 | ||

MAX | ALLOCATION | NEED | |

X Y Z | X Y Z | X Y Z | |

P0 | 8 4 3 | 0 0 1 | 0 0 0 |

P1 | 6 2 0 | 5 2 0 | 0 0 0 |

P2 | 3 3 3 | 2 1 1 | 0 0 0 |

Question 42 |

Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.

Process Name Arrival Time Execution Time A 0 6 B 3 2 c 5 4 D 7 6 E 10 3Using the

*shortest remaining time first*scheduling algorithm, the average process turnaround time (in msec) is ____________________.7.2 Hint: Turn Around Time =Completion time - Arrival Time | |

8 | |

7 | |

7.5 |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 42 Explanation:

Turn around time of a process is total time between submission of the process and its completion. Shortest remaining time (SRT) scheduling algorithm selects the process for execution which has the smallest amount of time remaining until completion.

Reference: https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/5_CPU_Scheduling.html This solution is contributed by

**Solution:**Let the processes be A, ,C,D and E. These processes will be executed in following order. Gantt chart is as follows: First 3 sec, A will run, then remaining time A=3, B=2,C=4,D=6,E=3 Now B will get chance to run for 2 sec, then remaining time. A=3, B=0,C=4,D=6,E=3 Now A will get chance to run for 3 sec, then remaining time. A=0, B=0,C=4,D=6,E=3 By doing this way, you will get above gantt chart. Scheduling table: As we know, turn around time is total time between submission of the process and its completion. i.e turn around time=completion time-arrival time. i.e. TAT=CT-AT Turn around time of A = 8 (8-0) Turn around time of B = 2 (5-3) Turn around time of C = 7 (12-5) Turn around time of D = 14 (21-7) Turn around time of E = 5 (15-10) Average turn around time is (8+2+7+14+5)/5 = 7.2. Answer is 7.2.Reference: https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/5_CPU_Scheduling.html This solution is contributed by

**Nitika Bansal****Alternate Explanatio:**After drawing Gantt Chart Completion Time for processes A, B, C, D and E are 8, 5, 12, 21 and 15 respectively. Turnaround Time = Completion Time - Arrival Time

Question 43 |

Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3,
4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal replacement policy is__________.

5 | |

6 | |

7 | |

8 |

**Memory Management**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 43 Explanation:

In optimal page replacement replacement policy, we replace the place which is not used for longest duration in future.

Given three page frames. Reference string is1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6Initially, there are three page faults and entries are 1 2 3 Page 4 causes a page fault and replaces 3 (3 is the longest distant in future), entries become 1 2 4 Total page faults = 3+1 = 4 Pages 2 and 1 don't cause any fault. 5 causes a page fault and replaces 1, entries become 5 2 4 Total page faults = 4 + 1 = 5 3 causes a page fault and replaces 1, entries become 3 2 4 Total page faults = 5 + 1 = 6 3, 2 and 4 don't cause any page fault. 6 causes a page fault. Total page faults = 6 + 1 = 7

Question 44 |

A canonical set of items is given below

S --> L. > R Q --> R.On input symbol < the set has

a shift-reduce conflict and a reduce-reduce conflict. | |

a shift-reduce conflict but not a reduce-reduce conflict. | |

a reduce-reduce conflict but not a shift-reduce conflict. | |

neither a shift-reduce nor a reduce-reduce conflict. |

**Parsing and Syntax directed translation**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 44 Explanation:

The question is asked with respect to the symbol ' < ' which is

**not present**in the given canonical set of items. Hence it is neither a shift-reduce conflict nor a reduce-reduce conflict on symbol '<'. Hence**D**is the correct option. But if the question would have asked with respect to the symbol ' > ' then it would have been a shift-reduce conflict.Question 45 |

Let L be a language and L' be its complement. Which one of the following is NOT a viable possibility?

Neither L nor L' is recursively enumerable (r.e.). | |

One of L and L' is r.e. but not recursive; the other is not r.e.
| |

Both L and L' are r.e. but not recursive. | |

Both L and L' are recursive |

**Recursively enumerable sets and Turing machines**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 45 Explanation:

A) It is possible if L itself is NOT RE. Then L' will also not be RE.
B) Suppose there is a language such that turing machine halts on the input. The given language is RE but not recursive and its complement is NOT RE.
C) This is not possible because if we can write enumeration procedure for both languages and it's complement, then the language becomes recursive.
D) It is possible because L is closed under complement if it is recursive.
Thus, C is the correct choice.

Question 46 |

Which of the regular expressions given below represent the following DFA?

I) 0*1(1+00*1)* II) 0*1*1+11*0*1 III) (0+1)*1

I and II only | |

I and III only | |

II and III only | |

I, II, and III |

**Regular languages and finite automata**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 46 Explanation:

I) 0*1(1+00*1)* II) 0*1*1+11*0*1 III) (0+1)*1 (I) and (III) represent DFA. (II) doesn't represent as the DFA accepts strings like 11011, but the regular expression doesn't accept.

Question 47 |

There are 5 bags labeled 1 to 5. All the coins in a given bag have the same weight. Some bags have coins of weight 10 gm, others have coins of weight 11 gm. I pick 1, 2, 4, 8, 16 coins respectively from bags 1 to 5. Their total weight comes out to 323 gm. Then the product of the labels of the bags having 11 gm coins is ___.

15 | |

12 | |

8 | |

1 |

**General Aptitude**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 47 Explanation:

There are 5 bags numbered 1 to 5. We don't know how many bags contain 10 gm and 11 gm coins. We only know that the total weights of coins is 323. Now the idea here is to get 3 in the place of total sum's unit digit. Mark no 1 bag as having 11 gm coins. Mark no 2 bag as having 10 gm coins. Mark no 3 bag as having 11 gm coins. Mark no 4 bag as having 11 gm coins. Mark no 5 bag as having 10 gm coins. Note: The above marking is done after getting false results for some different permutations, the permutations which were giving 3 in the unit place of the total sum. Now, we have picked 1, 2, 4, 8, 16 coins respectively from bags 1 to 5. Hence total sum coming from each bag from 1 to 5 is 11, 20, 44, 88, 160 gm respectively. For the above combination we are getting 3 as unit digit in sum. Lets find out the total sum, it's 11 + 20 + 44 + 88 + 160 = 323. So it's coming right. Now 11 gm coins containing bags are 1, 3 and 4. Hence, the product is : 1 x 3 x 4 = 12.

Question 48 |

Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a given graph. In this scenario, which one of the following represents the correct Venn diagram of the complexity classes P, NP and NP Complete (NPC)?

A | |

B | |

C | |

D |

**NP Complete**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 48 Explanation:

Clique is an NP complete problem. If one NP complete problem can be solved in polynomial time, then all of them can be. So NPC set becomes equals to P.

Question 49 |

The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is _________________.

148 | |

147 | |

146 | |

140 |

**Analysis of Algorithms**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 49 Explanation:

To find minimum and maximum element out of n numbers, we need to have at least (3n/2-2) comparisons.

Question 50 |

Consider the following C function in which size is the number of elements in the array E:
The value returned by the function MyX is the

int MyX(int *E, unsigned int size) { int Y = 0; int Z; int i, j, k; for(i = 0; i < size; i++) Y = Y + E[i]; for(i = 0; i < size; i++) for(j = i; j < size; j++) { Z = 0; for(k = i; k <= j; k++) Z = Z + E[k]; if (Z > Y) Y = Z; } return Y; }

maximum possible sum of elements in any sub-array of array E. | |

maximum element in any sub-array of array E. | |

sum of the maximum elements in all possible sub-arrays of array E | |

the sum of all the elements in the array E. |

**Misc**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 50 Explanation:

**Explanation:**The function does following Y is used to store maximum sum seen so far and Z is used to store current sum 1) Initialize Y as sum of all elements 2) For every element, calculate sum of all subarrays starting with arr[i]. Store the current sum in Z. If Z is greater than Y, then update Y.

Question 51 |

Consider the following pseudo code. What is the total number of multiplications to be performed?

D = 2 for i = 1 to n do for j = i to n do for k = j + 1 to n do D = D * 3

Half of the product of the 3 consecutive integers. | |

One-third of the product of the 3 consecutive integers. | |

One-sixth of the product of the 3 consecutive integers. | |

None of the above. |

**Analysis of Algorithms**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 51 Explanation:

See question 2 of http://www.geeksforgeeks.org/data-structures-algorithms-set-33/

Question 52 |

Consider a hash table with 9 slots. The hash function is

*ℎ(k) = k mod 9*. The collisions are resolved by chaining. The following 9 keys are inserted in the order: 5, 28, 19, 15, 20, 33, 12, 17, 10. The maximum, minimum, and average chain lengths in the hash table, respectively, are 3, 0, and 1 | |

3, 3, and 3 | |

4, 0, and 1 | |

3, 0, and 2 |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 52 Explanation:

Following are values of hash function for all keys

5 --> 5 28 --> 1 19 --> 1 [Chained with 28] 15 --> 6 20 --> 2 33 --> 6 [Chained with 15] 12 --> 3 17 --> 8 10 --> 1 [Chained with 28 and 19]The maximum chain length is 3. The keys 28, 19 and 10 go to same slot 1, and form a chain of length 3. The minimum chain length 0, there are empty slots (0, 4 and 7). Average chain length is (0 + 3 + 1 + 1 + 0 + 1 + 2 + 0 + 1)/9 = 1

Question 53 |

Consider a 6-stage instruction pipeline, where all stages are perfectly balanced.Assume that there is no cycle-time overhead of pipelining. When an application is executing on this 6-stage pipeline, the speedup achieved with respect to non-pipelined execution if 25% of the instructions incur 2 pipeline stall cycles is

4 | |

8 | |

6 | |

7 |

**Computer Organization and Architecture**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 53 Explanation:

It was a numerical digit type question so answer must be 4. As for 6 stages, non-pipelining takes 6 cycles. There were 2 stall cycles for pipelining for 25% of the instructions So pipe line time = (1+(25/100)*2) = 1.5 Speed up = Non pipeline time/Pipeline time = 6/1.5 = 4

Question 54 |

An access sequence of cache block address is of length N and contains n unique block addresses. The number of unique block addresses between two consecutive accesses to the same block address is bounded above by k. What is the miss ration is the access sequence is passed through a cache of associativity A >= k exercising least-recently used replacement policy.

n/N | |

1/N | |

1/A | |

k/n |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 54 Explanation:

Their are N access request for the cache blocks out this n blocks are unique . In between two access of the same block their are request of (k-1) other block block. And if their associativity >=k and use LRU, then there will be only one cache miss for every unique block i.e., n and it will be the time when the enter the cahe for the first time. Therefore Miss ratio =(Cache miss)/(No. of request) = n/N

Question 55 |

Consider a 4-to-1 multiplexer with two select lines S1 and S0, given below
The minimal sum-of-products form of the Boolean expression for the output F of the multiplexer is

P'Q + QR' + PQ'R | |

P'Q + P'QR' + PQR' + PQ'R | |

P'QR + P'QR' + QR' + PQ'R | |

PQR' |

**Digital Logic & Number representation**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 55 Explanation:

For 4 to 1 mux
=p’q’(0)+p’q(1)+pq’r+pqr’
=p’q+pq’r+pqr’
=q(p’+pr’)+pq’r
=q(p’+r’)+pq’r
=p’q+qr’+pq’r
Ans (a)

Question 56 |

The function f(x) = x sinx satisfies the following equation f''(x) + f(x) + t cosx = 0. The value of t is

-1 | |

-2 | |

1 | |

2 |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 56 Explanation:

We have f(x) = x sin x ⇒ f'(x) = x cos x + sin x ⇒ f′′(x) = x (− sin x ) + cos x + cos x = (−x sin x ) + 2 cos x Now, it is given that f(x) = x sin x satisfies the equation f′′(x) + f(x) + t cos x = 0 ⇒ (−x sin x ) + 2 cos x + x sin x + t cos x = 0 ⇒ 2 cos x + t cos x = 0 ⇒ cos x ( t + 2 ) = 0 ⇒ t + 2 = 0 ⇒ t = −2

**Thus, B is the correct option.**

Question 57 |

A function is continuous in the interval [0, 2]. It is known that f(0) = f(2) = -1 and f(1) = 1. Which one of the following statements must be true.

There exist a y in the interval (0, 1), such that f(y) = f(y+1) | |

For every y in the interval (0, 1) , f(y) = f(2-y) | |

The maximum value of the function in the interval (0, 2) is 1 | |

There exist a y in the interval (0, 1), such that f(y) = -f(2-y) |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 58 |

Four fair six-sided dice are rolled. The probability that the sum being 22 is X/1296. The value of X is ________

7 | |

8 | |

9 | |

10 |

**Probability**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 58 Explanation:

In general, Probability (of an event ) = No of favorable outcomes to the event / Total number of possible outcomes in the random experiment.
Here, 4 six-faces dices are tossed, for one dice there can be 6 equally likely and mutually exclusive outcomes.
Taking 4 together, there can be total number of 6*6*6*6 = 1296 possible outcomes.
Now, No of favorable cases to the event : here event is getting sum as 22.
So, there can be only 2 cases possible.
Case 1: Three 6's and one 4, for example: 6,6,6,4 ( sum is 22)
Hence, No of ways we can obtain this = 4!/3! = 4 ways ( 3! is for removing those cases where all three 6 are swapping among themselves)
Case 2: Two 6's and two 5's,for example: 6,6,5,5 ( sum is 22)
Hence, No of ways we can obtain this = 4! /( 2! * 2!) = 6 ways ( 2! is for removing those cases where both 6 are swapping between themselves, similarly for both 5 also)
Hence total no of favorable cases = 4 + 6 = 10.
Hence probability = 10/1296.
Therefore option D.

Question 59 |

A pennant is a sequence of numbers, each number being 1 or 2. An n-pennant is a sequence of numbers with sum equal to n. For example, (1,1,2) is a 4-pennant. The set of all possible 1-pennants is {(1)}, the set of all possible 2-pennants is {(2), (1,1)} and the set of all 3-pennants is {(2,1), (1,1,1), (1,2)}. Note that the pennant (1,2) is not the same as the pennant (2,1). The number of 10-
pennants is ______________.

88.9 to 89.1 |

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 59 Explanation:

1-pennant {(1)} - #1 2-pennant {(1,1),(2)} - #2 3-pennant {(1,1,1),(1,2),(2,1)} - #3 4-pennant {(1,1,1,1),(2,2),(1,1,2),(1,2,1),(2,1,1)} - #5 5-pennant {(1,1,1,1,1),(2,1,1,1),(1,2,1,1),(1,1,2,1), (1,1,1,2),(2,2,1),(2,1,2),(1,2,2)} - #8If one observe carefully they are the terms(part of) a Fibonacci series. (0,1,1,2,3,5,8,13 ....). Hence the # of 10-pennant is the 12th term of the series ie. 89

Question 60 |

Let S denote the set of all functions f: {0,1}

^{4}-> {0,1}. Denote by N the number of functions from S to the set {0,1}. The value of Log_{2}Log_{2}N is ______.12 | |

13 | |

15 | |

16 |

**Set Theory & Algebra**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 60 Explanation:

The given mapping S is defined by f:{0,1}^4 -> {0,1} . So, number of functions from S will be 2^16. Now N is defined by f : S-> {0,1}. So Number of functions from S to {0,1} will be 2^S. Hence log_{2}log_{2}N = log_{2}S = 16

Question 61 |

Consider an undirected graph G where self-loops are not allowed. The vertex set of G is {(i, j): 1 <= i <= 12, 1 <= j <= 12}. There is an edge between (a, b) and (c, d) if |a − c| <= 1 and |b − d| <= 1.
The number of edges in this graph is __________.

500 | |

502 | |

506 | |

510 |

**Graph Theory**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 61 Explanation:

Given:The vertex set of G is {(i, j): 1 <= i <= 12, 1 <= j <= 12}. There is an edge between (a, b) and (c, d) if |a − c| <= 1 and |b − d| <= 1. There can be total 12*12 possible vertices. The vertices are (1, 1), (1, 2) ....(1, 12) (2, 1), (2, 2), ....The number of edges in this graph?Number of edges is equal to number of pairs of vertices that satisfy above conditions. For example, vertex pair {(1, 1), (1, 2)} satisfy above condition. For (1, 1), there can be an edge to (1, 2), (2, 1), (2, 2). Note that there can be self-loop as mentioned in the question. Same is count for (12, 12), (1, 12) and (12, 1) For (1, 2), there can be an edge to (1, 1), (2, 1), (2, 2), (2, 3), (1, 3) Same is count for (1, 3), (1, 4)....(1, 11), (12, 2), ....(12, 11) For (2, 2), there can be an edge to (1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2), (3, 3) Same is count for remaining vertices. For all pairs (i, j) there can total 8 vertices connected to them if i and j are not in {1, 12} There are total 100 vertices without a 1 or 12. So total 800 edges. For vertices with 1, total edges = (Edges where 1 is first part) + (Edges where 1 is second part and not first part) = (3 + 5*10 + 3) + (5*10) edges Same is count for vertices with 12 Total number of edges: = 800 + [(3 + 5*10 + 3) + 5*10] + [(3 + 5*10 + 3) + 5*10] = 800 + 106 + 106 = 1012 Since graph is undirected, two edges from v1 to v2 and v2 to v1 should be counted as one. So total number of undirected edges = 1012/2 = 506.

Question 62 |

An ordered n-tuple (d1, d2, … , dn) with d1 >= d2 >= ⋯ >= dn is called graphic if there exists a simple undirected graph with n vertices having degrees d1, d2, … , dn respectively. Which of the following 6-tuples is NOT graphic?

(1, 1, 1, 1, 1, 1) | |

(2, 2, 2, 2, 2, 2) | |

(3, 3, 3, 1, 0, 0) | |

(3, 2, 1, 1, 1, 0) |

**Graph Theory**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 62 Explanation:

The required graph is not possible with the given degree set of (3, 3, 3, 1, 0, 0). Using this 6-tuple the graph formed will be a Disjoint undirected graph, where the two vertices of the graph should not be connected to any other vertex ( i.e. degree will be 0 for both the vertices ) of the graph. And for the remaining 4 vertices the graph need to satisfy the degrees of (3, 3, 3, 1).

Let's see this with the help of a logical structure of the graph :

Let's say vertices labelled as <ABCDEF> should have their degree as <3, 3, 3, 1, 0, 0> respectively.

Now E and F should not be connected to any vertex in the graph. And A, B, C and D should have their degree as <3, 3, 3, 1> respectively. Now to fulfill the requirement of A, B and C, the node D will never be able to get its degree as 1. It's degree will also become as 3. This is shown in the above diagram.

Hence tuple <3, 3, 3, 1, 0, 0> is not graphic.

Question 63 |

Which one of the following propositional logic formulas is TRUE when exactly two of p, q, and r are TRUE?

A | |

B | |

C | |

D |

**Propositional and First Order Logic.**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 63 Explanation:

In option (B) :

We assume ‘p’ and ‘q’ to be TRUE. Therefore, ‘r’ is false because exactly two of ‘p’, ‘q’, and ‘r’ can be TRUE.

Here, two sub- expression are connected via OR operator and one of the sub-expression is TRUE. So, the complete expression becomes TRUE.

Therefore, option (B) evaluates to be TRUE.

Please comment below if you find anything wrong in the above post.

We assume ‘p’ and ‘q’ to be TRUE. Therefore, ‘r’ is false because exactly two of ‘p’, ‘q’, and ‘r’ can be TRUE.

**p <--> q**means if both ‘p’ and ‘q’ have same values then**p <--> q**is TRUE. So,**((p <--> r ) and r)**evaluates to be FALSE. Therefore,**~((p <--> r ) and r)**is TRUE.Here, two sub- expression are connected via OR operator and one of the sub-expression is TRUE. So, the complete expression becomes TRUE.

Therefore, option (B) evaluates to be TRUE.

Please comment below if you find anything wrong in the above post.

Question 64 |

Given the following schema:

employees(emp-id, first-name, last-name, hire-date, dept-id, salary) departments(dept-id, dept-name, manager-id, location-id)You want to display the last names and hire dates of all latest hires in their respective departments in the location ID 1700. You issue the following query:

SQL> SELECT last-name, hire-date FROM employees WHERE (dept-id, hire-date) IN (SELECT dept-id, MAX(hire-date) FROM employees JOIN departments USING(dept-id) WHERE location-id = 1700 GROUP BY dept-id);What is the outcome?

It executes but does not give the correct result. | |

It executes and gives the correct result. | |

It generates an error because of pairwise comparison. | |

It generates an error because the GROUP BY clause cannot be used with table joins in a subquery |

**SQL**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 64 Explanation:

The given query uses below inner query.

SELECT dept-id, MAX(hire-date) FROM employees JOIN departments USING(dept-id) WHERE location-id = 1700 GROUP BY dept-idThe inner query produces last max hire-date in every department located at location id 1700. The outer query simply picks all pairs of inner query. Therefore, the query produces correct result.

SELECT last-name, hire-date FROM employees WHERE (dept-id, hire-date) IN (Inner-Query);

Question 65 |

Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2 takes 25% less time but incurs 20% more CPI (clock cycles per instruction) as compared to the program running on P1. If the clock frequency of P1 is 1GHz, then the clock frequency of P2 (in GHz) is _________.

1.6 | |

3.2 | |

1.2 | |

0.8 |

**Process Management**

**GATE-CS-2014-(Set-1)**

**Discuss it**

Question 65 Explanation:

For P1 clock period = 1ns Let clock period for P2 be t. Now consider following equation based on specification 7.5 ns = 12*t ns We get t and inverse of t will be 1.6GHz

There are 65 questions to complete.