# GATE Numerical Answer Questions

Question 1

**If (z+ 1/z)**

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

Correct answer is =96

Solution :

z

^{2}+ 1/z

^{2}+ 2z.(1/z) = 98 => z

^{2}+ 1/z

^{2}= 96

Question 2

**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 ___________**

.

Correct answer is =850

Solution :

One way force =100 , Two way fare per person=200

5 persons=1000/- Total discount applicable=10+5=15%

Discount amount = 15 * 1000/100 = 150

Amount to be paid=1000-150=850

Question 3

**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. Their responses are tabulated below. What percent of respondents do not own a scooter?**

.

Correct answer is =48

Solution :

Total respondents=300 Those who don’t have scooter

Men= 40+20=60 84 Women =34+ 50=84/144

%= 144/300*100 = 48%

Question 4

**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? _______________________**

.

Correct answer is =6

Solution :

We have a point say X and 4 sides say P,Q,R and S. A plane is formed by combination of 2 sides and center X. So

^{4}C

_{2}= 6

Question 5

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

.

Correct answer is =0.25

Solution :

The smaller sticks, therefore, will range in length from almost 0 meters up to a maximum of 0.5 meters, with each length equally possible.

Thus, the average length will be about 0.25 meters, or about a quarter of the stick.

Question 6

**Consider the following system of equations:**

3x + 2y= 1

4x +7z=1

x + y + z = 3

x - 2y + 7z = 0

The number of solutions for this system is __________________

3x + 2y= 1

4x +7z=1

x + y + z = 3

x - 2y + 7z = 0

The number of solutions for this system is __________________

.

Correct answer is =1

Question 7

**The value of the dot product of the eigenvectors corresponding to any pair of different eigen values of a 4-by-4 symmetric positive definite matrix is ______________.**

.

Correct answer is =0

Solution :

( The eigen vectors corresponding to distinct eigen values of real symmetric matrix are orthogonal)

Question 8

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

312/20 = 13.1

312/20 = 13.1

.

Correct answer is =5

Solution :

Let the base be x and if we convert it into decimal equivalent we get the following equation :

(3x

^{2}+ x + 2) / 2x = x + 3 + 1/x

Solving which we get 3x

^{2}+ x + 2 = 2x

^{2}+ 6x + 2

solve the above equation and get x = 5

Question 9

**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 ____________.**

.

Correct answer is =16383

Solution :

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

Opcode(6) | Reg opd 1(6) | Reg opd 2(6) | immediate opnd(14) |

14-bits are left over for immediate Operand Using 14-bits, we can give maximum 16383, Since 2

^{14}= 16384

Question 10

**Consider rooted n node binary tree represented using pointers. The best upper bound on the time required to determine the number of sub trees having exactly 4 nodes is O(n**

^{a}log n^{b}). Then the value of a + 10b is_______.

Correct answer is =1

Solution :

int print_subtrees_size_4(node *n)

{

int size=0;

if(node==null)

return 0;

size=print_subtrees_size_4(node->left)+print_subtrees_size_4(node->right)+1;

if(size==4)

printf("this is a subtree of size 4");

return size;

}

The above function on taking input the root of a binary tree prints all the subtrees of size 4 in O(n) time

Question 11

**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.**

.

Correct answer is =3

Solution :

Request for cylinder is served after serving 3 requests (100,105 and 110)

Question 12

**Consider a token ring network with a length of 2km having 10 stations including a monitoring station. The propagation speed of the signal is 2 x 108 m/s and the token transmission time is ignored. If each station is allowed to hold the token for 2 microsec, the minimum time for which the monitoring station should wait (in microsec) before assuming that the token is lost is _______.**

.

Correct answer is =30

Solution :

Given Length (d) = 2 Km

No. of Stations (m) = 10 Propagation Speed (v) = 2 × 10

^{8}m/s

THT = 2?s

So, Max. TRT = T

_{P}in the Ring + No. of Active Stations * THT

=10 × 10

^{-6}+ 10 × 2 × 10

^{-6}

=30 s

Question 13

**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 2kB. The time taken (in msec) by the TCP connection to get back to 32KB congestion window is ______**

.

Correct answer is =1100 to 1300

Solution :

Given that at the time of Time Out, Congestion Window Size is 32KB and RTT = 100ms When Time Out occurs, for the next round of Slow Start, Threshold = (size of Cwnd) / 2 It means Threshold = 16KB

Slow Start 2KB

1RTT

4KB

2RTT

8KB

3RTT

16KB ----------- Threshold reaches. So Additive Increase Starts

4RTT

18KB

5RTT

20KB

6RTT

22KB

7RTT

24KB

8RTT

26KB

9RTT

28KB

10RTT

30KB

11RTT

32KB

So, Total no. of RTTs = 11

Question 14

**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 ________.**

.

Correct answer is =5

Solution :

Given L =1KB

B= 1.5Mbps

T

_{p}=50ms

η = 60%

Efficiency formula for SR protocol is

η = W/(1+2a)= 60/100

T

_{x}= L/B = 8000/1.5 * 10

^{6}= 5.3 ms

a= T

_{p}/T

_{x}=50/5.3 = 500/53 = 9.43

=60/100 = W/19.86 => W= 11.9 ≅ 12

W = 2

^{n-1}= 12 => 2

^{n}= 24 ≅ = 2

^{5}=> n=5

Question 15

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

Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________.

Using the shortest remaining time first scheduling algorithm, the average process turnaround time (in msec) is ____________________.

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

.

Correct answer is =7.2

Solution :

Average turn around time = (8-0)+(5-3)+(12-5)+(21-7)+(15-10)/5 = 36/5 = 7.2ms

Question 16

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

.

Correct answer is =7

Question 17

**There are 5 bags labelled 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 ___.**

.

Correct answer is =12

Solution :

Let the weight of coins in the respective bags (1 through 5) be a,b,c,d and e-each of which can take one of two values namely 10 or 11 (gm).

Now, the given information on total weight can be expressed as the following equation:

1.a+2.b+4.c+8.d+16.e = 323

a must be odd => a = 11

The equation then becomes: 11+2.b+4.c+8.d+16.e = 323

=>2.b+4.c+8.d+16.e = 312

=>b+2.c+4.d+8.e = 156

b must be even b = 10

The equation then becomes: 10+2.c+4.d+8.e = 156

=>2.c+4.d+8.e = 146

=> c+2.d+4.e = 73

c must be odd c = 11

The equation now becomes: 11+2.d+4.e = 73

=>2.d+4.e = 62

=>d+2.e = 31

e = 11 and e = 10

Therefore, bags labelled 1, 3 and 4 contain 11 gm coins => Required Product = 1*3*4* = 12.

Question 18

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

.

Correct answer is =148

Solution :

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

Question 19

**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 ______________________.**

.

Correct answer is =4

Solution :

For 6 stages, non- pipelining takes 6 cycles.

There were 2 stall cycles for pipelining for 25% of the instructions

So pipeline time = (1+25/100*2) = 3/2 =1.5

Speed up = Non - pipeline time/pipeline time = 6/1.5 =4

Question 20

**The function f(x) = x sin x satisfies the following equation. f"(x) + f(x) +tcosx = 0. The value of t is______.**

.

Correct answer is =-2

Solution :

Given f "(x) +f (x)+ t cos x =0

and f(x)= xsin x

f '(x)= x cos x + sin x

f "(x)= x(- sin x) + cos x + cos x

= 2cos x - xsin x

= 2cos x - f(x)

2cos x - f(x)+ f(x) +t cos x = 0

=> 2cos x= -t cos x=> t= -2

Question 21

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

.

Correct answer is =10

Solution :

22 occurred in following ways

6 6 6 4 -> 4 ways

6 6 5 5 -> 6 ways

Required probability = 6+4/2296 = 10/2296 => x=10

Question 22

**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 ______________.**

.

Correct answer is =89

Solution :

No twos: 11111111111=> pennant

Single two: 211111111 => 9!/8!1! = 9 pennants

Two twos: 22111111 => 8!/6!.2! = 28

Three twos: 2221111 => 7!/3!.4! = 35

Four twos: 222211 => 6!/4!.2! = 15

Five twos: 22222 =>1

Total = 89 pennants.

Question 23

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

^{4}-> {01} . Denote by N the number of functions from S to the set {0,1}. The value of log_{2}log_{2}N is______..

Correct answer is =16

Solution :

The number of functions from A to B where size of A = |A| and size of B = |B| is |B||A|

{0,1}

^{4}= {0,1} X {0,1} X {0,1}X {0.1} = 16

|S| = 2

^{16}

N=2

^{|S|}

loglogN= loglog 2

^{|S|}= log |S| = log 2

^{16}=16

Question 24

**Consider an undirected graph G where self-loops are not allowed. The vertex set of G is {i, f): 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 the graph is _____________.**

.

Correct answer is =506

Solution :

The graph formed by the description contains 4 vertices of degree 3 and 40verices of degree 5 and 100 vertices of degree 8.

According to sum of the degrees theorem 4*3+40*5+100*8 = 2|E|

|E| = 1012/2 = 506

Question 25

**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 _________.**

.

Correct answer is =1.6

Solution :

1 cycle time for p1= 10

^{9}/1GH = 1n.s

Assume 1 p takes 5 cycles for a program then p2 takes 20% more, means, 6 cycles. p2 Takes 25% less time, means, if p1 takes 5 n.s, then p2 takes 3.75 n.s. Assume p2 clock frequency is x GHz.

p2 Taken 6 cycles , so 6 * 10

^{9}/ x GH = 3.75 => x=1.6

**MY REPORT**

TOTAL = 25 | |||

ANSWERED = | |||

CORRECT / TOTAL = | /25 | ||

POSITIVE SCORE = | |||

NEGATIVE SCORE = | |||

FINAL SCORE = |