GATE 2021 (Session 2)
64 questions
MCQ 33 · MSQ 13 · NAT 181-mark 29 · 2-mark 35
Questions 31–35 of 64
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 ________
Answer: 15 to 16
Here, X follows a binomial distribution with n = 1000 and p = 0.4.
Standard deviation:
Answer: 15.49
Standard deviation:
Answer: 15.49
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 __________Answer: 15
This function finds the GCD by subtracting again and again. It also returns 1 if either value becomes 1.
Trace SomeFunction(15, 255): take 255 15 again and again, which gives (15, 240) (15, 15) and the function returns 15.
So gcd(15, 255) = 15
Answer: 15
Trace SomeFunction(15, 255): take 255 15 again and again, which gives (15, 240) (15, 15) and the function returns 15.
So gcd(15, 255) = 15
Answer: 15
Suppose that P is a 4x5 matrix such that every solution of the equation Px=0 is a scalar multiple of . The rank of P is _______
Answer: 4
Every solution of is a multiple of the given vector . So the null space has only one line, and its dimension (nullity) is 1.
Use the rank-nullity theorem for the matrix , which has 5 columns:
This means that, of the 5 column vectors of , only 4 are linearly independent.
Answer: 4
Use the rank-nullity theorem for the matrix , which has 5 columns:
This means that, of the 5 column vectors of , only 4 are linearly independent.
Answer: 4
Suppose that is a continuous function on the interval [-3,3] and a differentiable function in the interval (-3,3) such that for every in the interval, . If , then is at most __________
Answer: 19
Use the mean value theorem here: .
Upper bound for f(3):
Answer: 19
Upper bound for f(3):
Answer: 19
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?
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?
Answer: (B)
Frequencies: a 1, b 2, c 2, d 2, e 3 (total 10).
Huffman: join a(1) with a letter of frequency 2. To keep the tie rule (b, c, d in dictionary order), join a with d 3. Then b + c 4. Then ad + e 6. Then 4 + 6.
Code lengths: a 3, d 3, b 2, c 2, e 2 (b c d holds).
Length = 13 + 22 + 22 + 23 + 32 = 3 + 4 + 4 + 6 + 6 = 23
Answer: 23
Huffman: join a(1) with a letter of frequency 2. To keep the tie rule (b, c, d in dictionary order), join a with d 3. Then b + c 4. Then ad + e 6. Then 4 + 6.
Code lengths: a 3, d 3, b 2, c 2, e 2 (b c d holds).
Length = 13 + 22 + 22 + 23 + 32 = 3 + 4 + 4 + 6 + 6 = 23
Answer: 23