Gate CSE + DA 2024
Gate CSE + DA 2024
Q.1 If ‘→’ denotes increasing order of intensity, then the meaning of the words
(A) frown
(B) fawn
(C) vein
(D) vain
Page 1 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.2 The 15 parts of the given figure are to be painted such that no two adjacent parts
with shared boundaries (excluding corners) have the same color. The minimum
number of colors required is
(A) 4
(B) 3
(C) 5
(D) 6
Page 2 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.3 How many 4-digit positive integers divisible by 3 can be formed using only the
digits {1, 3, 4, 6, 7}, such that no digit appears more than once in a number?
(A) 24
(B) 48
(C) 72
(D) 12
1 1 1 1 1 1 1
2+ + + + + + + +⋯
2 3 4 8 9 16 27
(A) 11/3
(B) 7/2
(C) 13/4
(D) 9/2
Page 3 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.5 In an election, the share of valid votes received by the four candidates A, B, C, and
D is represented by the pie chart shown. The total number of votes cast in the
election were 1,15,000, out of which 5,000 were invalid.
D
15%
A
C 40%
20%
B
25%
Based on the data provided, the total number of valid votes received by the
candidates B and C is
(A) 45,000
(B) 49,500
(C) 51,750
(D) 54,000
Page 4 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.6 Thousands of years ago, some people began dairy farming. This coincided with a
number of mutations in a particular gene that resulted in these people developing
the ability to digest dairy milk.
(D) In human beings, digestion of dairy milk resulted from a mutated gene.
Q.7 The probability of a boy or a girl being born is 1/2. For a family having only
three children, what is the probability of having two girls and one boy?
(A) 3/8
(B) 1/8
(C) 1/4
(D) 1/2
Page 5 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.8 Person 1 and Person 2 invest in three mutual funds A, B, and C. The amounts they
invest in each of these mutual funds are given in the table.
At the end of one year, the total amount that Person 1 gets is ₹500 more than
Person 2. The annual rate of return for the mutual funds B and C is 15% each. What
is the annual rate of return for the mutual fund A?
(A) 7.5%
(B) 10%
(C) 15%
(D) 20%
Page 6 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.9 Three different views of a dice are shown in the figure below.
(A)
(B)
(C)
(D)
Page 7 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.10 Visualize two identical right circular cones such that one is inverted over the other
and they share a common circular base. If a cutting plane passes through the vertices
of the assembled cones, what shape does the outer boundary of the
resulting cross-section make?
(A) A rhombus
(B) A triangle
(C) An ellipse
(D) A hexagon
Page 8 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
(i) The mean and variance of a Poisson random variable are equal.
(ii) For a standard normal random variable, the mean is zero and the
variance is one.
Q.12 Three fair coins are tossed independently. T is the event that two or more tosses
result in heads. S is the event that two or more tosses result in tails.
(A) 0
(B) 0.5
(C) 0.25
(D) 1
Page 9 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.13 2 −1
Consider the matrix 𝑴 = [ ].
3 1
Which ONE of the following statements is TRUE?
(C) One eigenvalue of 𝑴 is positive and real, and another eigenvalue of 𝑴 is zero.
(A) tree
(B) cross
(C) back
(D) gray
Page 10 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.16 Match the items in Column 1 with the items in Column 2 in the following table:
Column 1 Column 2
Page 11 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.17 Consider the dataset with six datapoints: {(𝒙𝟏 , 𝒚𝟏 ), (𝒙𝟐 , 𝒚𝟐 ), … , (𝒙𝟔 , 𝒚𝟔 )},
1 0 0 −1 2 −2
where 𝒙𝟏 = [ ] , 𝒙𝟐 = [ ] , 𝒙𝟑 = [ ] , 𝒙𝟒 = [ ] , 𝒙𝟓 = [ ] , 𝒙𝟔 = [ ]
0 1 −1 0 2 −2
and the labels are given by 𝒚𝟏 = 𝒚𝟐 = 𝒚𝟓 = 1, and 𝒚𝟑 = 𝒚𝟒 = 𝒚𝟔 = −1. A hard
margin linear support vector machine is trained on the above dataset.
(A) {𝒙𝟏 , 𝒙𝟐 , 𝒙𝟓 }
(B) {𝒙𝟑 , 𝒙𝟒 , 𝒙𝟓 }
(C) {𝒙𝟒 , 𝒙𝟓 }
(D) {𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , 𝒙𝟒 }
Q.18 Match the items in Column 1 with the items in Column 2 in the following table:
Column 1 Column 2
(p) Principal Component Analysis (i) Discriminative Model
(q) Naïve Bayes Classification (ii) Dimensionality Reduction
(r) Logistic Regression (iii) Generative Model
Page 12 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.19 Euclidean distance based 𝑘-means clustering algorithm was run on a dataset of 100
1 −1
points with 𝑘 = 3. If the points [ ] and [ ] are both part of cluster 3, then which
1 1
ONE of the following points is necessarily also part of cluster 3?
(A) 0
[ ]
0
(B) 0
[ ]
2
(C) 2
[ ]
0
(D) 0
[ ]
1
Q.20 Given a dataset with 𝐾 binary-valued attributes (where 𝐾 > 2) for a two-class
classification task, the number of parameters to be estimated for learning a naïve
Bayes classifier is
(A) 2𝐾 + 1
(B) 2𝐾 + 1
(C) 2𝐾+1 + 1
(D) 𝐾2 + 1
Page 13 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.21 Consider performing uniform hashing on an open address hash table with load
𝑛
factor 𝛼 = 𝑚 < 1, where 𝑛 elements are stored in the table with 𝑚 slots. The
1
expected number of probes in an unsuccessful search is at most .
1−𝛼
Inserting an element in this hash table requires at most ______ probes, on average.
(A) 1
ln ( )
1−𝛼
(B) 1
1− 𝛼
(C) 𝛼
1+
2
(D) 1
1+ 𝛼
Q.22 For any binary classification dataset, let 𝑆𝐵 ∈ ℝ𝑑×𝑑 and 𝑆𝑊 ∈ ℝ𝑑×𝑑 be the
between-class and within-class scatter (covariance) matrices, respectively. The
Fisher linear discriminant is defined by 𝑢 ∗ ∈ ℝ𝑑 , that maximizes
𝑢𝑇 𝑆𝐵 𝑢
𝐽(𝑢) =
𝑢𝑇 𝑆𝑊 𝑢
−1
(A) 𝑆𝑊 𝑆𝐵 𝑢 ∗ = 𝜆𝑢 ∗
(B) 𝑆𝑊 𝑢∗ = 𝜆𝑆𝐵 𝑢 ∗
(C) 𝑆𝐵 𝑆𝑊 𝑢 ∗ = 𝜆𝑢 ∗
(D) 𝑢 ∗ 𝑇 𝑢∗ = 𝜆2
Page 14 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
(A) ℎ1 + ℎ 2
(B) ℎ1 × ℎ2
(D) |ℎ1 − ℎ2 |
Page 15 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
In adversarial search, 𝛼– 𝛽 pruning can be applied to game trees of any depth where
𝛼 is the (m) value choice we have formed so far at any choice point along the
path for the MAX player and 𝛽 is the (n) value choice we have formed so far
at any choice point along the path for the MIN player.
Which ONE of the following choices of (m) and (n) makes the above statement
valid?
Which ONE of the following relational algebra expressions checks that every name
occurring in Team appears in either Defender or Forward, where 𝜙 denotes the
empty set?
Page 16 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.27 Let the minimum, maximum, mean and standard deviation values for the attribute
income of data scientists be ₹46000, ₹170000, ₹96000, and ₹21000, respective ly.
The z-score normalized income value of ₹106000 is closest to which ONE of the
following options?
(A) 0.217
(B) 0.476
(C) 0.623
(D) 2.304
(i) Preorder
(ii) Inorder
(iii) Postorder
Page 17 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.29 Let 𝑥 and 𝑦 be two propositions. Which of the following statements is a tautology
/are tautologies?
(A) (¬𝑥 ∧ 𝑦 ) ⟹ (𝑦 ⟹ 𝑥)
(B) (𝑥 ∧ ¬𝑦 ) ⟹ (¬𝑥 ⟹ 𝑦)
(D) (𝑥 ∧ ¬𝑦 ) ⟹ (𝑦 ⟹ 𝑥)
Q.30 Consider sorting the following array of integers in ascending order using an in-place
Quicksort algorithm that uses the last element as the pivot.
60 70 80 90 100
Page 18 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.31 Consider the following two tables named Raider and Team in a relational database
maintained by a Kabaddi league. The attribute ID in table Team references the
primary key of the Raider table, ID.
Raider
ID Name Raids RaidPoints
1 Arjun 200 250
2 Ankush 190 219
3 Sunil 150 200
4 Reza 150 190
5 Pratham 175 220
6 Gopal 193 215
Team
City ID BidPoints
Jaipur 2 200
Patna 3 195
Hyderabad 5 175
Jaipur 1 250
Patna 4 200
Jaipur 6 200
SELECT *
FROM Raider, Team
WHERE Raider.ID=Team.ID AND City=“Jaipur” AND
RaidPoints > 200;
Page 19 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
insertFirst(10)
insertLast(32)
a ←removeFirst()
insertLast(28)
insertLast(17)
a ←removeFirst()
a ← removeLast()
Q.33 1
Let 𝑓: ℝ → ℝ be the function 𝑓(𝑥 ) = .
1+𝑒 −𝑥
Page 20 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.34 The sample average of 50 data points is 40. The updated sample average after
including a new data point taking the value of 142 is ______.
Q.35 1 2 3
Consider the 3 × 3 matrix 𝑴 = [3 1 3].
4 3 6
Q.36
A fair six-sided die (with faces numbered 1, 2, 3, 4, 5, 6) is repeatedly thrown
independently.
What is the expected number of times the die is thrown until two consecutive throws
of even numbers are seen?
(A) 2
(B) 4
(C) 6
(D) 8
Page 21 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
−𝑥, if 𝑥 < −2
𝑓(𝑥 ) = {𝑎𝑥 2 + 𝑏𝑥 + 𝑐, if 𝑥 ∈ [−2, 2]
𝑥, if 𝑥 > 2
Which ONE of the following choices gives the values of 𝑎, 𝑏, 𝑐 that make the
function 𝑓 continuous and differentiable?
(A) 1
𝑎= , 𝑏 = 0, 𝑐 = 1
4
(B) 1
𝑎= , 𝑏 = 0, 𝑐 = 0
2
(C) 𝑎 = 0, 𝑏 = 0, 𝑐 = 0
(D) 𝑎 = 1, 𝑏 = 1, 𝑐 = −4
Page 22 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
child_dict = dict()
child_dict[0] = [1,2]
child_dict[1] = [3,4,5]
child_dict[2] = [6,7,8]
print(count(child_dict,0))
(A) 6
(B) 1
(C) 8
(D) 9
Page 23 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
computeS(X)
𝑆[1] ← 1
for 𝑖 ←2 to 𝑙𝑒𝑛𝑔𝑡ℎ(𝑋)
𝑆[𝑖] ← 1
if 𝑋 [𝑖 − 1] ≤ 𝑋[𝑖]
𝑆[𝑖] ← 𝑆[𝑖] + 𝑆[𝑖 − 1]
end if
end for
return S
Which ONE of the following values is returned by the function computeS(X)
for X = [6, 3, 5, 4, 10]?
(A) [1, 1, 2, 3, 4]
(B) [1, 1, 2, 3, 3]
(C) [1, 1, 2, 1, 2]
(D) [1, 1, 2, 1, 5]
Page 24 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.40 Let 𝐹 (𝑛) denote the maximum number of comparisons made while searching for
an entry in a sorted array of size 𝑛 using binary search.
What does this Python function fun() do? Select the ONE appropriate option
below.
(A) It finds the smallest element in D from index s1 to s2, both inclusive.
(B) It performs a merge sort in-place on this list D between indices s1 and s2, both
inclusive.
(C) It reverses the list D between indices s1 and s2, both inclusive.
(D) It swaps the elements in D at indices s1 and s2, and leaves the remaining elements
unchanged.
Page 25 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.42 Consider the table below, where the (𝑖, 𝑗)𝑡ℎ element of the table is the distance
between points 𝑥 𝑖 and 𝑥𝑗. Single linkage clustering is performed on data points,
𝑥 1 , 𝑥 2 , 𝑥 3 , 𝑥 4 , 𝑥 5.
𝑥1 𝑥2 𝑥3 𝑥4 𝑥5
𝑥1 0 1 4 3 6
𝑥2 1 0 3 5 3
𝑥3 4 3 0 2 5
𝑥4 3 5 2 0 1
𝑥5 6 3 5 1 0
Which ONE of the following is the correct representation of the clusters produced?
(A)
(B)
(C)
(D)
Page 26 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.43 Consider the two neural networks (NNs) shown in Figures 1 and 2, with 𝑅𝑒𝐿𝑈
activation (𝑅𝑒𝐿𝑈(𝑧) = max{0, 𝑧} , ∀𝑧 ∈ ℝ). ℝ denotes the set of real numbers. The
connections and their corresponding weights are shown in the Figures. The biases
at every neuron are set to 0. For what values of 𝑝, 𝑞, 𝑟 in Figure 2 are the two NNs
equivalent, when 𝑥 1 , 𝑥 2 , 𝑥 3 are positive?
Figure 1
Figure 2
Page 27 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.44 Consider a state space where the start state is number 1. The successor function for
the state numbered n returns two states numbered n+1 and n+2. Assume that the
states in the unexpanded state list are expanded in the ascending order of numbers
and the previously expanded states are not added to the unexpanded state list.
Which ONE of the following statements about breadth-first search (BFS) and
depth-first search (DFS) is true, when reaching the goal state number 6?
(D) Both BFS and DFS do not reach the goal state number 6.
Which ONE among the following choices of sorting algorithms sorts the numbers
in the array [4, 3, 2, 1, 5] in increasing order after exactly two passes over the array?
Page 28 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.46 Given the relational schema 𝑅 = (𝑈, 𝑉, 𝑊, 𝑋, 𝑌, 𝑍) and the set of functional
dependencies:
{𝑈 → 𝑉, 𝑈 → 𝑊, 𝑊𝑋 → 𝑌, 𝑊𝑋 → 𝑍, 𝑉 → 𝑋}
Which of the following functional dependencies can be derived from the above
set?
(A) 𝑉𝑊 → 𝑌𝑍
(B) 𝑊𝑋 → 𝑌𝑍
(C) 𝑉𝑊 → 𝑈
(D) 𝑉𝑊 → 𝑌
Page 29 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
(A) 𝑥1 1 1
{𝐱 = [𝑥 2 ] ∈ ℝ3 : 𝐱 = 𝛼 [1] + 𝛽 [ 0] , 𝛼, 𝛽 ∈ ℝ}
𝑥3 0 0
(B) 𝑥1 1 1
{𝐱 = [𝑥 2 ] ∈ ℝ3 : 𝐱 = 𝛼2 [ 2] + 𝛽2 [0] , 𝛼, 𝛽 ∈ ℝ}
𝑥3 0 1
(C) 𝑥1
{𝐱 = [𝑥 2 ] ∈ ℝ3 : 5𝑥1 + 2𝑥 3 = 0, 4𝑥 1 − 2𝑥 2 + 3𝑥 3 = 0}
𝑥3
(D) 𝑥1
{𝐱 = [𝑥 2 ] ∈ ℝ3 : 5𝑥1 + 2𝑥 3 + 4 = 0}
𝑥3
Page 30 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Page 31 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.49 Let ℝ be the set of real numbers, 𝑈 be a subspace of ℝ3 and 𝑴 ∈ ℝ3×3 be the
matrix corresponding to the projection on to the subspace 𝑈.
(A)
If 𝑈 is a 1-dimensional subspace of ℝ3 , then the null space of 𝑴 is a
1-dimensional subspace.
(C) 𝑴2 = 𝑴
(D) 𝑴3 = 𝑴
Q.50 Consider the function 𝑓: ℝ → ℝ where ℝ is the set of all real numbers.
𝑥 4 2𝑥 3 3𝑥 2
𝑓( 𝑥 ) = − − +1
4 3 2
Which of the following statements is/are TRUE?
Page 32 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Which of the following is/are valid vertex orderings that can be obtained from a
topological sort of the DAG?
(A) PQRSTUV
(B) PRQVSUT
(C) PQRSVUT
(D) PR QSV TU
Page 33 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.52 Let H, 𝐼, 𝐿, and 𝑁 represent height, number of internal nodes, number of leaf nodes,
and the total number of nodes respectively in a rooted binary tree.
(A) 𝐿 ≤ 𝐼 +1
(B) 𝐻 + 1 ≤ 𝑁 ≤ 2𝐻+1 − 1
(C) 𝐻 ≤ 𝐼 ≤ 2𝐻 − 1
(D) 𝐻 ≤ 𝐿 ≤ 2𝐻−1
Page 34 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
(i) (ii)
(iii) (iv)
Page 35 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.54 Let game(ball, rugby) be true if the ball is used in rugby and false otherwise.
Let shape(ball, round) be true if the ball is round and false otherwise.
(A) 𝑠1 ∧ 𝑠3
(B) 𝑠1 ∧ 𝑠2
(C) 𝑠2 ∧ 𝑠3
(D) 𝑠3 ∧ 𝑠4
Page 36 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Movie(ID, CustomerRating)
Genre(ID, Name)
Movie_Genre(MovieID, GenreID)
SELECT *
FROM Movie, Genre, Movie_Genre
WHERE
Movie.CustomerRating > 3.4 AND
Genre.Name = “Comedy” AND
Movie_Genre.MovieID = Movie.ID AND
Movie_Genre.GenreID = Genre.ID;
This SQL query can be sped up using which of the following indexing options?
Q.56 Let 𝑋 be a random variable uniformly distributed in the interval [1, 3] and 𝑌 be a
random variable uniformly distributed in the interval [2, 4]. If X and Y are
independent of each other, the probability P(𝑋 ≥ 𝑌) is ______ (rounded off to
three decimal places).
Page 37 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.57 Let 𝑋 be a random variable exponentially distributed with parameter 𝜆 > 0. The
probability density function of X is given by:
−𝜆𝑥
𝑓𝑋 (𝑥 ) = { 𝜆 𝑒 , 𝑥≥0
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
If 5𝐸(𝑋) = 𝑉𝑎𝑟(𝑋), where 𝐸 (𝑋) and 𝑉𝑎𝑟(𝑋) indicate the expectation and variance
of 𝑋, respectively, the value of 𝜆 is ______ (rounded off to one decimal place).
Q.58 Consider two events T and S. Let 𝑇̅ denote the complement of the event T. The
probability associated with different events are given as follows:
Q.59 Consider a joint probability density function of two random variables X and Y
Page 38 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.61 1
2
Let 𝒖 = 3 , and let 𝜎1 , 𝜎2 , 𝜎3 , 𝜎4 , 𝜎5 be the singular values of the matrix
4
[5]
Q.62 Details of ten international cricket games between two teams “Green” and “Blue ”
are given in Table C. This table consists of matches played on different pitches,
across formats along with their winners. The attribute Pitch can take one of two
values: spin-friendly (represented as 𝑆) or pace-friendly (represented as 𝐹). The
attribute Format can take one of two values: one-day match (represented as 𝑂) or
test match (represented as 𝑇).
A cricket organization would like to use the information given in Table C to develop
a decision-tree model to predict outcomes of future games between these two teams.
Table C
Page 39 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.63 Given the two-dimensional dataset consisting of 5 data points from two classes
(circles and squares) and assume that the Euclidean distance is used to measure the
distance between two points. The minimum odd value of 𝑘 in 𝑘-nearest neighbor
algorithm for which the diamond (⋄) shaped data point is assigned the label square
is ______.
Page 40 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)
Q.64 Given the following Bayesian Network consisting of four Bernoulli random
variables and the associated conditional probability tables:
𝑃(⋅)
𝑈=0 0.5
𝑈=1 0.5
𝑃(𝑉 = 0| ⋅) 𝑃 (𝑉 = 1| ⋅ )
𝑈= 0 0.5 0.5
𝑈=1 0.5 0.5
𝑃(𝑊 = 0| ⋅) 𝑃(𝑊 = 1| ⋅ )
𝑈=0 1 0
𝑈=1 0 1
𝑃(𝑍 = 0| ⋅) 𝑃(𝑍 = 1| ⋅ )
𝑉= 0 𝑊 =0 0.5 0.5
𝑉= 0 𝑊 =1 1 0
𝑉= 1 𝑊 =0 1 0
𝑉= 1 𝑊 =1 0.5 0.5
Q.65 Two fair coins are tossed independently. X is a random variable that takes a value
of 1 if both tosses are heads and 0 otherwise. Y is a random variable that takes a
value of 1 if at least one of the tosses is heads and 0 otherwise.
The value of the covariance of X and Y is ______ (rounded off to three decimal
places).
Page 41 of 41
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.1 If ‘→’ denotes increasing order of intensity, then the meaning of the words
(A) starve
(B) reject
(C) feast
(D) deny
Q.2 If two distinct non-zero real variables 𝑥 and 𝑦 are such that (𝑥 + 𝑦) is proportional
𝑥
to (𝑥 − 𝑦) then the value of
𝑦
(A) depends on 𝑥𝑦
(D) is a constant
Page 1 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
(A) 13.5
(B) 14
(C) 11
(D) 18.7
Q.4 The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the
ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins is
(A) 21%
(B) 2
14 7%
(C) 10%
(D) 30%
Page 2 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
𝑝4 +𝑞4
then, the value of is
𝑝2 𝑞 2
(A) 79
(B) 81
(C) 9
(D) 83
Page 3 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.6 In the given text, the blanks are numbered (i)−(iv). Select the best match for all the
blanks.
(i) (ii)
Steve was advised to keep his head before heading to bat;
(iii)
for, while he had a head batting, he could only do so with a cool head
(iv)
s his shoulders.
Page 4 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Then, the ratio of the volume of the cylindrical tube to the volume of the cube is
(A) 1/π
(B) 2/π
(C) 3/π
(D) 4/π
Page 5 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.8 The pie chart presents the percentage contribution of different macronutrients to a
typical 2,000 kcal diet of a person.
Trans
fat
5%
Saturated fat
20% Carbohydrates
35%
Unsaturated fat
20%
Proteins
20%
The typical energy density (kcal/g) of these macronutrients is given in the table.
The total fat (all three types), in grams, this person consumes is
(A) 44.4
(B) 77.8
(C) 100
(D) 3,600
Page 6 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.9 A rectangular paper of 20 cm × 8 cm is folded 3 times. Each fold is made along the
line of symmetry, which is perpendicular to its long edge. The perimeter of the final
folded sheet (in cm) is
(A) 18
(B) 24
(C) 20
(D) 21
Q.10 The least number of squares to be added in the figure to make AB a line of
symmetry is
(A) 6
(B) 4
(C) 5
(D) 7
Page 7 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
(A) {−1, 1, 2}
(C) {0, 1}
(D) {−1, 0, 1}
1 2 3
Q.12 The product of all eigenvalues of the matrix [4 5 6] is
7 8 9
(A) −1
(B) 0
(C) 1
(D) 2
Page 8 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.13 Consider a system that uses 5 bits for representing signed integers in 2’s complement
format. In this system, two integers 𝐴 and 𝐵 are represented as 𝐴=01010 and
𝐵=11010. Which one of the following operations will result in either an arithmetic
overflow or an arithmetic underflow?
(A) 𝐴+𝐵
(B) 𝐴−𝐵
(C) 𝐵−𝐴
(D) 2∗𝐵
Q.14 Consider a permutation sampled uniformly at random from the set of all
permutations of {1, 2, 3, ⋯ , 𝑛} for some 𝑛 ≥ 4. Let 𝑋 be the event that 1 occurs
before 2 in the permutation, and 𝑌 the event that 3 occurs before 4. Which one of
the following statements is TRUE?
Page 9 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
In the cycle stealing mode of DMA, one word of data is transferred between an I/O
(A)
device and main memory in a stolen cycle
For bulk data transfer, the burst mode of DMA has a higher throughput than the
(B)
cycle stealing mode
Programmed I/O mechanism has a better CPU utilization than the interrupt driven
(C)
I/O mechanism
The CPU can start executing an interrupt service routine faster with vectored
(D)
interrupts than with non-vectored interrupts
Page 10 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.16 A user starts browsing a webpage hosted at a remote server. The browser opens a
single TCP connection to fetch the entire webpage from the server. The webpage
consists of a top-level index page with multiple embedded image objects. Assume
that all caches (e.g., DNS cache, browser cache) are all initially empty. The
following packets leave the user’s computer in some order.
Which one of the following is the CORRECT chronological order (earliest in time
to latest) of the packets leaving the computer ?
Q.17 Given an integer array of size N, we want to check if the array is sorted (in either
ascending or descending order). An algorithm solves this problem by making a
single pass through the array and comparing each element of the array only with its
adjacent elements. The worst-case time complexity of this algorithm is
Page 11 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
#include <stdio.h>
int main(){
int a = 6;
int b = 0;
a = a / 12 + 1;
a += b;}
printf(”%d”, a);
return 0;}
Page 12 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
fX(); fX();
putchar(a);}
Assume that the input to the program from the command line is 1234 followed by
a newline character. Which one of the following statements is CORRECT?
Page 13 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.20 Let S be the specification: "Instructors teach courses. Students register for courses.
Courses are allocated classrooms. Instructors guide students." Which one of the
following ER diagrams CORRECTLY represents S?
(A) (i)
(B) (ii)
(C) (iii)
(D) (iv)
Page 14 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.21 In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed
for which one of the following cases?
Q.22 Which of the following statements about a relation R in first normal form (1NF)
is/are TRUE ?
Page 15 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.23 Let 𝐿1 , 𝐿2 be two regular languages and 𝐿3 a language which is not regular.
Which of the following statements is/are always TRUE?
(C) ̅̅̅
𝐿3 is not regular
(D) ̅̅̅
𝐿1 ∪ ̅̅̅
𝐿2 is regular
(B) Each thread has its own file descriptor table for open files
(D) Threads belonging to a process are by default not protected from each other
Page 16 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.25 Which of the following process state transitions is/are NOT possible?
(D) LR Parser
Page 17 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.27 Let 𝐴 and 𝐵 be two events in a probability space with 𝑃(𝐴) = 0.3, 𝑃(𝐵) = 0.5,
and 𝑃(𝐴 ∩ 𝐵) = 0.1. Which of the following statements is/are TRUE?
𝑃(𝐴𝑐 ∩ 𝐵 𝑐 ) = 0.4, where 𝐴𝑐 and 𝐵 𝑐 are the complements of the events 𝐴 and 𝐵,
(D)
respectively
Q.28 Consider the circuit shown below where the gates may have propagation delays.
Assume that all signal transitions occur instantaneously and that wires have no
delays. Which of the following statements about the circuit is/are CORRECT?
With propagation delays, the output 𝒀 can have a transient logic One after 𝑿
(C)
transitions from logic Zero to logic One
With propagation delays, the output 𝒀 can have a transient logic Zero after 𝑿
(D)
transitions from logic One to logic Zero
Page 18 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.29 TCP client P successfully establishes a connection to TCP server Q. Let 𝑁𝑃 denote
the sequence number in the SYN sent from P to Q. Let 𝑁𝑄 denote the
acknowledgement number in the SYN ACK from Q to P. Which of the following
statements is/are CORRECT?
Q.30 Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction
Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB)
stages. Which of the following statements about forwarding is/are CORRECT?
In forwarding, data from the output of the MEM stage can be passed on to the
(B)
input of the EX stage of the next instruction
Forwarding does not require any extra hardware to retrieve the data from the
(D)
pipeline stages
Page 19 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.31 Which of the following fields is/are modified in the IP header of a packet going out
of a network address translation (NAT) device from an internal network to an
external network?
(A) Source IP
(B) Destination IP
Q.32 Let 𝐴 and 𝐵 be non-empty finite sets such that there exist one-to-one and onto
functions (i) from 𝐴 to 𝐵 and (ii) from 𝐴 × 𝐴 to 𝐴 ∪ 𝐵. The number of possible
values of |𝐴| is __________
Q.33 Consider the operator precedence and associativity rules for the integer arithmetic
operators given in the table below.
Page 20 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
𝑹 𝑺
𝑨 𝑩 𝑨 𝑪
10 20 10 90
20 30 30 45
30 40 40 80
30 50
50 95
𝝈𝑩<𝑪 (𝑹 ⋈𝑹.𝑨=𝑺.𝑨 𝑺)
is _________
Page 21 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Consider a network path P—Q—R between nodes P and R via router Q. Node P
Q.36
sends a file of size 106 bytes to R via this path by splitting the file into chunks of
103 bytes each. Node P sends these chunks one after the other without any wait time
between the successive chunk transmissions. Assume that the size of extra headers
added to these chunks is negligible, and that the chunk size is less than the MTU.
Each of the links P—Q and Q—R has a bandwidth of 106 bits/sec, and negligible
propagation latency. Router Q immediately transmits every packet it receives from
P to R, with negligible processing and queueing delays. Router Q can
simultaneously receive on link P—Q and transmit on link Q—R.
(A) 8.000
(B) 8.008
(C) 15.992
(D) 16.000
Page 22 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
𝑈 → "K" { 𝑈. 𝑣𝑎𝑙 = 5; }
Given "MMLK" as the input, which one of the following options is the CORRECT
value computed by the SDD (in the attribute 𝑆. 𝑣𝑎𝑙)?
(A) 45
(B) 50
(C) 55
(D) 65
Page 23 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.38 Consider the following grammar 𝐺, with 𝑆 as the start symbol. The grammar 𝐺 has
three incomplete productions denoted by (1), (2), and (3).
𝑆 → 𝑑𝑎𝑇 | (1)
𝑇 → 𝑎𝑆 | 𝑏𝑇 | (2)
𝑅 → (3) | 𝜖
The set of terminals is {𝑎, 𝑏, 𝑐, 𝑑, 𝑓}. The FIRST and FOLLOW sets of the different
non-terminals are as follows.
Page 24 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
𝐿1: 𝑡1 = −1
𝐿2: 𝑡2 = 0
𝐿3: 𝑡3 = 0
𝐿4: 𝑡4 = 4 ∗ 𝑡3
𝐿5: 𝑡5 = 4 ∗ 𝑡2
𝐿6: 𝑡6 = 𝑡5 ∗ 𝑀
𝐿7: 𝑡7 = 𝑡4 + 𝑡6
𝐿8: 𝑡8 = 𝑎[𝑡7]
𝐿9: if 𝑡8 <= 𝑚𝑎𝑥 goto 𝐿11
𝐿10: 𝑡1 = 𝑡8
𝐿11: 𝑡3 = 𝑡3 + 1
𝐿12: if 𝑡3 < 𝑀 goto 𝐿4
𝐿13: 𝑡2 = 𝑡2 + 1
𝐿14: if 𝑡2 < 𝑁 goto 𝐿3
𝐿15: 𝑚𝑎𝑥 = 𝑡1
Which one of the following options CORRECTLY specifies the number of basic
blocks and the number of instructions in the largest basic block, respectively ?
(A) 6 and 6
(B) 6 and 7
(C) 7 and 7
(D) 7 and 6
Page 25 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.40 Consider the following two threads T1 and T2 that update two shared variables
a and b. Assume that initially a = b = 1. Though context switching between
threads can happen at any time, each statement of T1 or T2 is executed atomically
without interruption.
T1 T2
a = a + 1; b = 2 * b;
b = b + 1; a = 2 * a;
Which one of the following options lists all the possible combinations of values of
a and b after both T1 and T2 finish execution?
Q.41 An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the
following options represents the first three elements in the heapified array?
Page 26 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.43 Consider a binary min-heap containing 105 distinct elements. Let 𝑘 be the index (in
the underlying array) of the maximum element stored in the heap. The number of
possible values of 𝑘 is
(A) 53
(B) 52
(C) 27
(D) 1
Page 27 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.45 Let 𝐺 be a directed graph and 𝑇 a depth first search (DFS) spanning tree in 𝐺 that
is rooted at a vertex 𝑣. Suppose 𝑇 is also a breadth first search (BFS) tree in 𝐺,
rooted at 𝑣. Which of the following statements is/are TRUE for every such graph 𝐺
and tree 𝑇 ?
Page 28 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
(A) 𝑇1 𝑇2 𝑇3
(B) 𝑇1 𝑇3 𝑇2
(C) 𝑇3 𝑇2 𝑇1
(D) 𝑇3 𝑇1 𝑇2
(B) 𝐹(𝑋, 𝑌, 𝑍) = 𝑋𝑌 + 𝑌𝑍 + 𝑋𝑍
Page 29 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
(A) If the inputs are x=20, y=10, then the return value is greater than 220
(B) If the inputs are x=20, y=20, then the return value is greater than 220
(C) If the inputs are x=20, y=10, then the return value is less than 210
(D) If the inputs are x=10, y=20, then the return value is greater than 220
Q.49 Let 𝐴 be any 𝑛 × 𝑚 matrix, where 𝑚 > 𝑛. Which of the following statements is/are
TRUE about the system of linear equations 𝐴𝑥 = 0 ?
There exist 𝑚 − 𝑛 linearly independent vectors such that every solution is a linear
(B)
combination of these vectors
Page 30 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.50 Consider the 5-state DFA 𝑀 accepting the language 𝐿(𝑀) ⊂ (0 + 1)∗ shown
below. For any string 𝑤 ∈ (0 + 1)∗ let 𝑛0 (𝑤) be the number of 0′ 𝑠 in 𝑤 and
𝑛1 (𝑤) be the number of 1′𝑠 in 𝑤 .
Page 31 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.51 The chromatic number of a graph is the minimum number of colours used in a
proper colouring of the graph. Let 𝐺 be any graph with 𝑛 vertices and chromatic
number 𝑘. Which of the following statements is/are always TRUE?
Q.52 Consider the operators ◊ and □ defined by 𝑎 ◊ 𝑏 = 𝑎 + 2𝑏, 𝑎□𝑏 = 𝑎𝑏, for positive
integers. Which of the following statements is/are TRUE?
Page 32 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.53 Consider two set-associative cache memory architectures: WBC, which uses the
write back policy, and WTC, which uses the write through policy. Both of them use
the LRU (Least Recently Used) block replacement policy. The cache memory is
connected to the main memory. Which of the following statements is/are TRUE?
A read miss in WTC never triggers a write back operation of a cache block to
(B)
main memory
(C) A write hit in WBC can modify the value of the dirty bit of a cache block
A write miss in WTC always writes the victim cache block to main memory
(D)
before loading the missed block to the cache
Q.54 Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per
track and each sector holds 1024 bytes of data. The number of cylinders in the hard
disk is _________
Q.55 The baseline execution time of a program on a 2 GHz single core machine is
100 nanoseconds (ns). The code corresponding to 90% of the execution time can be
fully parallelized. The overhead for using an additional core is 10 ns when running
on a multicore system. Assume that all cores in the multicore system run their share
of the parallelized code for an equal amount of time.
The number of cores that minimize the execution time of the program is ________
Q.56 A given program has 25% load/store instructions. Suppose the ideal CPI (cycles per
instruction) without any memory stalls is 2. The program exhibits 2% miss rate on
instruction cache and 8% miss rate on data cache. The miss penalty is 100 cycles.
The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e.,
with NO data or instruction cache misses) is _________
Page 33 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.57 Consider the following code snippet using the fork() and wait() system calls.
Assume that the code compiles and runs correctly, and that the system calls run
successfully without any errors.
int x = 3;
while(x > 0) {
fork();
printf("hello");
wait(NULL);
x--;
}
Q.58 Consider the entries shown below in the forwarding table of an IP router. Each entry
consists of an IP prefix and the corresponding next hop router for packets whose
destination IP address matches the prefix. The notation “/N” in a prefix indicates a
subnet mask with the most significant N bits set to 1.
This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are
10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205 . The number of
packets forwarded via the next hop router R2 is _______
Page 34 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.60 The number of edges present in the forest generated by the DFS traversal of an
undirected graph 𝐺 with 100 vertices is 40. The number of connected components
in 𝐺 is _________
Q.61 Consider the following two regular expressions over the alphabet {0,1}:
𝑟 = 0∗ + 1∗
𝑠 = 01∗ + 10∗
The total number of strings of length less than or equal to 5, which are
neither in 𝑟 nor in 𝑠, is _________
Q.62 Consider a memory management system that uses a page size of 2 KB. Assume that
both the physical and virtual addresses start from 0. Assume that the pages 0, 1, 2,
and 3 are stored in the page frames 1, 3, 2, and 0, respectively. The physical address
(in decimal format) corresponding to the virtual address 2500 (in decimal format)
is _________
Q.63 A bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without
replacement. Given that the first ball drawn is red, the probability (rounded off to 3
decimal places) that both balls drawn are red is _________
Page 35 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)
Q.64 Consider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and
M3 as shown below. X1 and X2 are inputs of M1. X3 and X4 are inputs of M2.
A, B, and C are select lines of M1, M2, and M3, respectively.
X1 0
Q1
X2 1 M1
S1
0
A Y
M3
1
S3
X3 0
C
Q2
M2
X4 1
S2
For an instance of inputs X1=1, X2=1, X3=0, and X4=0, the number of
combinations of A, B, C that give the output Y=1 is _________
Page 36 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.1 If ‘→’ denotes increasing order of intensity, then the meaning of the words
(A) phased
(B) phrased
(C) fazed
(D) fused
Q.2 Two wizards try to create a spell using all the four elements, water, air, fire, and
earth. For this, they decide to mix all these elements in all possible orders. They
also decide to work independently. After trying all possible combination of
elements, they conclude that the spell does not work.
How many attempts does each wizard make before coming to this conclusion,
independently?
(A) 24
(B) 48
(C) 16
(D) 12
Page 1 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.3 In an engineering college of 10,000 students, 1,500 like neither their core branches
nor other branches. The number of students who like their core branches is 1/4th of
the number of students who like other branches. The number of students who like
both their core and other branches is 500.
(A) 1,800
(B) 3,500
(C) 1,600
(D) 1,500
(A) 1
(B) 1/2
(C) 2
(D) 4
Page 2 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
(A) 25
(B) 21
(C) 18
(D) 20
Page 3 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
R: The natural process of the cooling of this massive edifice absorbed large
quantities of atmospheric carbon dioxide, altering the earth’s atmosphere and
making it better suited for life.
S: Many millennia ago, a breakaway chunk of bedrock from the Antarctic Plate
collided with the massive Eurasian Plate.
(A) QPSR
(B) QSPR
(C) SPRQ
(D) SRPQ
Page 4 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.7 A person sold two different items at the same price. He made 10% profit in one
item, and 10% loss in the other item. In selling these two items, the person made a
total of
(A) 1% profit
(B) 2% profit
(C) 1% loss
(D) 2% loss
Page 5 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.8 The pie charts depict the shares of various power generation technologies in the
total electricity generation of a country for the years 2007 and 2023.
Solar Coal
Coal 20% 20%
Hydro
35%
30% Gas
15%
Hydro
Gas 35%
25%
Wind
Wind
10%
5%
The renewable sources of electricity generation consist of Hydro, Solar and Wind.
Assuming that the total electricity generated remains the same from 2007 to 2023,
what is the percentage increase in the share of the renewable sources of electricity
generation over this period?
(A) 25%
(B) 50%
(C) 77.5%
(D) 62.5%
Page 6 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.9 A cube is to be cut into 8 pieces of equal size and shape. Here, each cut should be
straight and it should not stop till it reaches the other end of the cube.
(A) 3
(B) 4
(C) 7
(D) 8
Page 7 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.10 In the 4 × 4 array shown below, each cell of the first three rows has either a
cross (X) or a number.
The number in a cell represents the count of the immediate neighboring cells
(left, right, top, bottom, diagonals) NOT having a cross (X). Given that the last row
has no crosses (X), the sum of the four numbers to be filled in the last row is
(A) 11
(B) 10
(C) 12
(D) 9
Page 8 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Consider a computer with a 4 MHz processor. Its DMA controller can transfer
8 bytes in 1 cycle from a device to main memory through cycle stealing at regular
Q.11
intervals. Which one of the following is the data transfer rate (in bits per second) of
the DMA controller if 1% of the processor cycles are used for DMA?
(A) 2,56,000
(B) 3,200
(C) 25,60,000
(D) 32,000
Consider the statement: “Fail grade cannot be given when student scores more than
50% marks.”
Which one of the following is the CORRECT representation of the above statement
in propositional logic?
(A) 𝑞 → ¬𝑝
(B) 𝑞→𝑝
(C) 𝑝→𝑞
(D) ¬𝑝 → 𝑞
Page 9 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.13 Consider the following C program. Assume parameters to a function are evaluated
from right to left.
#include <stdio.h>
int main() {
f(g(10),h(20));
}
Which one of the following options is the CORRECT output of the above
C program?
(A) 20101020
(B) 10202010
(C) 20102010
(D) 10201020
Page 10 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
(D)
0 0111 1111 0000 0000 0000 0000 0000 000
Page 11 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
𝑇(0) = 1,
𝑇(1) = 2, and
𝑇(𝑛) = 5𝑇(𝑛 − 1) − 6𝑇(𝑛 − 2) for 𝑛 ≥ 2
𝑓(𝑥) = 1 − 𝑓(2 − 𝑥)
2
Which one of the following options is the CORRECT value of ∫0 𝑓(𝑥)𝑑𝑥 ?
(A) 0
(B) 1
(C) 2
(D) −1
Page 12 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.17 Let 𝐴 be the adjacency matrix of a simple undirected graph 𝐺. Suppose 𝐴 is its own
inverse. Which one of the following statements is always TRUE?
(A) 𝐺 is a cycle
Q.18 When six unbiased dice are rolled simultaneously, the probability of getting all
distinct numbers (i.e., 1, 2, 3, 4, 5, and 6) is
1
(A)
324
5
(B)
324
7
(C)
324
11
(D)
324
Page 13 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.19 Once the DBMS informs the user that a transaction has been successfully
completed, its effect should persist even if the system crashes before all its changes
are reflected on disk. This property is called
(A) durability
(B) atomicity
(C) consistency
(D) isolation
Q.20 In the context of owner and weak entity sets in the ER (Entity-Relationship) data
model, which one of the following statements is TRUE?
(A) The weak entity set MUST have total participation in the identifying relationship
(B) The owner entity set MUST have total participation in the identifying relationship
Both weak and owner entity sets MUST have total participation in the identifying
(C)
relationship
Neither weak entity set nor owner entity set MUST have total participation in the
(D)
identifying relationship
Page 14 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Set X Set Y
Which one of the following options is the CORRECT match from Set X to Set Y ?
(A) P – 4; Q – 1; R – 3; S – 2
(B) P – 2; Q – 3; R – 1; S – 4
(C) P – 2; Q – 1; R – 3; S – 4
(D) P – 4; Q – 3; R – 2; S – 1
Page 15 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.22 Which one of the following regular expressions is equivalent to the language
accepted by the DFA given below?
0
1 0
Page 16 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.23 Node X has a TCP connection open to node Y. The packets from X to Y go through
an intermediate IP router R. Ethernet switch S is the first switch on the network path
between X and R. Consider a packet sent from X to Y over this connection.
Which of the following statements is/are TRUE about the destination IP and MAC
addresses on this packet at the time it leaves X?
Q.24 Which of the following tasks is/are the responsibility/responsibilities of the memory
management unit (MMU) in a system with paging-based memory management?
(B) Translate a virtual address to a physical address using the page table
(C) Raise a trap when a virtual address is not found in the page table
Raise a trap when a process tries to write to a page marked with read-only
(D)
permission in the page table
Page 17 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.25 Consider a process P running on a CPU. Which one or more of the following events
will always trigger a context switch by the OS that results in process P moving to a
non-running state (e.g., ready, blocked)?
(A) P makes a blocking system call to read a block of data from the disk
(B) P tries to access a page that is in the swap space, triggering a page fault
(C) An interrupt is raised by the disk to deliver data requested by some other process
Q.26 Which of the following file organizations is/are I/O efficient for the scan operation
in DBMS?
(A) Sorted
(B) Heap
Page 18 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.27 Which of the following statements about the Two Phase Locking (2PL) protocol
is/are TRUE?
With 2PL, a transaction always locks the data item being read or written just
(B)
before every operation and always releases the lock just after the operation
With 2PL, once a lock is released on any data item inside a transaction, no more
(C)
locks on any data item can be obtained inside that transaction
Q.28 Which of the following statements about IPv4 fragmentation is/are TRUE?
(C) The reassembly of fragments is performed only at the destination of the datagram
Page 19 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
(C) Synthesized attributes can be evaluated by a bottom-up parser as the input is parsed
Q.30 For a Boolean variable 𝑥, which of the following statements is/are FALSE?
(A) 𝑥. 1 = 𝑥
(B) 𝑥+1=𝑥
(C) 𝑥. 𝑥 = 0
(D) 𝑥 + 𝑥̅ = 1
Page 20 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Page 21 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.32 Which of the following fields of an IP header is/are always modified by any router
before it forwards the IP packet?
(B) Protocol
char *b = a;
while(*b)
b++;
return b - a;}
Page 22 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.34 Let 𝑃 be the partial order defined on the set {1,2,3,4} as follows
Q.35 Let 𝐴be an array containing integer values. The distance of 𝐴 is defined as the
minimum number of elements in 𝐴 that must be replaced with another integer so
that the resulting array is sorted in non-decreasing order. The distance of the array
[2, 5, 3, 1, 4, 2, 6] is ___________
Page 23 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
#include <stdio.h>
int main() {
p = a;
q = p + 1;
return 0;}
(A) 4,8
(B) 1,5
(C) 8,5
(D) 1,8
Page 24 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.37 Consider a single processor system with four processes A, B, C, and D, represented
as given below, where for each process the first value is its arrival time, and the
second value is its CPU burst time.
Which one of the following options gives the average waiting times when
preemptive Shortest Remaining Time First (SRTF) and Non-Preemptive Shortest
Job First (NP-SJF) CPU scheduling algorithms are applied to the processes?
Which one of the following CIDR prefixes exactly represents the range of
Q.38
IP addresses 10.12.2.0 to 10.12.3.255?
(A) 10.12.2.0/23
(B) 10.12.2.0/24
(C) 10.12.0.0/22
(D) 10.12.2.0/22
Page 25 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.39 You are given a set 𝑉 of distinct integers. A binary search tree 𝑇 is created by
inserting all elements of 𝑉 one by one, starting with an empty tree. The tree 𝑇
follows the convention that, at each node, all values stored in the left subtree of the
node are smaller than the value stored at the node. You are not aware of the sequence
in which these values were inserted into 𝑇, and you do not have access to 𝑇.
Page 26 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.40 Consider the following context-free grammar where the start symbol is 𝑆 and the
set of terminals is {𝑎,𝑏,𝑐,𝑑}.
𝑆 → 𝐴𝑎𝐴𝑏|𝐵𝑏𝐵𝑎
𝐴 → 𝑐𝑆|𝜖
𝐵 → 𝑑𝑆|𝜖
𝑎 𝑏 𝑐 𝑑 $
𝐴 𝐴→𝜖 (3) 𝐴 → 𝑐𝑆
𝐵 (4) 𝐵→𝜖 𝐵 → 𝑑𝑆
Which one of the following options represents the CORRECT combination for the
numbered cells in the parsing table?
Note: In the options, “blank” denotes that the corresponding cell is empty.
Page 27 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.41 Let 𝑀 be the 5-state NFA with 𝜖-transitions shown in the diagram below.
Which one of the following regular expressions represents the language accepted
by 𝑀 ?
Page 28 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
The C code snippet given below has been written to compute the length of the
longest subarray of X that contains at most two distinct integers. The code has two
missing expressions labelled (𝑃)and (𝑄).
Which one of the following options gives the CORRECT missing expressions?
(Hint: At the end of the i-th iteration, the value of len1 is the length of the longest
subarray ending with X[i] that contains all equal values, and len2 is the length
of the longest subarray ending with X[i] that contains at most two distinct values.)
Page 29 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.43 Consider the following expression: 𝑥[𝑖] = (𝑝 + 𝑟) ∗ −𝑠[𝑖] + 𝑢/𝑤. The following
sequence shows the list of triples representing the given expression, with entries
missing for triples (1), (3), and (6).
(0) + 𝑝 𝑟
(1)
(3)
(4) / 𝑢 𝑤
(6)
Which one of the following options fills in the missing entries CORRECTLY?
Page 30 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.44 Let 𝑥 and 𝑦 be random variables, not necessarily independent, that take real values
in the interval [0,1]. Let 𝑧 = 𝑥𝑦 and let the mean values of 𝑥, 𝑦, 𝑧 be 𝑥̅ , 𝑦̅, 𝑧̅,
respectively. Which one of the following statements is TRUE?
(A) 𝑧̅ = 𝑥̅ 𝑦̅
(B) 𝑧̅ ≤ 𝑥̅ 𝑦̅
(C) 𝑧̅ ≥ 𝑥
̅ 𝑦̅
(D)
𝑧̅ ≤ 𝑥̅
Q.45 The relation schema, Person(pid,city), describes the city of residence for
every person uniquely identified by pid. The following relational algebra operators
are available: selection, projection, cross product, and rename.
To find the list of cities where at least 3 persons reside, using the above operators,
the minimum number of cross product operations that must be used is
(A) 1
(B) 2
(C) 3
(D) 4
Page 31 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Consider a multi-threaded program with two threads T1 and T2. The threads share
Q.46 two semaphores: s1 (initialized to 1) and s2 (initialized to 0). The threads also
share a global variable x (initialized to 0). The threads execute the code shown
below.
// code of T1 // code of T2
wait(s1); wait(s1);
x = x+1; x = x+1;
print(x); print(x);
wait(s2); signal(s2);
signal(s1); signal(s1);
Which of the following outcomes is/are possible when threads T1 and T2 execute
concurrently?
(C) T1 runs first and prints 1, T2 does not print anything (deadlock)
(D) T2 runs first and prints 1, T1 does not print anything (deadlock)
Let 𝐴 be an 𝑛 × 𝑛 matrix over the set of all real numbers ℝ. Let 𝐵 be a matrix
Q.47 obtained from 𝐴 by swapping two rows. Which of the following statements is/are
TRUE?
(D) If the trace of 𝐴 is zero, then the trace of 𝐵is also zero
Page 32 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.48 Let S1 and S2 be two stacks. S1 has capacity of 4 elements. S2 has capacity of
2 elements. S1 already has 4 elements: 100, 200, 300, and 400, whereas S2 is
empty, as shown below.
400 (Top)
300
200 Stack S2
100
Stack S1
Only the following three operations are available:
PushToS2: Pop the top element from S1 and push it on S2.
PushToS1: Pop the top element from S2 and push it on S1.
GenerateOutput: Pop the top element from S1 and output it to the
user.
Note that the pop operation is not allowed on an empty stack and the push operation
is not allowed on a full stack.
Which of the following output sequences can be generated by using the above
operations?
Page 33 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.49 Which of the following is/are EQUAL to 224 in radix-5 (i.e., base-5) notation?
(A) 64 in radix-10
(C) 50 in radix-16
Page 34 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.50 Consider 4-variable functions f1, f2, f3, f4 expressed in sum-of-minterms form as
given below.
f1 = ∑(0,2,3,5,7,8,11,13)
f2 = ∑(1,3,5,7,11,13, 15)
f3 = ∑(0,1,4,11)
f4 = ∑(0,2,6,13)
With respect to the circuit given above, which of the following options is/are
CORRECT?
(A) 𝒀 = ∑(0,1,2,11,13)
(C) 𝒀 = ∑(0,1,2,3,4,5,6,7)
(D) 𝒀 = Π(8,9,10,11,12,13,14,15)
Page 35 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.51 Let 𝐺 be an undirected connected graph in which every edge has a positive integer
weight. Suppose that every spanning tree in 𝐺 has even weight. Which of the
following statements is/are TRUE for every such graph 𝐺 ?
(B) All edges in 𝐺 have even weight OR all edges in 𝐺 have odd weight
In each cycle 𝐶 in 𝐺, either all edges in 𝐶 have even weight OR all edges in 𝐶
(D)
have odd weight
𝑆 → 𝑎𝑆, 𝑆 → 𝑎𝑆𝑏𝑆, 𝑆 → 𝑐
Page 36 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.53 Consider a disk with the following specifications: rotation speed of 6000 RPM,
average seek time of 5 milliseconds, 500 sectors/track, 512-byte sectors.
A file has content stored in 3000 sectors located randomly on the disk. Assuming
average rotational latency, the total time (in seconds, rounded off to 2 decimal
places) to read the entire file from the disk is _________
Q.54 Consider a TCP connection operating at a point of time with the congestion window
of size 12 MSS (Maximum Segment Size), when a timeout occurs due to packet
loss. Assuming that all the segments transmitted in the next two RTTs (Round Trip
Time) are acknowledged correctly, the congestion window size (in MSS) during the
third RTT will be _________
Q.55 Consider an Ethernet segment with a transmission speed of 108 bits/sec and a
maximum segment length of 500 meters. If the speed of propagation of the signal
in the medium is 2×108 meters/sec, then the minimum frame size (in bits) required
for collision detection is _________
For a relation 𝑅 with 4 attributes, the total number of possible useful functional
dependencies is ________
Q.57 A processor with 16 general purpose registers uses a 32-bit instruction format. The
instruction format consists of an opcode field, an addressing mode field, two register
operand fields, and a 16-bit scalar field. If 8 addressing modes are to be supported,
the maximum number of unique opcodes possible for every addressing mode
is _________
Page 37 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.59 The number of distinct minimum-weight spanning trees of the following graph
is _________
3
b c
1 2 2 1
2 2
a g d
2 2
1 1
f e
3
Q.60 The chromatic number of a graph is the minimum number of colours used in a
proper colouring of the graph. The chromatic number of the following graph
is _________
Page 38 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.61 A processor uses a 32-bit instruction format and supports byte-addressable memory
access. The ISA of the processor has 150 distinct instructions. The instructions are
equally divided into two types, namely R-type and I-type, whose formats are shown
below.
In the OPCODE, 1 bit is used to distinguish between I-type and R-type instructions
and the remaining bits indicate the operation. The processor has 50 architectural
registers, and all register fields in the instructions are of equal size.
Let 𝑋 be the number of bits used to encode the UNUSED field, 𝑌 be the number
of bits used to encode the OPCODE field, and 𝑍 be the number of bits used to
encode the immediate value/address field. The value of 𝑋 + 2𝑌 + 𝑍 is ________
Q.63 Let 𝑍𝑛 be the group of integers {0, 1, 2, … , 𝑛 − 1} with addition modulo 𝑛 as the
group operation. The number of elements in the group 𝑍2 × 𝑍3 × 𝑍4 that are their
own inverses is ________
Page 39 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)
Q.64 Consider a 32-bit system with 4 KB page size and page table entries of size 4 bytes
each. Assume 1 KB = 210 bytes. The OS uses a 2-level page table for memory
management, with the page table containing an outer page directory and an inner
page table. The OS allocates a page for the outer page directory upon process
creation. The OS uses demand paging when allocating memory for the inner page
table, i.e., a page of the inner page table is allocated only if it contains at least one
valid page table entry.
An active process in this system accesses 2000 unique pages during its execution,
and none of the pages are swapped out to disk. After it completes the page accesses,
let X denote the minimum and Y denote the maximum number of pages across the
two levels of the page table of the process.
Q.65 Consider the following augmented grammar, which is to be parsed with a SLR
parser. The set of terminals is {𝑎,𝑏,𝑐,𝑑,#,@}
𝑆′ → 𝑆
𝑆 → 𝑆𝑆|𝐴𝑎|𝑏𝐴𝑐|𝐵𝑐|𝑏𝐵𝑎
𝐴 → 𝑑#
𝐵→@
Let 𝐼0 = 𝐶𝐿𝑂𝑆𝑈𝑅𝐸({𝑆 ′ →• 𝑆}). The number of items in the set 𝐺𝑂𝑇𝑂(𝐼0 , 𝑆)
is ___________
Page 40 of 40
Organizing Institute: IISc, Bengaluru