## Gate 2013

Question 1 |

A binary operation ⊕ on a set of integers is defined as x ⊕ y = x

^{2 }+ y^{2}. Which one of the following statements is**TRUE**about ⊕?Commutative but not associative | |

Both commutative and associative | |

Associative but not commutative | |

Neither commutative nor associative |

Question 1 Explanation:

Cumulative property:

A binary relation on a set S is called cumulative if a*b = b*a ∀ x,y∈S.

Associative property:

A binary relation on set is called associative if (a*b)*c = a*(b*c) ∀ x,y∈S.

Given x⊕y = x

Replace x, y in (1)

y⊕x = y

(x⊕y)⊕z = (x

= (x

= x

x⊕(y ⊕ z) = x ⊕ (y

= x

= x

A binary relation on a set S is called cumulative if a*b = b*a ∀ x,y∈S.

Associative property:

A binary relation on set is called associative if (a*b)*c = a*(b*c) ∀ x,y∈S.

Given x⊕y = x

^{2}+ y^{2}--------(1)Replace x, y in (1)

y⊕x = y

^{2}+ x^{2}which is same as (1), so this is cumulative(x⊕y)⊕z = (x

^{2}+ y^{2}) ⊕ z= (x

^{2}+ y^{2}) + z^{2}= x

^{2}+ y^{2}+ z^{2}+ 2x^{2}y^{2}----------(2)x⊕(y ⊕ z) = x ⊕ (y

^{2}+ z^{2})= x

^{2}+ (y^{2}+ z^{2})^{2}= x

^{2}+ y^{2}+ z^{2}+ 2y^{2z2 ----------- (3) (2) & (3) are not same so this is not associative. }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?

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

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

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

26/(2e ^{3}) |

Question 2 Explanation:

The formula for the Poisson probability mean function

P(x:λ)=(e

‘λ’ is the average number (mean)

Given that mean = λ = 3

The probability of observing fewer than three cars is

P(zero car) + P(one car) + P(two cars)

=(e

=e

=(17e

=17/(2e

P(x:λ)=(e

^{-λ}λ^{x})/x! for x = 0,1,2….‘λ’ is the average number (mean)

Given that mean = λ = 3

The probability of observing fewer than three cars is

P(zero car) + P(one car) + P(two cars)

=(e

^{-3}3^{0})/0!+(e^{-3}3^{1})/1!+(e^{-3}3^{2})/2!=e

^{-3}+e^{-3}∙3+(e^{-3})∙9)/2=(17e

^{-3<})/2=17/(2e

^{3})Question 3 |

Question 3 Explanation:

Try to derive options from the given matrix.

Observe that col 2 + col 3 will reuse x(x+1) term

C

_{2}→ C

_{1}+ C

_{2}

Question 4 |

The smallest integer that can be represented by an 8-bit number in 2’s complement form is

-256 | |

-128 | |

-127 | |

0 |

Question 4 Explanation:

The range of 8-bit signed numbers representable is – 2

The smallest 8-bit 2’s complement number is 1000 0000.

MSB is 1. So it is a negative number.

To know the magnitude again take 2’s complement of 1000 0000.

1000 0000

0111 1111 ← 1’s complement

1000 0000 ← 2’s complement (1’s complement +1)

= 128

-128 is 1000 0000 in 2’s complement representation.

^{n-1}to 2^{n-1}-1.The smallest 8-bit 2’s complement number is 1000 0000.

MSB is 1. So it is a negative number.

To know the magnitude again take 2’s complement of 1000 0000.

1000 0000

0111 1111 ← 1’s complement

1000 0000 ← 2’s complement (1’s complement +1)

= 128

-128 is 1000 0000 in 2’s complement representation.

Question 5 |

Priority encoder | |

Decoder | |

Multiplexer | |

Demultiplexer |

Question 5 Explanation:

It is a 2

^{2}× 2 encoder. The inputs have priorities. So, it is a priority encoder.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?

O(log n) | |

O(n) | |

O(n log n) | |

O(n ^{2}) |

Question 6 Explanation:

Best, Average and worst case will take maximum O(n) swaps.

Selection sort time complexity O(n

Selection sort time complexity O(n

^{2}) in terms of number of comparisons. Each of these scans requires one swap for n-1 elements (the final element is already in place).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?

O(1) | |

O(log n) | |

O(n) | |

O(n log n) |

Question 7 Explanation:

For skewed binary search tree on n nodes, the tightest upper bound to insert a node is O(n).

Question 8 |

Consider the languages L

_{1}= ϕ and L_{2 }= {a}. Which one of the following represents L_{1}L_{2}* ∪ L_{1}*?{є} | |

ϕ | |

a* | |

{є,a} |

Question 8 Explanation:

As we know, for any regular expression R,

Rϕ = ϕR=ϕ

So L

and L

So L

Rϕ = ϕR=ϕ

So L

_{1}L_{2}* = ϕand L

_{1}* = {ϕ}* = {ϵ}So L

_{1}L_{2}* ∪ L_{1}* = {ϵ}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?

n/2 | |

n-1 | |

2n-1 | |

2 ^{n} |

Question 9 Explanation:

Since it is given that the grammar cannot have:

1) epsilon production

2) production of the form A → a

Consider the grammar:

S → Sa | a

If we were to derive the string “aaa” whose length is 3 then the number of reduce moves that would have been required are shown below:

S→ Sa

→Saa

→aaa

This shows us that it has three reduce moves. The string length is 3 and the number of reduce moves is also 3. So presence of such kinds of production might give us the answer “n” for maximum number of reduce moves. But these productions are not allowed as per the question.

Also note that if a grammar does not have unit production then the maximum number of reduce moves can not exceed “n” where “n” denotes the length of the string.

3) No unit productions

Consider the grammar:

S→ A

A→ B

B→C

C→a

If we were to derive the string “a” whose length is 1 then the number of reduce moves that would have been required are shown below:

S→ A

A→ B

B→C

C→a

This shows us that it has four reduce moves. The string length is 1 and the number of reduce moves is 4. So presence of such kind of productions might give us the answer “n+1” or even more, for maximum number of reduce moves. But these productions are not allowed as per the question.

Now keeping in view the above points suppose we want to parse the string “abcd”. (n = 4) using bottom-up parsing where strings are parsed finding the rightmost derivation of a given string backwards. So here we are concentrating on deriving right most derivations only.

We can write the grammar which accepts this string which in accordance to the question, (i.e., with no epsilon- and unit-production (i.e., of type A → є and A → B) and no production of the form A→a) 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 the number of reductions present is 3.

We can get less number of reductions with some other grammar which also doesn’t produce unit or epsilon productions or production of the form A→a:

S→abA

A→ cd

The Right Most Derivation for the above is:

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.

1) epsilon production

2) production of the form A → a

Consider the grammar:

S → Sa | a

If we were to derive the string “aaa” whose length is 3 then the number of reduce moves that would have been required are shown below:

S→ Sa

→Saa

→aaa

This shows us that it has three reduce moves. The string length is 3 and the number of reduce moves is also 3. So presence of such kinds of production might give us the answer “n” for maximum number of reduce moves. But these productions are not allowed as per the question.

Also note that if a grammar does not have unit production then the maximum number of reduce moves can not exceed “n” where “n” denotes the length of the string.

3) No unit productions

Consider the grammar:

S→ A

A→ B

B→C

C→a

If we were to derive the string “a” whose length is 1 then the number of reduce moves that would have been required are shown below:

S→ A

A→ B

B→C

C→a

This shows us that it has four reduce moves. The string length is 1 and the number of reduce moves is 4. So presence of such kind of productions might give us the answer “n+1” or even more, for maximum number of reduce moves. But these productions are not allowed as per the question.

Now keeping in view the above points suppose we want to parse the string “abcd”. (n = 4) using bottom-up parsing where strings are parsed finding the rightmost derivation of a given string backwards. So here we are concentrating on deriving right most derivations only.

We can write the grammar which accepts this string which in accordance to the question, (i.e., with no epsilon- and unit-production (i.e., of type A → є and A → B) and no production of the form A→a) 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 the number of reductions present is 3.

We can get less number of reductions with some other grammar which also doesn’t produce unit or epsilon productions or production of the form A→a:

S→abA

A→ cd

The Right Most Derivation for the above is:

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.

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?This algorithm is equivalent to the first-come-first-serve algorithm. | |

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

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

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

Question 10 Explanation:

Lets take an ex:

Consider scheduler schedule processes priority after S times units so order of execution will be P1 P2 P3 P4 P1 P2 P3 P4 (S< execution time of any process) which is exactly same as round robin so answer – B.

Consider scheduler schedule processes priority after S times units so order of execution will be P1 P2 P3 P4 P1 P2 P3 P4 (S< execution time of any process) which is exactly same as round robin so answer – B.

Question 11 |

P-1, Q-2, R-3, S-4 | |

P-3, Q-4, R-2, S-1 | |

P-3, Q-1, R-4, S-2 | |

P-4, Q-3, R-2, S-1 |

Question 11 Explanation:

Note: Out of syllabus [Web Technologies].

Question 12 |

The transport layer protocols used for real time multimedia, file transfer, DNS and email, respectively are

TCP, UDP, UDP and TCP | |

UDP, TCP, TCP and UDP | |

UDP, TCP, UDP and TCP | |

TCP, UDP, TCP and UDP |

Question 12 Explanation:

Real time multimedia needs connectionless service, so underlying transport layer protocol used is UDP. File transfer runs over TCP protocol with port no-21.

DNS runs over UDP protocol within port no-53.

Email needs, SMTP protocol which runs over TCP protocol within port no –25.

DNS runs over UDP protocol within port no-53.

Email needs, SMTP protocol which runs over TCP protocol within port no –25.

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?

Encryption: X’s private key followed by Y’s private key; Decryption: X’s public key followed by Y’s public key | |

Encryption: X’s private key followed by Y’s public key; Decryption: X’s public key followed by Y’s private key | |

Encryption: X’s public key followed by Y’s private key; Decryption: Y’s public key followed by X’s private key | |

Encryption: X’s private key followed by Y’s public key; Decryption: Y’s private key followed by X’s public key |

Question 13 Explanation:

Encryption: Source has to encrypt with its private key for forming Digital signature for Authentication. Source has to encrypt the (M, σ) with Y’s public key to send it confidentially.

Decryption: Destination Y has to decrypt first with its private key, then decrypt using source public key.

Question 14 |

Network layer – 4 times and Data link layer – 4 times | |

Network layer – 4 times and Data link layer – 3 times | |

Network layer – 4 times and Data link layer – 6 times | |

Network layer – 2 times and Data link layer – 6 times |

Question 14 Explanation:

From above given diagram, its early visible that packet will visit network layer 4 times, once at each node [S, R, R, D] and packet will visit Data Link layer 6 times. One time at S and one time at D, then two times for each intermediate router R as data link layer is used for link to link communication.

One at packet reaches R and goes up from physical –DL-Network and second time when packet coming out of router in order Network –DL-Physical.

Question 15 |

An index is clustered, if

it is on a set of fields that form a candidate key. | |

it is on a set of fields that include the primary key. | |

the data records of the file are organized in the same order as the data entries of the index. | |

the data records of the file are organized not in the same order as the data entries of the index. |

Question 15 Explanation:

Option (A) and Option (B) are not correct because, index can be created using any column or combination of columns, which need not be unique.

Basically, Indexed column is used to sort the rows of table. Whole data record of file is sorted using index so the correct option is (C).

Basically, Indexed column is used to sort the rows of table. Whole data record of file is sorted using index so the correct option is (C).

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?

X: P(a)P(b)P(c) Y: P(b)P(c)P(d) Z: P(c)P(d)P(a) | |

X: P(b)P(a)P(c) Y: P(b)P(c)P(d) Z: P(a)P(c)P(d) | |

X: P(b)P(a)P(c) Y: P(c)P(b)P(d) Z: P(a)P(c)P(d) | |

X: P(a)P(b)P(c) Y: P(c)P(b)P(d) Z: P(c)P(d)P(a) |

Question 16 Explanation:

Trick to check deadlock in the given code proceed parallely i.e., first executed the first line of all the processes then executed the second line of all processes and so on.

Question 17 |

1 and 4 only | |

1 and 3 only | |

2 only | |

3 only |

Question 17 Explanation:

As we can convert a non-deterministic TM into an equivalent deterministic Turing machine so the statement “for every non-deterministic Turing machine, there exists an equivalent deterministic Turing machine” is true.

Turing recognizable means recursively enumerable languages which is closed under UNION but they are not closed under complementation, so statement 2 is false.

Turing decidable means recursive languages and they are closed under Intersection and complementation.

Turing recognizable means recursively enumerable languages which is closed under UNION and INTERSECTION.

Turing recognizable means recursively enumerable languages which is closed under UNION but they are not closed under complementation, so statement 2 is false.

Turing decidable means recursive languages and they are closed under Intersection and complementation.

Turing recognizable means recursively enumerable languages which is closed under UNION and INTERSECTION.

Question 18 |

1, 2 and 3 | |

1 and 2 only | |

2 and 3 only | |

1 and 3 only |

Question 18 Explanation:

Note: Out of syllabus.

1. Detecting cycle in a graph using DFS takes O(V+E)=O(V

Here, for complete graph E<= V

2. Every P-problem is NP because P subset of NP (P ⊂ NP)

3. NP – complete ∈ NP.

Hence, NP-complete can be solved in non-deterministic polynomial time.

1. Detecting cycle in a graph using DFS takes O(V+E)=O(V

^{2})Here, for complete graph E<= V

^{2}. So, It runs in polynomial time.2. Every P-problem is NP because P subset of NP (P ⊂ NP)

3. NP – complete ∈ NP.

Hence, NP-complete can be solved in non-deterministic polynomial time.

Question 19 |

What is the time complexity of Bellman-Ford single-source shortest path algorithm on a complete graph of n vertices?

Θ(n ^{2}) | |

Θ(n ^{2} log n) | |

Θ(n ^{3}) | |

Θ(n ^{3} log n) |

Question 19 Explanation:

The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. It is capable of handling graphs in which some of the edge weights are negative numbers.

Bellman–Ford runs in O(|V| * |E|)} time, where |V| and |E| are the number of vertices and edges respectively.

Note: For complete graph: |E|=n(n-1)/2=(n

Bellman–Ford runs in O(|V| * |E|)} time, where |V| and |E| are the number of vertices and edges respectively.

Note: For complete graph: |E|=n(n-1)/2=(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

(j mod v) * k to (j mod v) * k + (k-1) | |

(j mod v) to (j mod v) + (k-1) | |

(j mod k) to (j mod k) + (v-1) | |

(j mod k) * v to (j mod k) * v + (v-1) |

Question 20 Explanation:

Number of sets in cache = v.
A block numbered j will be mapped to set number (j mod v). Since it is k-way set associative cache, there are k blocks in each set. It is given in the question that the blocks in consecutive sets are sequenced. It means for set-0 the cache lines are numbered 0, 1, .., k-1 and for set-1, the cache lines are numbered k, k+1,... k+k-1 and so on. As the main memory block j will be mapped to set (j mod v), it will be any one of the cache lines from (j mod v) * k to (j mod v) * k + (k-1).

Question 21 |

Which one of the following expressions does

**NOT**represent exclusive NOR of x and y?xy+x'y' | |

x⊕y' | |

x'⊕y | |

x'⊕y' |

Question 21 Explanation:

x ⊕ y = x’y + xy’

x’ ⊕ y’ = xy’ + x’y = x⊕y. Hence option D is correct.

x’ ⊕ y’ = xy’ + x’y = x⊕y. Hence option D is correct.

Question 22 |

Which one of the following functions is continuous at x = 3?

Question 22 Explanation:

Option A:

At x = 3, f(x) = 2

LHL (3), f(3

RHL (3), f(3

∴ f(x) is continuous.

Option B:

At x = 3, f(x) = 4

For x ≠ 3, f(x)=f(3

This is not continuous.

Option C:

At x ≤ 3, f(x) = x+3 = 3+3 = 6

At RHL(3), f(3

This is not continuous.

Option D:

f(x) at x=3 is not defined.

There is a break at x=3, so this is not continuous.

At x = 3, f(x) = 2

LHL (3), f(3

^{-})=(x+3 )/3=(3+3)/3=2RHL (3), f(3

^{+})=x-1=3-1=2∴ f(x) is continuous.

Option B:

At x = 3, f(x) = 4

For x ≠ 3, f(x)=f(3

^{+})=f(3^{-})=8^{-x}=8-3=5This is not continuous.

Option C:

At x ≤ 3, f(x) = x+3 = 3+3 = 6

At RHL(3), f(3

^{+})=4This is not continuous.

Option D:

f(x) at x=3 is not defined.

There is a break at x=3, so this is not continuous.

Question 23 |

8.983 | |

9.003 | |

9.017 | |

9.045 |

Question 23 Explanation:

Note:
Numerical methods are not in GATE syllabus now.

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?

1/8 | |

1 | |

7 | |

8 |

Question 24 Explanation:

Among available ‘8’ vertices, we need to identify the cycles of length ‘3’.

The probability that there exists one edge between two vertices = 1/2

So, the total probability that all three edges of the above exists

= 1/2 × 1/2 × 1/2 (as they are independent events)

= 1/8

Total number of ways in which we can select ‘3’ such vertices among ‘8’ vertices =

Total number of cycles of length ‘3’ out of 8 vertices = 56 × 1/8 = 7

The probability that there exists one edge between two vertices = 1/2

So, the total probability that all three edges of the above exists

= 1/2 × 1/2 × 1/2 (as they are independent events)

= 1/8

Total number of ways in which we can select ‘3’ such vertices among ‘8’ vertices =

^{8}C_{3}= 56Total number of cycles of length ‘3’ out of 8 vertices = 56 × 1/8 = 7

Question 25 |

P only | |

Q only | |

Both P and Q | |

Neither P nor Q |

Question 25 Explanation:

Euler’s Theorem 3:

The sum of the degrees of all the vertices of a graph is an even number (exactly twice the number of edges).

In every graph, the number of vertices of odd degree must be even.

The sum of the degrees of all the vertices of a graph is an even number (exactly twice the number of edges).

In every graph, the number of vertices of odd degree must be even.

Question 26 |

P only | |

P and R only | |

R only | |

P, Q and S only |

Question 26 Explanation:

P) True. Because every edge in cycle graph will become a vertex in new graph L(G) and every vertex of cycle graph will become an edge in new graph.

R) False. We can give counter example. Let G has 5 vertices and 9 edges which is planar graph. Assume degree of one vertex is 2 and of all others are 4. Now, L(G) has 9 vertices (because G has 9 edges) and 25 edges. But for a graph to be planar,

|E| ≤ 3|v| - 6

For 9 vertices |E| ≤ 3 × 9 - 6

⇒ |E| ≤ 27 - 6

⇒ |E| ≤ 21. But L(G) has 25 edges and so is not planar.

As (R) is false, option (B) & (C) are eliminated.

R) False. We can give counter example. Let G has 5 vertices and 9 edges which is planar graph. Assume degree of one vertex is 2 and of all others are 4. Now, L(G) has 9 vertices (because G has 9 edges) and 25 edges. But for a graph to be planar,

|E| ≤ 3|v| - 6

For 9 vertices |E| ≤ 3 × 9 - 6

⇒ |E| ≤ 27 - 6

⇒ |E| ≤ 21. But L(G) has 25 edges and so is not planar.

As (R) is false, option (B) & (C) are eliminated.

Question 27 |

∃x(F(x)∧¬P(x)) | |

∃x(¬F(x)∧P(x)) | |

∃x(¬F(x)∧¬P(x)) | |

¬∃x(F(x)∧P(x)) |

Question 27 Explanation:

Let F(x) = x is my friend

P(x) = x is perfect

The meaning of ∃x(P(x)∧F(x)) is atleast one person who is my friend and perfect.

The negation of ∃x(P(x)∧F(x)) is “This is not the case that atlease one person who is my friend and perfect”.

So ~∃x(P(x)∧F(x)) is none of my friends are perfect.

P(x) = x is perfect

The meaning of ∃x(P(x)∧F(x)) is atleast one person who is my friend and perfect.

The negation of ∃x(P(x)∧F(x)) is “This is not the case that atlease one person who is my friend and perfect”.

So ~∃x(P(x)∧F(x)) is none of my friends are perfect.

Question 28 |

Instruction fetch | |

Operand fetch | |

Conditional branch | |

Initiation of interrupt service |

Question 28 Explanation:

We know PC holds the value of the next instruction to be executed. Here the value of PC is stored in MBR( MBR ← PC ) and then to the memory (Memory ← MBR). We are saving the value of PC in memory and a new address is loaded into the PC (PC ← Y), so we start executing from the new address Y which is loaded into PC. So this behaviour matches with the interrupt service execution as we have already saved the address of current running instruction into memory and then we are loading new address in to the PC and start executing from there.
Hence option D is the answer.

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?

1281 | |

1282 | |

1283 | |

1284 |

Question 29 Explanation:

It is given that we have 16 recording surfaces and 16384 cylinders, each cylinder contains 64 sectors and starting address is <1200, 9, 40>. Capacity of each sector is 512Bytes.

Suppose we have x cylinders & in each cylinder we have 16 surface and 64 sectors so we need to store 42797 KB of data.

x * 16* 64 *512 + 16*64* 512 + 64* 512 = 42797 KB , by solving this we get x = 82.5 so we need 83 cylinders.

We can add this to the no. of cylinders in the starting address <1200, 9 ,40 >, i.e. 1200, but we also need to cover 40 more sectors which will need one more cylinder, this cylinder is not full but still it has to be accommodated.

Hence 1200+83+1 = 1284 and currently we will be on 1284 cylinder.

Suppose we have x cylinders & in each cylinder we have 16 surface and 64 sectors so we need to store 42797 KB of data.

x * 16* 64 *512 + 16*64* 512 + 64* 512 = 42797 KB , by solving this we get x = 82.5 so we need 83 cylinders.

We can add this to the no. of cylinders in the starting address <1200, 9 ,40 >, i.e. 1200, but we also need to cover 40 more sectors which will need one more cylinder, this cylinder is not full but still it has to be accommodated.

Hence 1200+83+1 = 1284 and currently we will be on 1284 cylinder.

Question 30 |

The number of elements that can be sorted in Θ(log n) time using heap sort is

Θ(1) | |

Θ(√logn) | |

Θ (logn/loglogn) | |

Θ(log n) |

Question 30 Explanation:

Using heap sort to n elements it will take O(n log n) time. Assume there are log n/ log log n elements in the heap.

So, Θ((logn/ log log n)log(logn/log log n))

= Θ(logn/log logn (log logn - log log logn))

= Θ((log n/log logn) × log log n)

= Θ (log n)

Hence, option (C) is correct answer.

So, Θ((logn/ log log n)log(logn/log log n))

= Θ(logn/log logn (log logn - log log logn))

= Θ((log n/log logn) × log log n)

= Θ (log n)

Hence, option (C) is correct answer.

Question 31 |

Θ(n ^{2}) | |

Θ(n ^{2} log n) | |

Θ(n ^{3}) | |

Θ(n ^{3} logn) |

Question 31 Explanation:

Outer loop runs for (n/2) times and inner loop runs for (logn) times.

So, the total number of times loop runs is (n/2 logn).

So, the final k value will be n/2*(n/2 logn) = O(n

= (n/2+1).n/2 ∙log n

= (n

So, the total number of times loop runs is (n/2 logn).

So, the final k value will be n/2*(n/2 logn) = O(n

^{2}logn)= (n/2+1).n/2 ∙log n

= (n

^{2}log n)Question 32 |

L _{2} is context-free. | |

L _{1}∩ L_{2} is context-free. | |

Complement of L _{2} is recursive. | |

Complement of L _{1} is context-free but not regular. |

Question 32 Explanation:

L

Intersection of a regular language with a context free language is context free language (by closure properties of regular language) So L

L

Since L

_{1}= 0*1*0* which is regular language and in L_{2}we have one comparison (i.e. p ≠ r) so it is CFL.Intersection of a regular language with a context free language is context free language (by closure properties of regular language) So L

_{1}∩ L_{2}is context-free.L

_{2}is CFL and CFL is not closed under complementation so we have to assume L_{2}as CSL (since every CFL is CSL) and CSL is closed under complement so Complement of L_{2}must be CSL and every CSL is recursive so Complement of L_{2}is recursive.Since L

_{1}is regular and regular language is closed under complement so complement of L_{1}must be regular and hence the statement Complement of L_{1}is context-free but not regular is a false statement.Question 33 |

1 and 3 only | |

2 and 4 only | |

2 and 3 only | |

3 and 4 only |

Question 33 Explanation:

L(A) is regular and its complement is also regular (by closure property) and every regular is CFL also. So Complement of LA is context-free.

The regular expression corresponding to the given FA is

Hence we have regular expression: (11*0 +0) (0+1)*

Since we have (0+1)* at the end so if we write 0*1* after this it will not have any effect, the reason is whenever string ends with the terminals other than 1*0* there we can assume 1*0* as epsilon.

So it is equivalent to (11*0 +0) (0+1)*0*1*

The given DFA can be minimised, since the non-final states are equivalent and can be merged and the min DFA will have two states which is given below:

Hence statement 3 is false.

Since DFA accept string “0” whose length is one, so the statement “A accepts all strings over {0, 1} of length at least 2” is false statement.

The regular expression corresponding to the given FA is

Hence we have regular expression: (11*0 +0) (0+1)*

Since we have (0+1)* at the end so if we write 0*1* after this it will not have any effect, the reason is whenever string ends with the terminals other than 1*0* there we can assume 1*0* as epsilon.

So it is equivalent to (11*0 +0) (0+1)*0*1*

The given DFA can be minimised, since the non-final states are equivalent and can be merged and the min DFA will have two states which is given below:

Hence statement 3 is false.

Since DFA accept string “0” whose length is one, so the statement “A accepts all strings over {0, 1} of length at least 2” is false statement.

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?

-2 | |

-1 | |

1 | |

2 |

Question 34 Explanation:

Suppose, 'W' executes first, and makes value of semaphore S=1. Now it increment value of x to 1 and comes out and make S=2. Now 'X' executes, where the value of x=1 is stored in R

_{1}and then R

_{1}is incremented and value in R

_{1}is 2. Now 'X' gets preempted. Also to be noted that value of semaphore S is now '1' because the execution during process X got preempted and wasn't able to increase value of S to 2.

Now process Y will get completely execute and then Z will get completely execute. Now the value of 'x' is -3. Now again 'X' will get executed and the value stored in R

_{1}i.e., '2' will get stored in 'x'. So the value in 'x' will be finally 2.

So the maximum possible value of 'x' is 2.

Question 35 |

I, II, III and IV | |

I, II and III only | |

I, II and IV only | |

II, III and IV only |

Question 35 Explanation:

Four queries given in SQL, RA, TRC and DRC and all four statements will retrieve the required information.

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.

1 | |

2 | |

2.5 | |

5 |

Question 36 Explanation:

500×10

∴10

1 sec------2×10

1/5×10

Maximum length of cable=4/2=2 km

^{6}bits ------ 1 sec∴10

^{4}bits -----5×10^{8}/10^{4}=10^{4}/5×10^{8}sec=1/5×10^{4}sec1 sec------2×10

^{5}km1/5×10

^{4}-----2×10^{5}/5×10^{4}= 4 kmMaximum length of cable=4/2=2 km

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

Last fragment, 2400 and 2789 | |

First fragment, 2400 and 2759 | |

Last fragment, 2400 and 2759 | |

Middle fragment, 300 and 689 |

Question 37 Explanation:

M = 0 - Means there is no fragment after this, i.e. Last fragment.

HLEN = 10 - So header length is 4×10=40, as 4 is constant scale factor.

Total Length = 400 (40 Byte Header + 360 Byte Payload)

Fragment Offset = 300, that means 300×8 Byte = 2400 bytes are before this last fragment.

So the position of datagram is last fragment.

Sequence number of First Byte of Payload = 2400 (as 0 to 2399 Sequence no are used)

Sequence number of Last Byte of Payload = 2400+360-1=2759

HLEN = 10 - So header length is 4×10=40, as 4 is constant scale factor.

Total Length = 400 (40 Byte Header + 360 Byte Payload)

Fragment Offset = 300, that means 300×8 Byte = 2400 bytes are before this last fragment.

So the position of datagram is last fragment.

Sequence number of First Byte of Payload = 2400 (as 0 to 2399 Sequence no are used)

Sequence number of Last Byte of Payload = 2400+360-1=2759

Question 38 |

There is no change. | |

Average cohesion goes up but coupling is reduced. | |

Average cohesion goes down and coupling also reduces. | |

Average cohesion and coupling increase. |

Question 38 Explanation:

Note: Software Engineering is not a part of GATE syllabus now.

Question 39 |

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

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

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

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

Question 39 Explanation:

The solution is using a binary semaphore. X and Y are two different processes whatever the values inserted by the processes in the array that will be used by process Y afterwards.

Option C - Correct because each and every value inserted by the process X in the array will be immediately consumed by process Y.

Option C - Correct because each and every value inserted by the process X in the array will be immediately consumed by process Y.

Question 40 |

1 only | |

2 only | |

1 and 4 only | |

1, 2, 3 and 4 |

Question 40 Explanation:

The two sets in LR(1) items can be merged if they only differ with look aheads symbols, so statement 1 is false.

In the given LR(1) items there is not any reduce move, so after merging it will not have SR conflict and hence statement 2 and statement 3 are false.

Statement 4 is also wrong, because goto is carried on Non-Terminals symbols, not on terminal symbols, and c is a terminal symbol.

Hence all statements are false.

In the given LR(1) items there is not any reduce move, so after merging it will not have SR conflict and hence statement 2 and statement 3 are false.

Statement 4 is also wrong, because goto is carried on Non-Terminals symbols, not on terminal symbols, and c is a terminal symbol.

Hence all statements are false.

Question 41 |

3 only | |

3 and 4 only | |

1, 2 and 3 only | |

2 and 3 only |

Question 41 Explanation:

Emptiness problem for context free language is decidable, so 1 is decidable.

Completeness problem for context free language is undecidable, so 2 is undecidable.

Whether language generated by a Turing machine is regular is also undecidable, so 3 is undecidable.

Language accepted by an NFA and by a DFA is equivalent is decidable, so 4 is decidable.

Completeness problem for context free language is undecidable, so 2 is undecidable.

Whether language generated by a Turing machine is regular is also undecidable, so 3 is undecidable.

Language accepted by an NFA and by a DFA is equivalent is decidable, so 4 is decidable.

Question 42 |

3024 | |

6561 | |

55440 | |

161051 |

Question 42 Explanation:

Since it is f(p,p)

f(5,5)→f(x,4)*x

f(x,3)*x*x

f(x,2)*x*x*x

⇒x*x*x*x=x

Now x=x+1, there are 4 different calls namely f(6,4),f(7,3),f(8,2),f(9,1)

Because of pass by reference, x in all earlier functions is replaced with 9.

⇒ 9*9*9*9=9

f(5,5)→f(x,4)*x

f(x,3)*x*x

f(x,2)*x*x*x

⇒x*x*x*x=x

^{4}Now x=x+1, there are 4 different calls namely f(6,4),f(7,3),f(8,2),f(9,1)

Because of pass by reference, x in all earlier functions is replaced with 9.

⇒ 9*9*9*9=9

^{4}=6561Question 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?

10, 20, 15, 23, 25, 35, 42, 39, 30 | |

15, 10, 25, 23, 20, 42, 35, 39, 30 | |

15, 20, 10, 23, 25, 42, 35, 39, 30 | |

15, 10, 23, 25, 20, 35, 42, 39, 30 |

Question 43 Explanation:

From the data,

The Postorder traversal sequence is:

→ 15, 10, 23, 25, 20, 35, 42, 39, 30.

Question 44 |

Θ(n) | |

Θ(n + k) | |

Θ(nk) | |

Θ(n ^{2}) |

Question 44 Explanation:

Initially the queue is empty and we have to perform n operations.

i. One option is to perform all Enqueue operations i.e. n Enqueue operations. Complexity will be Ѳ(n).

or

ii. We can perform a mix of Enqueue and Dequeue operations. It can be Enqueue for first n/2 times and then Dequeue for next n/2, or Enqueue and Dequeue alternately, or any permutation of Enqueues and Dequeues totaling ‘n’ times. Completity will be Ѳ(n).

or iii. We can perform Enqueues and MultiDequeues. A general pattern could be as follows: Enqueue Enqueue …(ktimes) MultiDequeue Enqueue Enqueue …(ktimes) MultiDequeue …Up to total n …. K items enqueued ….k items deleted….k items enqueued…..k items deleted --- and so on.

The number of times this k-Enqueues, MultiDequeue cycle is performed = n/k+1

So, Complexity will be k times Enqueue + 1 MultiDequeue) ×n/k+1

Which is (2k×n/k+1) = (n)

or

iv. We can just perform n MultiDequeues (or n Dequeues for the matter):

Each time the while condition is false (empty queue), condition is checked just once for each of the ‘n’ operations. So Ѳ(n).

i. One option is to perform all Enqueue operations i.e. n Enqueue operations. Complexity will be Ѳ(n).

or

ii. We can perform a mix of Enqueue and Dequeue operations. It can be Enqueue for first n/2 times and then Dequeue for next n/2, or Enqueue and Dequeue alternately, or any permutation of Enqueues and Dequeues totaling ‘n’ times. Completity will be Ѳ(n).

or iii. We can perform Enqueues and MultiDequeues. A general pattern could be as follows: Enqueue Enqueue …(ktimes) MultiDequeue Enqueue Enqueue …(ktimes) MultiDequeue …Up to total n …. K items enqueued ….k items deleted….k items enqueued…..k items deleted --- and so on.

The number of times this k-Enqueues, MultiDequeue cycle is performed = n/k+1

So, Complexity will be k times Enqueue + 1 MultiDequeue) ×n/k+1

Which is (2k×n/k+1) = (n)

or

iv. We can just perform n MultiDequeues (or n Dequeues for the matter):

Each time the while condition is false (empty queue), condition is checked just once for each of the ‘n’ operations. So Ѳ(n).

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 I

_{1}, I_{2}, I_{3}, ..., I_{12}is executed in this pipelined processor. Instruction I_{4}is the only branch instruction and its branch target is I_{9}. If the branch is taken during the execution of this program, the time (in ns) needed to complete the program is132 | |

165 | |

176 | |

328 |

Question 45 Explanation:

Cycle time = max of all stage delays + buffer delay = max (5 ns, 7 ns, 10 ns, 8 ns, 6 ns) + 1 = 10+1 = 11ns

Out of all the instructions I

_{1}, I

_{2}, I

_{3}....I

_{12}it is given that only I

_{4}is a branch instruction and when I

_{4}takes branch the control will jump to instruction I

_{9}as I

_{9}is the target instruction.

As can be seen from the timing diagram there is a gap of only 3 stall cycles between I

_{4}and I

_{9}because after I

_{4}enters Decode Instruction (DI) whether there is a branch or not will be known at the end of Execute Instruction (EI) phase. So there are total 3 phases here namely DI, FO, EI. After 3 stall cycles I

_{9}will start executing as that is the branch target.

As per the timing diagram total no. of clock cycles to complete the program = 15

Since 1 clock cycle = 11ns, time to complete the program = 15*11 = 165ns

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

4 | |

5 | |

6 | |

7 |

Question 46 Explanation:

The capacity of the RAM needed = 16K

Capacity of the chips available = 1K

No. of address lines = 16K/1K = 16

Hence we can use 4 × 16 decoder for this. But we were only given 2 × 4 decoders.

So 4 decoders are required in inner level as from one 2×4 decoder we have only 4 output lines whereas we need 16 output lines.

Now to point to these 4 decoders, another 2×4 decoder is required in the outer level.

Hence no. of 2×4 decoders to realize the above implementation of RAM = 1 + 4 = 5

Capacity of the chips available = 1K

No. of address lines = 16K/1K = 16

Hence we can use 4 × 16 decoder for this. But we were only given 2 × 4 decoders.

So 4 decoders are required in inner level as from one 2×4 decoder we have only 4 output lines whereas we need 16 output lines.

Now to point to these 4 decoders, another 2×4 decoder is required in the outer level.

Hence no. of 2×4 decoders to realize the above implementation of RAM = 1 + 4 = 5

Question 47 |

Which one of the following is

**NOT**logically equivalent to ¬∃x(∀y(α) ∧ ∀z(β))?∀x(∃z(¬β)→∀y(α)) | |

∀x(∀z(β)→∃y(¬α)) | |

∀x(∀y(α)→∃z(¬β)) | |

∀x(∃y(¬α)→∃z(¬β)) |

Question 47 Explanation:

Option A:

∀x(∃z(¬β) → ∀y(α))

⇒ ∀x(¬∃z(¬β) ∨ ∀y(α))

⇒ ∀x(∀z(β)∨y(α))

⇒ ¬∃x¬(∀z(β)∨∀y(α))

⇒ ¬∃x(¬∀z(β)∧¬∀y(α))

A is Not equivalent to the given.

Option B:

∀x(∀z(β)→∃y(¬α))

⇒ ∀x(¬∀z(β)∨∃y(¬α))

⇒ ¬∃x¬(¬∀z(β)∨∃y(¬α))

⇒ ¬∃x(∀z(β)∨∀y(α))

B is Matching and equivalent to given.

Option C:

∀x(∀y(α)→∃z(¬β))

⇒ ∀x(¬∀y(α)∨∃z(¬β))

⇒ ¬∃x¬(¬∀y(α)∨∃z(¬β))

⇒ ¬∃x(∀y(α)∧z(β))

C is equivalent to the given.

Option D:

∀x(∃y(¬α)→∃z(¬β))

⇒ ∀x(¬∃y(¬α)∨∃z(β))

⇒ ∀x(∀y(α)∨∃z(β))

⇒ ¬∃x¬(∀y(α)∨∃z(β))

⇒ ¬∃x(¬∀y(α)∧¬∃z(β))

⇒ ¬∃x(¬∀y(α)∧∀z(¬β))

So D is Not equivalent to the given.

∀x(∃z(¬β) → ∀y(α))

⇒ ∀x(¬∃z(¬β) ∨ ∀y(α))

⇒ ∀x(∀z(β)∨y(α))

⇒ ¬∃x¬(∀z(β)∨∀y(α))

⇒ ¬∃x(¬∀z(β)∧¬∀y(α))

A is Not equivalent to the given.

Option B:

∀x(∀z(β)→∃y(¬α))

⇒ ∀x(¬∀z(β)∨∃y(¬α))

⇒ ¬∃x¬(¬∀z(β)∨∃y(¬α))

⇒ ¬∃x(∀z(β)∨∀y(α))

B is Matching and equivalent to given.

Option C:

∀x(∀y(α)→∃z(¬β))

⇒ ∀x(¬∀y(α)∨∃z(¬β))

⇒ ¬∃x¬(¬∀y(α)∨∃z(¬β))

⇒ ¬∃x(∀y(α)∧z(β))

C is equivalent to the given.

Option D:

∀x(∃y(¬α)→∃z(¬β))

⇒ ∀x(¬∃y(¬α)∨∃z(β))

⇒ ∀x(∀y(α)∨∃z(β))

⇒ ¬∃x¬(∀y(α)∨∃z(β))

⇒ ¬∃x(¬∀y(α)∧¬∃z(β))

⇒ ¬∃x(¬∀y(α)∧∀z(¬β))

So D is Not equivalent to the given.

Question 48 |

0 | |

1 | |

2 | |

3 |

Question 48 Explanation:

After applying the code motion optimization the statement d = c*a; and e = c+a; can be moved down to else block as d and c are not used anywhere before that and also value of a and c is not changing.

In the above code total number of spills to memory is 1.

In the above code total number of spills to memory is 1.

Question 49 |

3 | |

4 | |

5 | |

6 |

Question 49 Explanation:

Let R

The 1st statement c = a + b; can be written as R

Let R

Let R

We can reuse R

We can write the 4th statement x = c*c; as R

Using the four registers R

if (x > a) {

y = a * a;

}

else {

d = d * d;

e = e * e;

}

So the minimum no. of registers needed is 4.

_{1}← a, R_{2}← bThe 1st statement c = a + b; can be written as R

_{2}= R_{1}+R_{2}, here R_{2}is used to store the value of 'c' as we don't need 'b' any further.Let R

_{3}be used to store 'd', so we can write the 2nd statement d = c * a; as R_{3}= R_{2}*R_{1}Let R

_{4}be used to store 'e', so we can write the 3rd statement e = c + a; as R_{4}= R_{2}+R_{1}We can reuse R

_{2}to store 'x' as the value of 'c' is not needed after statement-4.We can write the 4th statement x = c*c; as R

_{2}= R_{2}*R_{2};Using the four registers R

_{1}, R_{2}, R_{3}and R_{4}we can write the remaining statements of the program without needing any new registers...if (x > a) {

y = a * a;

}

else {

d = d * d;

e = e * e;

}

So the minimum no. of registers needed is 4.

Question 50 |

Only one | |

Only two | |

Only three | |

All four |

Question 50 Explanation:

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”

Given input string of length 5 consisting of a, b, c, d, e, duplicates allowed.

Similarly for (4), we done 2 replacements for A[0] with element newc[0] & newc[1].

Updating the newc value with another newc value is called as a flaw here. Hence 2 flaws.

{

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”

Given input string of length 5 consisting of a, b, c, d, e, duplicates allowed.

Similarly for (4), we done 2 replacements for A[0] with element newc[0] & newc[1].

Updating the newc value with another newc value is called as a flaw here. Hence 2 flaws.

Question 51 |

None | |

2 only | |

3 and 4 only | |

4 only |

Question 51 Explanation:

The test cases 3 & 4 captures the flaw. The code does not works fine when an old character is replaced by a new character & new character is again replaced by another new character.

1, 2 works fine, 3, 4 carries flaw.

1, 2 works fine, 3, 4 carries flaw.

Question 52 |

2 | |

4 | |

8 | |

16 |

Question 52 Explanation:

Let the size of page is = 2

So the no. of entries in one page is 2

So we know that process size or virtual address space size is equal to

No. of entries × Page size

So total no. of entries for 3 level page table is,

(2

So, No. of entries × Page size = VAS

(2

2

4p = 52

p = 13

∴ Page size = 2

^{p}BSo the no. of entries in one page is 2

^{p}/4, where 4 is the page table entry size given in question.So we know that process size or virtual address space size is equal to

No. of entries × Page size

So total no. of entries for 3 level page table is,

(2

^{p}/4)×(2^{p}/4)×(2^{p}/4)So, No. of entries × Page size = VAS

(2

^{p}/4)×(2^{p}/4)×(2^{p}/4)× (2^{p}) = 2^{46}2

^{4p}= 2^{52}4p = 52

p = 13

∴ Page size = 2

^{13}Question 53 |

2 | |

4 | |

8 | |

16 |

Question 53 Explanation:

Architecture of physically indexed cache:

Architecture of virtual indexed physically tagged (VIPT):

VIPT cache and aliasing effect and synonym.

Alias: Same physical address can be mapped to multiple virtual addresses.

Synonym: Different virtual addresses mapped to same physical address (for data sharing).

So these synonyms should be in same set to avoid write-update problems.

In our problem VA = 46bits

We are using 16bits for indexing into cache.

To have two synonym is same set we need to have same 16 bits index for PA & VA.

Assume that physical pages are colored and each set should have pages of same color so that any synonyms are in same set.

Since page size = 8KB ⇒ 13bits

These 13bits are not translated during VA→PA. So 13bits are same out of 16 Index bits, 13 are same we need to make 3bits (16-13) same now.

3bits can produce, 2

Architecture of virtual indexed physically tagged (VIPT):

VIPT cache and aliasing effect and synonym.

Alias: Same physical address can be mapped to multiple virtual addresses.

Synonym: Different virtual addresses mapped to same physical address (for data sharing).

So these synonyms should be in same set to avoid write-update problems.

In our problem VA = 46bits

We are using 16bits for indexing into cache.

To have two synonym is same set we need to have same 16 bits index for PA & VA.

Assume that physical pages are colored and each set should have pages of same color so that any synonyms are in same set.

Since page size = 8KB ⇒ 13bits

These 13bits are not translated during VA→PA. So 13bits are same out of 16 Index bits, 13 are same we need to make 3bits (16-13) same now.

3bits can produce, 2

^{3}= 8 combinations which can be mapped on the different sets, so we need 8 different colors to color our pages. >br> In physically indexed cache indexing is done via physical address bits, but in virtual indexed cache, cache is indexed from (offset + set) bits. In physical Index cache indexing is done one to one (1 index maps to one page in one block of cache). In VIPT we have more/ extra bits, so mapping is not one-one. Hence these extra bits have to be taken care, such that if two virtual address refers to same page in cache block of different sets then they have to be assumed same i.e., we say of same color and put same color page in one set to avoid write update problems.Question 54 |

3 | |

4 | |

5 | |

6 |

Question 54 Explanation:

The attribute D is not part of any FD's. So D can be a candidate key or it may be part of the candidate key.

Now D+ = {D}.

Hence we have to add A,B,C,E,F,G,H to D and check which of them are Candidate keys of size 2.

AD

BD

ED

FD

But CD

Hence no. of candidate keys are 4: AD, BD, ED, FD.

Now D+ = {D}.

Hence we have to add A,B,C,E,F,G,H to D and check which of them are Candidate keys of size 2.

AD

^{+}= {ABCDEFGH}BD

^{+}= {ABCDEFGH}ED

^{+}= {ABCDEFGH}FD

^{+}= {ABCDEFGH} But CD

^{+}, GD^{+}and HD^{+}does not give all the attributes hence CD, GD and HD are not candidate keys. Hence no. of candidate keys are 4: AD, BD, ED, FD.

Question 55 |

in 1NF, but not in 2NF. | |

in 2NF, but not in 3NF. | |

in 3NF, but not in BCNF. | |

in BCNF. |

Question 55 Explanation:

The attribute D is not part of any FD's. So D can be a candidate key or it may be part of the candidate key.

Now D+ = {D}.

Hence we have to add A,B,C,E,F,G,H to D and check which of them are Candidate keys of size 2.

AD

BD

ED

FD

But CD

Here Candidate keys are AD, BD, ED and FD.

A → BC, B → CFH and F → EG etc are partial dependencies.

So given relation is in 1NF, but not in 2NF.

Now D+ = {D}.

Hence we have to add A,B,C,E,F,G,H to D and check which of them are Candidate keys of size 2.

AD

^{+}= {ABCDEFGH}BD

^{+}= {ABCDEFGH}ED

^{+}= {ABCDEFGH}FD

^{+}= {ABCDEFGH} But CD

^{+}, GD^{+}and HD^{+}does not give all the attributes hence CD, GD and HD are not candidate keys. Here Candidate keys are AD, BD, ED and FD.

A → BC, B → CFH and F → EG etc are partial dependencies.

So given relation is in 1NF, but not in 2NF.

Question 56 |

Highest | |

Lowest | |

Medium | |

Integration |

Question 56 Explanation:

Nadir = The lowest (or) most unsuccessful point in a situation.

Question 57 |

specificity | |

neutrality | |

generality | |

adaptation |

Question 57 Explanation:

Universalism = The belief that all human kind will eventually be saved.

Particularism = Exclusive attachment to one's own group, party (or) Nation.

Diffuseness = The spatial property of being spread out over a wide area (or) through a large volume.

Specificity = The quality of belonging (or) relating uniquely to a particular subject.

Particularism = Exclusive attachment to one's own group, party (or) Nation.

Diffuseness = The spatial property of being spread out over a wide area (or) through a large volume.

Specificity = The quality of belonging (or) relating uniquely to a particular subject.

Question 58 |

What will be the maximum sum of 44, 42, 40, ...... ?

502 | |

504 | |

506 | |

500 |

Question 58 Explanation:

44, 42, 40, ......

44, 42, 40, ...... 0

2(22 + 21 + 20 + …. 1)

Sum(n)=(n(n+1))/2=(22×23)/2=253

⇒2(253)

=506

44, 42, 40, ...... 0

2(22 + 21 + 20 + …. 1)

Sum(n)=(n(n+1))/2=(22×23)/2=253

⇒2(253)

=506

Question 59 |

Were you a bird, you ______________ in the sky.

would fly | |

shall fly | |

should fly | |

shall have flown |

Question 59 Explanation:

Were you a bird, you

__would fly__in the sky.Question 60 |

Choose the grammatically

**INCORRECT**sentence:He is of Asian origin. | |

They belonged to Africa. | |

She is an European. | |

They migrated from India to Australia. |

Question 60 Explanation:

"She is an European"

→ We can't use "an" infront of European. It can be pronounced as European. Here E is silent.

→ So, option C is the answer

→ We can't use "an" infront of European. It can be pronounced as European. Here E is silent.

→ So, option C is the answer

Question 61 |

7 | |

8 | |

9 | |

10 |

Question 61 Explanation:

Multiply on numerator & denominator

=-1+9

=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?

13/90 | |

12/90 | |

78/90 | |

77/90 |

Question 62 Explanation:

⇨ Total number of 2 digit numbers from 1 to 100 = 90

⇨ Find which can be divisible by 7 upto 100

14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98

Total = 13

Probability of divisible by 7 is = 13/90

Which can’t be divisible by 7 is

⇒ 1 – (probability of divisible by 7)

⇒ 1 – (13/90)

⇒ 77/90

⇨ Find which can be divisible by 7 upto 100

14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98

Total = 13

Probability of divisible by 7 is = 13/90

Which can’t be divisible by 7 is

⇒ 1 – (probability of divisible by 7)

⇒ 1 – (13/90)

⇒ 77/90

Question 63 |

Failure is the pillar of success. | |

Honesty is the best policy. | |

Life begins and ends with adventures. | |

No adversity justifies giving up hope. |

Question 63 Explanation:

Option A, B, C are not able to given correct sense about the information.

Option D is related to the given information.

Option D 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

36 | |

30 | |

24 | |

18 |

Question 64 Explanation:

Let ‘x’ be the total distance,

Speed = distance/ time

Total speed = (total distance)/(total time); Time =distance/speed

Time taken for train journey = (x⁄2)/60kmph=x/120

Time taken for bus journey = (x⁄4)/30kmph=x/120

Time taken for cycle journey = (x⁄4)/10kmph=x/40

Total time = x/120+x/120+x/40=5x/120

Total speed = (total distance)/(total time)=x/(5x⁄120)=(120×x)/5x=24kmph

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

16,500 | |

15,180 | |

11,000 | |

10,120 |

Question 65 Explanation:

Current wages is increased by (1/5) ⇒ 1+1/5 ⇒ 6/5

Working hours decreased by (1/24) ⇒ 1-1/24 ⇒ 23/24

The new cost of erection = 13,200 × 6/5 × 23/24 =15,180

Working hours decreased by (1/24) ⇒ 1-1/24 ⇒ 23/24

The new cost of erection = 13,200 × 6/5 × 23/24 =15,180

There are 65 questions to complete.