GATE 2021 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2021 (Session 2)

64 questions

MCQ 33 · MSQ 13 · NAT 181-mark 29 · 2-mark 35

Questions 31–35 of 64

Q32Probability Theory1 markNAT
For a given biased coin, the probability that the outcome of a toss is a head is 0.4. This coin is tossed 1,000 times. Let X denote the random variable whose value is the number of times that head appeared in these 1,000 tosses. The standard deviation of X (rounded to 2 decimal place) is ________

Q33Function1 markNAT
Consider the following ANSI C function:
int SomeFunction (int x, int y)
{
    if ((x==1) || (y==1)) return 1;
    if (x==y) return x;
    if (x > y) return SomeFunction(x-y, y);
    if (y > x) return SomeFunction (x, y-x);
 
} 
The value returned by SomeFunction(15, 255) is __________

Q34Matrix Algebra1 markNAT
Suppose that P is a 4x5 matrix such that every solution of the equation Px=0 is a scalar multiple of [25431]T\begin{bmatrix} 2 & 5 & 4 &3 & 1 \end{bmatrix}^T. The rank of P is _______

Q35Mean Value Theorems1 markNAT
Suppose that f:R→Rf: \mathbb{R} \rightarrow \mathbb{R} is a continuous function on the interval [-3,3] and a differentiable function in the interval (-3,3) such that for every xx in the interval, f′(x)≤2f'(x) \leq 2. If f(−3)=7f(-3) =7, then f(3)f(3) is at most __________

Q36Greedy Technique2 marksMCQ−0.67 if wrong
Consider the string abbccddeee. Each letter in the string must be assigned a binary code satisfying the following properties:

For any two letters, the code assigned to one letter must not be a prefix of the code assigned to the other letter.
For any two letters of the same frequency, the letter which occurs earlier in the dictionary order is assigned a code whose length is at most the length of the code assigned to the other letter.

Among the set of all binary code assignments which satisfy the above two properties, what is the minimum length of the encoded string?