0% found this document useful (0 votes)
12 views

GS2022_QP_CSS

Uploaded by

goodbye2home
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

GS2022_QP_CSS

Uploaded by

goodbye2home
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

GS 2022 Common part Page 1 of 16

Part A: Common part


Note:
The questions in this part are to be answered by all candidates,
i.e., both Computer Science and Systems Science streams.

1. A snail crawls up a vertical pole 75 feet high, starting from the ground. Each day it
crawls up 5 feet, and each night it slides down 4 feet. When will it first reach the top
of the pole?
(a) 75th day
(b) 74th day
(c) 73rd day
(d) 72nd day
(e) 71st day ✓

2. We would like to invite a minimum number n of people (their birthdays are indepen-
dent of each other) to a party such that the expected number of pairs of people that
share the same birthday is at least 1. What should n be?
(Ignore leap years, so there are only 365 possible birthdays. Assume that birthdays
fall with equal probability on each of the 365 days of the year.)
(a) 23
(b) 28 ✓
(c) 92
(d) 183
(e) 366

3. A binary string is a sequence of 0’s and 1’s. A binary string is finite if the sequence
is finite, otherwise it is infinite. Examples of finite binary strings include 00010100,
and 1111101010. Which of the following is TRUE about the set of all finite binary
strings and the set of all infinite binary strings?
(a) The set of all finite binary strings is countable while the set of all
infinite binary strings is uncountable ✓
(b) The set of all finite binary strings is uncountable while the set of all infinite binary
strings is countable
(c) The set of all finite binary strings and the set of all infinite binary strings are
both countable
(d) The set of all finite binary strings and the set of all infinite binary strings are
both uncountable
(e) The set of all finite binary strings is countable while whether the set of all infinite
binary strings is countable or not is not known
GS 2022 Common part Page 2 of 16

4. Consider the polynomial p(x) = x3 − x2 + x − 1. How many symmetric matrices


with integer entries are there whose characteristic polynomial is p? (Recall that the
characteristic polynomial of a square matrix A in the variable x is defined to be the
determinant of the matrix (A − xI) where I is the identity matrix.)
(a) 0 ✓
(b) 1
(c) 2
(d) 4
(e) Infinitely many

5. Let F be the set of all functions mapping {1, . . . , n} to {1, . . . , m}. Let f be a
function that is chosen uniformly at random from F. Let x, y be distinct elements
from the set {1, . . . , n}. Let p denote the probability that f (x) = f (y). Then,
(a) p = 0
1
(b) p = nm
1
(c) 0 < p ≤ mn
1
(d) p = m

1
(e) p = n

6. Let f be a polynomial of degree n ≥ 3 all of whose roots are non-positive real


numbers. Suppose that f (1) = 1. What is the maximum possible value of f ′ (1)?
(a) 1
(b) n ✓
(c) n + 1
n(n+1)
(d) 2

(e) f (1) can be arbitrarily large given only the constraints in the question

7. Initially, N white beads are arranged in a circle. A number k is chosen uniformly


at random from {1, . . . , N − 1}. Then a set of k beads is chosen uniformly from the
white beads, and these k beads are coloured black. The position of the beads remains
unchanged. What is the probability that the black beads occur sequentially in the
circle, i.e., at most two black beads have white beads next to them?
2N
(a)
2N + 1
N2
(b)
(N − 1) (N − 1)!
N −1
N X 1
(c)  ✓
N − 1 k=1 Nk
N −1
1 X 1
(d) + N

N k=1 k
GS 2022 Common part Page 3 of 16

(e) None of the above

8. Let A be the (n + 1) × (n + 1) matrix given below, where n ≥ 1. For i ≤ n, the i-th


row of A has every entry equal to 2i − 1 and the last row, i.e., the (n + 1)-th row of
A has every entry equal to −n2 .
 
1 1 ··· 1
 3
 3 ··· 3  
 .. .. .. .. 
 . . . . 
 
2n − 1 2n − 1 · · · 2n − 1
−n2 −n2 · · · −n2

Which of the following statements is TRUE for all n ≥ 1?


(a) A has rank n
(b) A2 has rank 1
(c) All the eigenvalues of A are distinct
(d) All the eigenvalues of A are 0 ✓
(e) None of the above

9. You are given the following properties of sets A, B, X, and Y . For notation, |A|
denotes the cardinality of set A (i.e., the number of elements in A), and A \ B
denotes the set of elements that are in A but not in B.

1. A ∪ B = X ∪ Y
2. A ∩ B = X ∩ Y = ∅
3. |Y \ A| = 2
4. |A \ X| = 4

Which of the following statements MUST then be FALSE?


(a) |X| = 5
(b) |Y | = 5 ✓
(c) |A ∪ X| = |B ∪ Y |
(d) |A ∩ X| = |B ∩ Y |
(e) |A| = |B|

10. Consider a bag containing colored marbles. There are n marbles in the bag such that
there is exactly one pair of marbles of color i for each i ∈ {1, . . . , m} and the rest of
the marbles are of distinct colors (different from colors {1, . . . , m}). You draw two
marbles uniformly at random (without replacement). What is the probability that
both marbles are of same color?
m
(a) n
2m
(b) n
GS 2022 Common part Page 4 of 16

2m
(c) n(n−1)

2m
(d) n2
m
(e) n(n−1)

11. Let X be a finite set. A family F of subsets of X is said to be upward closed if the
following holds for all sets A, B ⊆ X:
A ∈ F and A ⊆ B ⇒ B ∈ F.
For families F and G of subsets of X, let
F ⊔ G = {A ∪ B : A ∈ F and B ∈ G}.
Suppose F and G are upward closed families. Then which of the following is true?
(a) F ⊔G =F ∩G ✓
(b) F ⊔G =F ∪G
(c) F ⊔G =F \G
(d) F ⊔G =G\F
(e) None of the above
12. Alice plays the following game on a math show. There are 7 boxes and identical
prizes are hidden inside 3 of the boxes. Alice is asked to choose a box where a prize
might be. She chooses a box uniformly at random. From the unchosen boxes which
do not have a prize, the host opens an arbitrary box and shows Alice that there is
no prize in it. The host then allows Alice to change her choice if she so wishes. Alice
chooses a box uniformly at random from the other 5 boxes (other than the one she
chose first and the one opened by the host). Her probability of winning the prize is
(a) 3/7
(b) 1/2
(c) 17/30
(d) 18/35 ✓
(e) 9/19
13. Consider the transition system shown in the figure below with the initial state s1 . A
token is initially placed at s1 , and it moves to s2 with probability 32 , and to s3 with
probability 31 . From s2 and s3 , the token always moves to s1 and s2 respectively. A
run of the system consists of an infinite sequence of states constructed by moving
the token from one state to another following the transitions forever. Assuming such
a run is chosen randomly, what is the fraction of times that the state s2 is expected
to appear in the run?

2/3
start s1 s2
1
1/3 1

s3
GS 2022 Common part Page 5 of 16

1
(a) 7
2
(b) 7
3
(c) 7

5
(d) 7
(e) None of the above

14. Suppose w(t) = 4eit , x(t) = 3ei(t+π/3) , y(t) = 3ei(t−π/3) and z(t) = 3ei(t+π) are points
that move in the complex plane as the time t varies in (−∞, ∞). Let c(t) be the point
in the complex plane such that |w(t)−c(t)|2 +|x(t)−c(t)|2 +|y(t)−c(t)|2 +|z(t)−c(t)|2
is minimum. For each value of t, the point c(t) is unique, but c(t) moves at constant
d
speed as t varies. At what speed? That is, what is dt c(t) ?
1
(a) 2π
(b) 2π

(c) 3π
(d) √1

(e) 1 ✓

15. Fix n ≥ 4. Suppose there is a particle that moves randomly on the number line, but
never leaves the set {1, 2, . . . , n}. The initial probability distribution of the particle
is π i.e., the probability that particle is in location i is given by π(i). In the first
step, if the particle is at position i, it moves to one of the positions in {1, 2, . . . , i}
with uniform distribution; in the second step, if the particle is in location j, then it
moves to one of the locations in {j, j + 1, . . . , n} with uniform distribution. Suppose
after two steps, the final distribution of the particle is uniform. What is the initial
distribution π?
(a) π is not unique
(b) π is uniform
(c) π(i) is non-zero for all even i and zero otherwise
(d) π(1) = 1 and π(i) = 0 for i ̸= 1 ✓
(e) π(n) = 1 and π(i) = 0 for i ̸= n

—End of Common Section—


(CS section begins in the following page)
GS 2022 CS part Page 6 of 16

Part B: Computer Science


Note:
Only for Computer Science stream candidates.

1. Which data structure is commonly used to implement breadth first search in a graph?
(a) A queue ✓
(b) A stack
(c) A heap
(d) A hash table
(e) A splay tree
2. Let G = (V, E) be an undirected simple graph. A subset M ⊆ E is a matching in
G if distinct edges in M do not share a vertex. A matching is maximal if no strict
superset of M is a matching. How many maximal matchings does the following graph
have?

(a) 1
(b) 2
(c) 3
(d) 4✓
(e) 5
3. Consider the problem of sorting n single digit integers (base 10). This problem can
be solved in time
(a) O(n log n) but not O(n log log n)
(b) O(n log log n) but not O(n)
(c) O(n) but not O(n/ log log n) ✓
(d) O(n/ log log n)
(e) None of the above.
4. Consider the following algorithm for computing the factorial of a positive integer n,
specified in binary:
prod ← 1
for i from 1 to n
prod ← prod × i
output prod
Assume that the number of bit operations required to multiply a k-bit positive integer
with an ℓ-bit positive integer is at least Ω(k +l) and at most O(kl). Then, the number
of bit operations required by this algorithm is
GS 2022 CS part Page 7 of 16

(a) O(n)
(b) O(n log n) but ω(n)
(c) O(n2 ) but ω(n log n)
(d) O(n3 ) but ω(n2 ) ✓
(e) None of the above

5. There is an unsorted list of n integers. You are given 3 distinct integers and you have
to check if all 3 integers are present in the list or not. The only operation that you
are allowed to perform is a comparison. Let A be an algorithm for this task that
performs the least number of comparisons. Let c be the number of comparisons done
by A. Then,
(a) c = 3n
(b) c = 2n + 5
(c) c ≥ 3n − 1
(d) c ≤ n
(e) c ≤ 2n + 3 ✓

6. We are given a graph G along with a matching M and a vertex cover C in it such
that |M | = |C|. Consider the following statements:

(1) M is a maximum matching in G.


(2) C is a minimum vertex cover in G.
(3) G is a bipartite graph.

Which of the following is TRUE?


(a) Only statement (1) is correct
(b) Only statement (2) is correct
(c) Only statement (3) is correct
(d) Only statements (1) and (2) are correct ✓
(e) All the three statements (1), (2), and (3) are correct

7. Consider the following grammar: P, Q, R are non-terminals; c, d are terminals; P is


the start symbol; and the production rules follow.

P ::= QR
Q ::= c
Q ::= RcR
R ::= ddQ

Which of the following is False:


(a) The length of every string produced by the grammar is even
(b) No string produced by the grammar has an odd number of consecutive d’s
GS 2022 CS part Page 8 of 16

(c) No string produced by the grammar has four consecutive d’s ✓


(d) No string produced by the grammar has three consecutive c’s
(e) Every string produced by the grammar has at least has many d’s as c’s

8. Let r1 and r2 be two regular expressions. They symbol ≡ stands for equivalence of
two regular expressions in the sense that if r1 ≡ r2 , then both regular expressions
describe the same language. Which of the following is/are FALSE?

(i) (r1 r2 )∗ r1 ≡ r1 (r2 r1 )∗


(ii) (r1∗ r2 )∗ r1∗ ≡ (r1 + r2 )∗
(iii) (r1∗ r2∗ )∗ ≡ (r1 + r2 )∗
(a) Only (i) is false
(b) Only (ii) is false
(c) Only (iii) is false
(d) Both (i) and (iii) are false
(e) None of the above ✓

9. Let n ≥ 2 be any integer. Which of the following statements is FALSE?


(a) n! divides the product of any n consecutive integers
Pn n
(b) i=0 i = 2n
(c) ni = n−1 n−1
  
i
+ i−1
, where 1 ≤ i ≤ n − 1
(d) If n is an odd prime, then n divides 2n−1 − 1
(e) n divides 2n

n

10. Consider the assertions

(A1) Given a directed graph G with positive weights on the edges, two special vertices
s and t, and an integer k - it is NP-complete to determine if G has an s-t path
of length at most k.
(A2) P = NP.

Then, which of the following is true?


(a) A1 implies A2 and A2 implies A1 ✓
(b) A1 implies A2 and A2 does not imply A1
(c) A1 does not imply A2 and A2 implies A1
(d) A1 does not imply A2 and A2 does not imply A1
(e) None of the above.

11. Consider the following function count, that takes as input a, an array of integers,
and N, the size of the array.
GS 2022 CS part Page 9 of 16

int count(int a[], int N) {


int i, j, count_FN;
count_FN = 0;
for (i=1; i<N; i++) {
j=i-1;
while (a[j] > a[i]) {
count_FN++;
j--;
}
}
return count_FN;
}

Further, let count_IS be the number of comparisons made by the insertion sort
algorithm on the array a.
Which of the following statements is TRUE for some constant c?
(a) For all N ≥ c, there exists an array of size N for which count_IS ≥ N 2 /c,
while count_FN ≤ cN ✓
(b) For all N ≥ c, there exists an array of size N for which count_FN ≥ N 2 /c, while
count_IS ≤ cN
(c) For all N ≥ c, for all arrays of size N, count_FN ≤ count_IS ≤ c × count_FN
(d) For all N ≥ c, for all arrays of size N, count_FN ≥ N 2 /c
(e) None of the above

12. Given an undirected graph G, an ordering σ of its vertices is called a perfect ordering
if for every vertex v, the neighbours of v which precede v in σ form a clique in G.
Recall that given an undirected graph G, a clique in G is a subset of vertices every
two of which are connected by an edge, while a perfect colouring of G with k colours
is an assignment of labels from the set {1, 2, . . . , k} to the vertices of G such that no
two vertices which are adjacent in G receive the same label.
Consider the following problems.
Problem Special-Clique
INPUT: An undirected graph G, a positive integer k, and a perfect ordering σ of
the vertices of G.
OUTPUT: Yes, if G has a clique of size at least k, No otherwise.
Problem Special-Colouring
INPUT: An undirected graph G, a positive integer k, and a perfect ordering σ of
the vertices of G.
OUTPUT: Yes, if G has a proper colouring with at most k colours, No otherwise.
Assume that P ̸= N P . Which of the following statements is true?
(a) Both Special-Clique and Special-Colouring are undecidable
(b) Only Special-Clique is in P
GS 2022 CS part Page 10 of 16

(c) Only Special-Colouring is in P


(d) Both Special-Clique and Special-Colouring are in P ✓
(e) Neither of Special-Clique and Special-Colouring is in P, but both are
decidable

13. Consider a directed graph G = (V, E), where each edge e ∈ E has a positive edge
weight ce . Determine the appropriate choices for the blanks below so that the value
of the following linear program is the length of the shortest directed path in G from
s to t. (Assume that the graph has at least one path from s to t.)

(blank 1)imize Xt
s.t. Xs = 0
Xw − Xv (blank 2) ce (for each edge e = (v, w) ∈ E).

(a) blank 1: max, blank 2: ≤ ✓


(b) blank 1: max, blank 2: ≥
(c) blank 1: min, blank 2: ≤
(d) blank 1: min, blank 2: ≥
(e) blank 1: min, blank 2: =

14. Let G be a directed graph (with no self-loops or parallel edges) with n ≥ 2 vertices
and m edges. Consider the n × m incidence matrix M of G, whose rows are indexed
by the vertices of G and the columns by the edges of G. The entry mv,e is defined as
follows. 
−1 if e = (v, w) for some vertex w,

mv,e = +1 if e = (u, v) for some vertex u,

0 otherwise.

Suppose every vertex of G is reachable from a special source vertex of G. Then, what
is the rank of M ?
(a) m − 1
(b) m − n + 1
(c) ⌈m/2⌉
(d) n − 1 ✓
(e) ⌈n/2⌉

15. Let R denote the set of real numbers. Let d ≥ 4 and α ∈ R. Let
( d d
)
X X
S = (a0 , a1 , . . . , ad ) ∈ Rd+1 : ai αi = 0 and iai αi−1 = 0 .
i=0 i=0

Then,
(a) S is finite or infinite depending on the value of α
GS 2022 CS part Page 11 of 16

(b) S is a 2-dimensional vector subspace of Rd+1


(c) S is a d-dimensional vector subspace of Rd+1
(d) S is a (d − 1)-dimensional vector subspace of Rd+1 ✓
(e) For each (a0 , a1 , . . . , ad ) ∈ S, the function
d
X
x 7→ ai x i
i=0

has a local optimum at α

—End of CS Section—
(SS section begins in the following page)
GS 2022 SS part Page 12 of 16

Part C: Systems Science


Note:
Only for Systems Science stream candidates.

1. Suppose that a random variable X can take 5 values {1, 2, 3, 4, 5} with probabilities
that depend upon n ≥ 0 and are given by

ekn
P (X = k) =
en + e2n + e3n + e4n + e5n
for k = 1, 2, 3, 4, 5. What can one say about the expectation E[X] as n → ∞?
(a) It increases to infinity as n → ∞
(b) It equals 3 for all values of n ≥ 0
(c) It converges to 1 as n → ∞
(d) It converges to 5 as n → ∞ ✓
(e) It converges to 0 as n → ∞

2. Consider a coin flip game between Amar, Akbar and Anthony. A fair coin (so that
heads and tails each have probability 0.5) is independently flipped five times. Amar
wins if at least three consecutive draws of heads are observed in the five coin tosses.
Akbar wins if at least three consecutive draws of tails are observed in the five coin
tosses. Anthony wins if the other two do not win. What is the probability of Anthony
winning?
(a) 9/16
(b) 1/3
(c) 1/2 ✓
(d) 5/8
(e) 7/12

3. Consider two linear time invariant (LTI) systems T1 and T2 with impulse responses
h1 (n) and h2 (n), respectively. Let there be two cascades C1 and C2 , where in C1 , T2
follows after T1 , and in C2 , T1 follows after T2 .

T1 T2 T2 T1
C1 C2

Consider the following statements:

1. Both C1 and C2 are always LTI.


2. The impulse response of both C1 and C2 is the same.
GS 2022 SS part Page 13 of 16

3. Both C1 and C2 are LTI, only when h1 and h2 are causal.

Which of the following is TRUE?


(a) Only statement 1 is correct
(b) Only statement 3 is correct
(c) Both statements 1, 2 are correct ✓
(d) Both statements 2, 3 are correct
(e) None of the above

4. Evaluate the value of


max x2 + (1 − y)2 ,


where the maximisation above is over x and y such that 0 ≤ x ≤ y ≤ 1.


(a) 0
(b) 2
(c) 1/2
(d) 1/4
(e) 1 ✓

5. Let Q be a unit square in the plane with corners at (0, 0), (0, 1), (1, 0) and (1, 1). Let
B be a ball of radius 1 in the plane centered at the origin (0, 0). Let Q + B denote
the set of all vectors in the plane of the form v + w, where v ∈ Q and w ∈ B. The
area of Q + B is:
(a) 5 + π ✓
(b) 4 + π
(c) 3 + π
(d) 2 + π
(e) 1 + π

6. Consider a degree-5 polynomial function f : (−∞, ∞) → (−∞, ∞). If f exhibits at


least four local maxima, which of the following is necessarily true? (Note : A local
maximum is a point where the function value is the maximum in a sufficiently small
neighbourhood.)
(a) f (x) > 0, x ∈ (−∞, ∞)
(b) f (50) < 0
(c) The seventh derivative of f (x) is negative for some x ∈ [0, 100]
(d) f has exactly 4 local maxima ✓
(e) None of the above
GS 2022 SS part Page 14 of 16

7. Two players A and B of equal skill are playing a match. The first one to win 4 rounds
wins the match. Both players are equally likely to win each round independent of
the outcomes of the other rounds. After 3 rounds, A has won 2 rounds and B has
won 1 round. Conditioned on this, what is the conditional probability that A wins
the match?
(a) 5/8
(b) 2/3
(c) 11/16 ✓
(d) 5/7
(e) None of the above

8. Let a, b, c be real numbers such that the following system of equations has a solution

x + 2y + 3z = a (1)
8x + 10y + 12z = b (2)
7x + 8y + 9z = c − 1 (3)

Let A be a matrix such that


 
a 1 c
A =  b 1 0 .
−1 0 1

What is the value of det(A)?


(a) 1 ✓
(b) 2
(c) 3
(d) 4
(e) 5

9. Suppose you throw a dart and it lands uniformly at random on a target which is a
disk of unit radius. What is the probability density function f (x) of the distance of
the dart from the center of the disk?
(
1, if 0 ≤ x ≤ 1
(a) f (x) =
0, otherwise
(
2x, if 0 ≤ x ≤ 1
(b) f (x) = ✓
0, otherwise
(
3x2 , if 0 ≤ x ≤ 1
(c) f (x) =
0, otherwise
(
4x3 , if 0 ≤ x ≤ 1
(d) f (x) =
0, otherwise
GS 2022 SS part Page 15 of 16

(e) None of the above.



10. Find the vector which is closest (in Euclidean distance) to −1 1 1 which can be
written in the form  
a 1 1 1 + b 0 1 −1
where a and b are some real numbers. Recall that the P
(Euclidean) distance between
two vectors x1 x2 x3 and y1 y2 y3 is given by 3i=1 (xi − yi )2 .


(a) 31 1 1 1 ✓


(b) 21 0 1 −1


(c) 31 1 1 1 + 12 0 1 −1
 

(d) − 13 1 1 1 + 21 0 1 −1
 

(e) None of the above

11. A drunken man walks on a straight lane. At every integer time (in seconds) he
moves a distance of 1 unit randomly, either forwards or backwards. What is the
expectation of the square of the distance after 100 seconds from the initial position?
Hint: The position at time 100 is a sum of independent and identically distributed
random variables.
(a) 100 ✓

300
(b) 4
(c) 40
(d) 200
(e) 20π

12. An n × n matrix P is called a Permutation Matrix if each of its n columns and n


rows contain exactly one 1 and n − 1 0’s. Consider the following statements:

1. det(P) is either +1 or −1.


2. If λ is an eigen value of P, then |λ| = 1.
3. PT = P−1 .

Which of the following is TRUE?


(a) Only statement 1 is correct
(b) Only statements 1, 2 are correct
(c) Only statements 1, 3 are correct
(d) Only statements 2, 3 are correct
(e) All statements 1,2, and 3 are correct ✓

13. Calculate the minimum value attained by the function



sin(πx) − 2πx2

for values of x which lie in the interval [0, 1].


GS 2022 SS part Page 16 of 16

√1 π

(a) 2
1− 8

(b) 0
π
(c) 1 − √
2 2

(d) − √12 1 + 9π

2

(e) − 2π ✓

14. Let a bag contain ten balls numbered 1, 2, . . . , 10. Let three balls be drawn at random
in sequence without replacement, and the number on the ball drawn on the ith choice
be ni ∈ {1, 2, . . . , 10}. What is the probability that n1 < n2 < n3 ?
1
(a) 3
1
(b) 12
1
(c) 4
1
(d) 6

(e) None of the above

15. Consider the difference below for m ≥ 5:


m−1 Z m
X 1 1
− dx.
n=1
(1 + n)2 x=1 (1 + x)2

Which statement about the difference is TRUE?


(a) It is positive for infinitely many m ≥ 5 and negative for infinitely many m ≥ 5
(b) It is positive for all m ≥ 5, and is increasing as m increases ✓
(c) It is negative for finitely many m ≥ 5 and is positive for infinitely many m
(d) It is positive for all m ≥ 5, and is decreasing as m increases
(e) It is negative for all m ≥ 5

— End of paper —

You might also like