Sample
Sample
A
Page 1 of 10
Name: Mobile Number:
1. Suppose X is a uniform random variable between 0.50 and 1.00. What is the probability that a randomly
selected value of X is between 0.55 and 0.60 or between 0.75 and 0.85?
A. 0.00
B. 0.15
C. 0.60
D. 0.30
2. The number of different necklaces you can form with 2 black and 6 white beads is .
3. Let α, β, γ be roots of equation x3 + 3x2 + 2x + 12. Then α2 + β 2 + γ 2 is equal to .
4. What is the unit eigenvector corresponding to the minimum eigenvalue of the matrix? .
1 −1
−1 1
8. If India is a stronger team than Australia then India will lose the cricket series. Which of the following
is logically equivalent:
A. If India lose the cricket series then India is a stronger team than Australia,
B. If India is weaker team than Australia then India will win the cricket series,
C. India is a weaker team than Australia or India will lose the cricket series,
D. India is a stronger team than Australia or India will win the cricket series.
Page 2 of 10
Name: Mobile Number:
Three men (Tom, Peter and Jack) and three women (Eliza, Anne and Karen) are spending a few months at
a hillside. They are to stay in a row of nine cottages, each one living in his or her own cottage. There are
no others staying in this row of houses.
a): Anne, Tom and Jack do not want to stay in any cottage which is at the end of the row.
b): Eliza and Anne are unwilling to stay beside any occupied cottage.
c): Karen is next to Peter and Jack.
d): Between Anne and Jack’s cottage there is just one vacant house.
e): None of the girls occupy adjacent cottages.
f): The house occupied by Tom is next to an end cottage.
9. Which of the above statements can be said to have been derived from two other statements?
A. Statement a),
B. Statement b),
C. Statement c),
D. Statement e)
10. In the process of designing an n storey building, an architect designed k types of floor modules. Even
though the ground floor can use any of the k modules, subsequent floors need to satisfy compatibility
constraints. For each module Mi , there is some subset Bi of modules on top of which Mi can be
built. As an example consider the case when k = 3 and say B1 = {M1 , M2 , M3 }, B2 = {M1 , M3 } and
B3 = {M1 , M2 }. Then a 4-story building can have the floor plan (from ground to 4) as M2 M1 M2 M3 but
not M3 M2 M2 M3 . The additional cost of adding an extra floor with say a floor module Mj can change
A depending on the structure of the building so far. What is the tightest upper bound on the run-time of
an algorithm to compute the cheapest floor plan for the n storey building.
A. O(k n )
B. O(nk )
C. O(nk)
D. O(nk 2 )
E. O(n2 k)
11. Two sets of numbers are given as sorted arrays in increasing order, A and B, with n and m numbers
respectively. What is the best estimate for the complexity of computing the set A \ B.
A. O(n.m)
B. O(n2 .m)
C. O(n + m)
D. (n log n + m log m)
12. Given an undirected graph with vertices as your friends and edges between people who do not talk to
each other. Your task is to invite as many guests to your party such that there are no two friends at the
party who have problem talking to each other. This problem is an instance of:
A. Maximum vertex cover
B. Maximum cut
C. Maximum eigenvalue of adjacency matrix
D. None of the above
Page 3 of 10
Name: Mobile Number:
13. There is a height balanced tree T storing n elements. The greatest element smaller than x in T is called
the predecessor of s in T . Given any positive number k, we wish to compute k predecessors of x in T .
What is the time complexity of the best algorithm that can do this task?
A. O(k + log n).
B. O(k log n),
C. O(log(n + k)),
D. O(n + k).
14. Maximum spanning tree problem (MaxST) defined for a weighted undirected graph aims to compute
the spanning tree of maximum weight. Longest path problem (LongP) in a weighted directed graph aims
to compute path of maximum weight from a given source to a given destination. Which of the following
statements is correct:
A. MaxST has a polynomial time algorithm, and LongP does not have any polynomial time
algorithm till date except for directed acyclic graphs.
B. MaxST as well as LongP problem don’t have any polynomial time algorithm till date. However,
for directed acyclic graph, there is a polynomial time algorithm for LongP.
C. MaxST has a polynomial time algorithm; LongP has a polynomial time algorithm except when
the graph has a negative cycle.
D. MaxST has a polynomial time algorithm provided there are no negative edge weights, and
LongP does not have any polynomial time algorithm till date except for directed acyclic graphs.
A
Page 4 of 10
Name: Mobile Number:
15. Which layer performs the socket connection establishment according to the OSI standard?
A. application layer
B. transport layer
C. network layer
D. physical layer
16. Throughput of a server is defined to be :
A. Number of requests served per unit time
B. Time taken to serve one request
C. Average request finish time
D. None of the above
17. Suppose two threads execute with the following C code concurrently, accessing shared variables a, b,
and c:
Initialization
int a = 4;
int b = 0;
int c = 0;
Thread 1
if (a < 0) {
c = b - a;
} else {
c = b + a;
A }
Thread 2
b = 10;
a = - 3;
You can assume that reads and writes of the variables are atomic, and the order of statements within
each thread is preserved in the code generated by C compiler.
Which of the following is not a possible value of c after both threads complete?
A. 7
B. -3
C. 14
D. 13
E. none of the above
18. Virtual addresses must be of same size as physical addresses. True or false?
19. Consider a processor in which every instruction goes through six phases of processing: instruction
fetch (IF), instruction decode (ID), register fetch (RF), execution (EX), data memory access (DMEM),
and register writeback (WB). The phase latencies are as follows; IF: 2 ns, ID: 1 ns, RF: 1 ns, EX: 1 ns,
DMEM: 2 ns, and WB: 1 ns. The designers of this processor are planning to design the processor as a
three-stage pipeline (call the stages S1 , S2 , and S3 ). There are multiple design choices for composing
these three pipeline stages. For example, one such choice could be to put IF in S1 , ID in S2 , and the
remaining four phases in S3 . Another option could be to put IF in S1 , ID and RF in S2 , and the rest
of the phases in S3 . Ignoring all delays in the pipeline registers, the largest frequency achievable by this
three-stage pipeline is MHz.
Page 5 of 10
Name: Mobile Number:
20. Consider a processor with a six-stage pipeline: instruction fetch (IF), instruction decode (ID), register
fetch (RF), execution (EX), data memory access (DMEM), register writeback (WB). The processor has
no branch predictor and the instruction fetcher stalls after fetching a branch instruction until the branch
condition and the target are available at the end of the EX stage. Assume that the instruction fetcher
can identify branch instructions before they are decoded in the ID stage. If a program has 30% branch
instructions, the loss in CPI due to branch-related stalls is .
21. Consider a 32 KB 8-way set-associative cache with 64-byte blocks. If the address width is 48 bits, the
width of the cache tag is bits.
22. An address sequence S experiences 100 compulsory cache misses. The sequence S experiences 500 misses
when it is passed through a 32 KB fully-associative cache. The sequence S experiences 1000 misses when
it is passed through a 32 KB 8-way set-associative cache. The number of conflict misses that the sequence
S experiences when it is passed through a 32 KB 8-way set-associative cache is .
23. Consider the following sequence of page references: 1, 2, 3, 1, 4, 3, 5, 2, 1, 3. Assume that there are
four page frames and all frames are initially empty. If the least-recently-used (LRU) page replacement
policy is used, then what is the total number of page faults that would occur in the above sequence of
page references?
A. 6
B. 7
C. 8
D. 9
24. Consider the three processes P1, P2, and P3. The arrival times of the processes are 0 ms, 5 ms, and 8
ms respectively, and the processing times are 15 ms, 12 ms, and 5 ms respectively. The three processes
A are preemptively scheduled on a single-CPU system using the shortest-remaining-processing-time-first
scheduling policy. Which of the following shows the order in which the processes complete, from first to
last?
A. P1
B. P3
C. P1
D. P3
P2
P2
P3
P1
P3
P1
P2
P2
Page 6 of 10
Name: Mobile Number:
26. Suppose that a local subnet uses a subnet mask 255.255.255.240. What is the maximum number of IP
addresses that can be assigned to the hosts in the subnet?
A. 14
B. 16
C. 31
D. 255
27. Let R1 and R2 be two regular expressions. The regular expression
(R1∗ R2∗ )∗
32. For an n × n upper triangular matrix, what will be the computational cost of computing its determinant
in terms of n?
Explain why.
A
33. A symmetric matrix X is said to be diagonalizable if we can express it as X = P DP −1 where P is
an invertible matrix and D is a diagonal matrix. For a diagonalizable matrix X, how many matrix
multiplications would be required to compute X 4 = X ∗ X ∗ X ∗ X?
Why?
Page 8 of 10
Name: Mobile Number:
34. For a particular position of Secretary in an organization, the members voted choosing between two
candidates A and B. There are 30% female and 70% male members in the organization. We are told
that 80% of the female members voted for candidate A and 40% of the male members voted for candidate
B. Given that a member voted for A how likely is it that it is a female?
A. 4/11
B. 2/10
C. 4/7
D. 7/11
35. Mr. Smith has two children. At least one of them is a boy. What is the probability that both children
are boys?
A. 1/2
A B. 1/3
C. 1/4
D. 3/4
36. Find two nonnegative numbers whose sum is 9 and so that the product of one number and the square
of the other number is a maximum The numbers are and .
37. Determine whether the matrix [3 4 ; 1 2] is invertible. If the matrix is invertible, compute the inverse.
38. Build a rectangular pen with three parallel partitions using 500 feet of fencing. Figure 1 illustrates the
rectangular pen. What dimensions will x and y take such that they maximize the total area of the pen
?
x=
y=
39. (Batman and Robin) The city of Gotham keeps propping up newer challenges for our dynamic duo. The
criminals in the city are so organized that they have come up with a schedule to commit the crimes.
a. The Mad Hatter commits maddeningly despicable crimes from 10AM - 11AM
b. The Riddler does nasty things (that are hard to understand) as well from 11AM - 12PM
c. 12PM to 1PM is lunch hour - no crimes get committed then
d. The Scarecrow scares the living lights out of citizens of Gotham from 1PM - 2PM
e. The Bane makes a grand appearance from 2PM - 3PM
f. The Joker arrives fresh from his afternoon nap and wreaks havoc from 3PM - 4PM
Page 9 of 10
Name: Mobile Number:
g. Just as the evening is setting, The Catwoman commits thefts from 4PM - 5PM
To keep up with this busy schedule, Batman and Robin (separately and) independently choose a random
shift and they go and defeat whichever criminal is operating in that shift. Note that each chooses just
one shift. If they happen to choose the lunch hour then they don’t fight anyone and just go home - its
a holiday for them!
1) What is the probability that at least one of Batman and Robin gets a holiday?
2) Bane is too powerful an adversary - to defeat him, Batman and Robin need to fight together. All
other criminals can be defeated by Batman or Robin alone. What is the probability that Bane gets
defeated?
3) Batman has a crush on Catwoman and would like to (ahem ahem) fight her alone. What is the
probability of that?
A
40. In the above scenario, what is the probability that two criminals get defeated?
41. (Overfed pets) The Jones family have n pet cats. The caretaker who is charged to feed these cats is
very careless. Everytime he goes into the pet zone, he takes food along and feeds a random cat - he does
not care whether the cat seems to be hungry or if it seems to be bursting with overfeeding. Also assume
that the unfed cats are unable to draw the attention of the caretaker towards them - the cat which is
fed is chosen purely randomly (and independently) each time.
Suppose the caretaker has already fed k of the cats at least once. On an expectation, how many more trips
would he have to make before he feeds one of the unfed (n−k) cats for the first time?
42. (The Mystery Matrices) I have three n × n square symmetric matrices A, B, and C. All the eigenvalues
of A are zero whereas all the eigenvalues of B are one. C has one eigenvalue equal to one and the rest
equal to zero. I also have with me an n-dimensional vector x ∈ Rn . Let ||.||2 denote the Euclidean norm.
1) What is the maximum value of ||Ax||2 ? What is the minimum value of ||Ax||2 ?
2) What is the maximum value of ||Bx||2 ? What is the minimum value of ||Bx||2 ?
3) What is the maximum value of ||Cx||2 ? What is the minimum value of ||Cx||2 ?
43. (The Pit) Consider the 3 dimensional vectors a = (2, 3, 4), b = (1, 2, 3). Define the multivariate function
f (x) = ||x − a||2 + bT x.
1) Give the expression for the gradient of f at a general point x.
2) At what value of x does f achieve its minimum value? Give that value.
Page 10 of 10