0% found this document useful (0 votes)
168 views117 pages

Gate CSE + DA 2024

Uploaded by

rahul
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)
168 views117 pages

Gate CSE + DA 2024

Uploaded by

rahul
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/ 117

Data Science and Artificial Intelligence (DA)

General Aptitude (GA)


Q.1 – Q.5 Carry ONE mark Each

Q.1 If ‘→’ denotes increasing order of intensity, then the meaning of the words

[sick → infirm → moribund] is analogous to [silly → _______ → daft].

Which one of the given options is appropriate to fill the blank?

(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

Q.4 The sum of the following infinite series is

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.

Share of valid votes

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 – Q.10 Carry TWO marks Each

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.

Based on the given passage, which of the following can be inferred?

(A) All human beings can digest dairy milk.

(B) No human being can digest dairy milk.

(C) Digestion of dairy milk is essential for human beings.

(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.

Mutual fund A Mutual fund B Mutual fund C

Person 1 ₹10,000 ₹20,000 ₹20,000

Person 2 ₹20,000 ₹15,000 ₹15,000

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.

The piece of paper that can be folded to make this dice is

(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)

Q.11 – Q.35 Carry ONE mark Each

Q.11 Consider the following statements:

(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.

Which ONE of the following options is correct?

(A) Both (i) and (ii) are true

(B) (i) is true and (ii) is false

(C) (ii) is true and (i) is false

(D) Both (i) and (ii) are false

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.

What is the probability of the event 𝑇 ∩ 𝑆 ?

(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?

(A) The eigenvalues of 𝑴 are non-negative and real.

(B) The eigenvalues of 𝑴 are complex conjugate pairs.

(C) One eigenvalue of 𝑴 is positive and real, and another eigenvalue of 𝑴 is zero.

(D) One eigenvalue of 𝑴 is non-negative and real, and another eigenvalue of 𝑴 is


negative and real.

Q.14 Consider performing depth-first search (DFS) on an undirected and unweighted


graph G starting at vertex 𝑠. For any vertex 𝑢 in G, 𝑑[𝑢] is the length of the shortest
path from 𝑠 to 𝑢. Let (𝑢, 𝑣) be an edge in G such that 𝑑 [𝑢] < 𝑑[𝑣]. If the edge
(𝑢, 𝑣) is explored first in the direction from 𝑢 to 𝑣 during the above DFS, then (𝑢, 𝑣)
becomes a ______ edge.

(A) tree

(B) cross

(C) back

(D) gray

Page 10 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)

Q.15 For any twice differentiable function 𝑓: ℝ → ℝ, if at some 𝑥 ∗ ∈ ℝ, 𝑓 ′ (𝑥 ∗ ) = 0


and 𝑓 ′′ (𝑥 ∗ ) > 0, then the function 𝑓 necessarily has a ______ at 𝑥 = 𝑥 ∗.

Note: ℝ denotes the set of real numbers.

(A) local minimum

(B) global minimum

(C) local maximum

(D) global maximum

Q.16 Match the items in Column 1 with the items in Column 2 in the following table:

Column 1 Column 2

(p) First In First Out (i) Stacks


(q) Lookup Operation (ii) Queues
(r) Last In First Out (iii) Hash Tables

(A) (p) − (ii), (q) − (iii), (r) − (i)

(B) (p) − (ii), (q) − (i), (r) − (iii)

(C) (p) − (i), (q) − (ii), (r) − (iii)

(D) (p) − (i), (q) − (iii), (r) − (ii)

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.

Which ONE of the following sets is a possible set of support vectors?

(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

(A) (p) − (iii), (q) − (i), (r) − (ii)

(B) (p) − (ii), (q) − (i), (r) − (iii)

(C) (p) − (ii), (q) − (iii), (r) − (i)

(D) (p) − (iii), (q) − (ii), (r) − (i)

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

𝑢𝑇 𝑆𝐵 𝑢
𝐽(𝑢) =
𝑢𝑇 𝑆𝑊 𝑢

If 𝜆 = 𝐽(𝑢 ∗ ), 𝑆𝑊 is non-singular and 𝑆𝐵 ≠ 0, then (𝑢 ∗ , 𝜆) must satisfy which ONE


of the following equations?

Note: ℝ denotes the set of real numbers.

−1
(A) 𝑆𝑊 𝑆𝐵 𝑢 ∗ = 𝜆𝑢 ∗

(B) 𝑆𝑊 𝑢∗ = 𝜆𝑆𝐵 𝑢 ∗

(C) 𝑆𝐵 𝑆𝑊 𝑢 ∗ = 𝜆𝑢 ∗

(D) 𝑢 ∗ 𝑇 𝑢∗ = 𝜆2

Page 14 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)

Q.23 Let ℎ1 and ℎ2 be two admissible heuristics used in 𝐴∗ search.

Which ONE of the following expressions is always an admissible heuristic?

(A) ℎ1 + ℎ 2

(B) ℎ1 × ℎ2

(C) ℎ1 /ℎ2 , (ℎ2 ≠ 0)

(D) |ℎ1 − ℎ2 |

Q.24 Consider five random variables 𝑈, 𝑉, 𝑊, 𝑋, and 𝑌 whose joint distribution


satisfies:

𝑃 (𝑈, 𝑉, 𝑊, 𝑋, 𝑌) = 𝑃(𝑈)𝑃(𝑉)𝑃(𝑊|𝑈, 𝑉)𝑃(𝑋|𝑊)𝑃(𝑌|𝑊)

Which ONE of the following statements is FALSE?

(A) 𝑌 is conditionally independent of 𝑉 given 𝑊

(B) 𝑋 is conditionally independent of 𝑈 given 𝑊

(C) 𝑈 and 𝑉 are conditionally independent given 𝑊

(D) 𝑌 and 𝑋 are conditionally independent given 𝑊

Page 15 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)

Q.25 Consider the following statement:

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?

(A) (m) = highest, (n) = highest

(B) (m) = lowest, (n) = highest

(C) (m) = highest, (n) = lowest

(D) (m) = lowest, (n) = lowest

Q.26 Consider a database that includes the following relations:

Defender(name, rating, side, goals)

Forward(name, rating, assists, goals)

Team(name, club, price)

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?

(A) Π𝑛𝑎𝑚𝑒 (Team) ∖ (Π𝑛𝑎𝑚𝑒 (Defender ) ∩ Π𝑛𝑎𝑚𝑒 (Forward)) = 𝜙

(B) (Π𝑛𝑎𝑚𝑒 (Defender) ∩ Π𝑛𝑎𝑚𝑒 (Forward)) ∖ Π𝑛𝑎𝑚𝑒 (Team) = 𝜙

(C) Π𝑛𝑎𝑚𝑒 (Team) ∖ (Π𝑛𝑎𝑚𝑒 (Defender ) ∪ Π𝑛𝑎𝑚𝑒 (Forward)) = 𝜙

(D) (Π𝑛𝑎𝑚𝑒 (Defender ) ∪ Π𝑛𝑎𝑚𝑒 (Forward)) ∖ Π𝑛𝑎𝑚𝑒 (Team) = 𝜙

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

Q.28 Consider the following tree traversals on a full binary tree:

(i) Preorder
(ii) Inorder
(iii) Postorder

Which of the following traversal options is/are sufficient to uniquely reconstruct


the full binary tree?

(A) (i) and (ii)

(B) (ii) and (iii)

(C) (i) and (iii)

(D) (ii) only

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) (𝑥 ∧ ¬𝑦 ) ⟹ (¬𝑥 ⟹ 𝑦)

(C) (¬𝑥 ∧ 𝑦 ) ⟹ (¬𝑥 ⟹ 𝑦)

(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

The minimum number of swaps performed during this Quicksort is ______.

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

The SQL query described below is executed on this database:

SELECT *
FROM Raider, Team
WHERE Raider.ID=Team.ID AND City=“Jaipur” AND
RaidPoints > 200;

The number of rows returned by this query is ______.

Page 19 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)

Q.32 The fundamental operations in a double-ended queue D are:

insertFirst(e) – Insert a new element e at the beginning of D.


insertLast(e) – Insert a new element e at the end of D.
removeFirst() – Remove and return the first element of D.
removeLast() – Remove and return the last element of D.

In an empty double-ended queue, the following operations are performed:

insertFirst(10)

insertLast(32)

a ←removeFirst()

insertLast(28)

insertLast(17)

a ←removeFirst()

a ← removeLast()

The value of a is ______.

Q.33 1
Let 𝑓: ℝ → ℝ be the function 𝑓(𝑥 ) = .
1+𝑒 −𝑥

The value of the derivative of 𝑓 at 𝑥 where 𝑓(𝑥 ) = 0.4 is ______


(rounded off to two decimal places).

Note: ℝ denotes the set of real numbers.

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

The determinant of (𝑴𝟐 + 12𝑴) is ______.

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)

Q.37 Let 𝑓: ℝ → ℝ be a function. Note: ℝ denotes the set of real numbers.

−𝑥, 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)

Q.38 Consider the following Python code:

def count(child_dict, i):


if i not in child_dict.keys():
return 1
ans = 1
for j in child_dict[i]:
ans += count(child_dict, j)
return ans

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))

Which ONE of the following is the output of this code?

(A) 6

(B) 1

(C) 8

(D) 9

Page 23 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)

Q.39 Consider the function computeS(X) whose pseudocode is given below:

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.

Which ONE of the following options is TRUE?

(A) 𝐹(𝑛) = 𝐹(⌊𝑛/2⌋) + 1

(B) 𝐹(𝑛) = 𝐹(⌊𝑛/2⌋) + 𝐹(⌈𝑛/2⌉)

(C) 𝐹(𝑛) = 𝐹(⌊𝑛/2⌋)

(D) 𝐹(𝑛) = 𝐹(𝑛 − 1) + 1

Q.41 Consider the following Python function:

def fun(D, s1, s2):


if s1 < s2:
D[s1], D[s2] = D[s2], D[s1]
fun(D, s1+1, s2-1)

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

(A) 𝑝 = 36, 𝑞 = 24, 𝑟 = 24

(B) 𝑝 = 24, 𝑞 = 24, 𝑟 = 36

(C) 𝑝 = 18, 𝑞 = 36, 𝑟 = 24

(D) 𝑝 = 36, 𝑞 = 36, 𝑟 = 36

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?

(A) BFS expands more states than DFS.

(B) DFS expands more states than BFS.

(C) Both BFS and DFS expand equal number of states.

(D) Both BFS and DFS do not reach the goal state number 6.

Q.45 Consider the following sorting algorithms:

(i) Bubble sort


(ii) Insertion sort
(iii) Selection sort

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?

(A) (i) only

(B) (iii) only

(C) (i) and (iii) only

(D) (ii) and (iii) only

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)

Q.47 Select all choices that are subspaces of ℝ3 .

Note: ℝ denotes the set of real numbers.

(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)

Q.48 Which of the following statements is/are TRUE?

Note: ℝ denotes the set of real numbers.

(A) There exist 𝑴 ∈ ℝ3× 3 , 𝒑 ∈ ℝ3 , and 𝒒 ∈ ℝ3 such that 𝑴𝐱 = 𝒑 has a unique


solution and M𝐱 = 𝒒 has infinite solutions.

(B) There exist 𝑴 ∈ ℝ3× 3 , 𝒑 ∈ ℝ3 , and 𝒒 ∈ ℝ3 such that 𝑴𝐱 = 𝒑 has no solutions


and M𝐱 = 𝒒 has infinite solutions.

(C) There exist 𝑴 ∈ ℝ2× 3 , 𝒑 ∈ ℝ2 , and 𝒒 ∈ ℝ2 such that 𝑴𝐱 = 𝒑 has a unique


solution and M𝐱 = 𝒒 has infinite solutions.

(D) There exist 𝑴 ∈ ℝ3× 2 , 𝒑 ∈ ℝ3 , and 𝒒 ∈ ℝ3 such that 𝑴𝐱 = 𝒑 has a unique


solution and M𝐱 = 𝒒 has no solutions.

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 𝑈.

Which of the following statements is/are TRUE?

(A)
If 𝑈 is a 1-dimensional subspace of ℝ3 , then the null space of 𝑴 is a
1-dimensional subspace.

(B) If 𝑈 is a 2-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?

(A) 𝑥 = 0 is a local maximum of f

(B) 𝑥 = 3 is a local minimum of f

(C) 𝑥 = −1 is a local maximum of f

(D) 𝑥 = 0 is a local minimum of f

Page 32 of 41
Organizing Institute: IISc Bengaluru
Data Science and Artificial Intelligence (DA)

Q.51 Consider the directed acyclic graph (DAG) below:

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.

Which of the following statements is/are always TRUE?

(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)

Q.53 Consider the following figures representing datasets consisting of


two-dimensional features with two classes denoted by circles and squares.

(i) (ii)

(iii) (iv)

Which of the following is/are TRUE?

(A) (i) is linearly separable.

(B) (ii) is linearly separable.

(C) (iii) is linearly separable.

(D) (iv) is linearly separable.

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.

Consider the following logical sentences:

s1: ∀ball ¬ game(ball, rugby) ⟹shape(ball, round)

s2: ∀ball ¬ shape(ball, round) ⟹game(ball, rugby)

s3: ∀ball game(ball, rugby) ⟹ ¬ shape(ball, round)

s4: ∀ball shape(ball, round) ⟹ ¬ game(ball, rugby)

Which of the following choices is/are logical representations of the assertion,


“All balls are round except balls used in rugby”?

(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)

Q.55 An OTT company is maintaining a large disk-based relational database of differe nt


movies with the following schema:

Movie(ID, CustomerRating)
Genre(ID, Name)
Movie_Genre(MovieID, GenreID)

Consider the following SQL query on the relation database above:

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?

A B + tree on all the attributes.

B Hash index on Genre.Name and B + tree on the remaining attributes.

C Hash index on Movie.CustomerRating and B + tree on the remaining


attributes.

D Hash index on all the attributes.

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:

𝑃(𝑇̅ ) = 0.6, 𝑃(𝑆|𝑇 ) = 0.3, 𝑃(𝑆 |𝑇̅ ) = 0.6

Then, 𝑃(𝑇 |𝑆 ) is ______ (rounded off to two decimal places).

Q.59 Consider a joint probability density function of two random variables X and Y

2𝑥𝑦, 0 < 𝑥 < 2, 0<𝑦<𝑥


𝑓𝑋,𝑌 (𝑥, 𝑦) = {
0, otherwise

Then, 𝐸[𝑌|𝑋 = 1.5] is ______.

Q.60 Evaluate the following limit:

ln((𝑥2 +1) cos 𝑥)


lim = ______.
𝑥→0 𝑥2

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]

𝑴= 𝒖𝒖𝑻 (where 𝒖𝑻 is the transpose of 𝒖). The value of ∑5𝑖=1 𝜎𝑖 is ______.

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.

To develop such a model, the computed InformationGain(C, Pitch) with respect to


the Target is ______ (rounded off to two decimal places).

Table C

Match Pitch Format Winner (Target)


Number
1 𝑆 𝑇 Green
2 𝑆 𝑇 Blue
3 𝐹 𝑂 Blue
4 𝑆 𝑂 Blue
5 𝐹 𝑇 Green
6 𝐹 𝑂 Blue
7 𝑆 𝑂 Green
8 𝐹 𝑇 Blue
9 𝐹 𝑂 Blue
10 𝑆 𝑂 Green

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

The value of 𝑃(𝑈 = 1, 𝑉 = 1, 𝑊 = 1, 𝑍 = 1) = ______ (rounded off to three


decimal places).

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)

General Aptitude (GA)


Q.1 – Q.5 Carry ONE mark Each

Q.1 If ‘→’ denotes increasing order of intensity, then the meaning of the words

[dry → arid → parched] is analogous to [diet → fast → ________ ].

Which one of the given options is appropriate to fill the blank?

(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 𝑥𝑦

(B) depends only on 𝑥 and not on 𝑦

(C) depends only on 𝑦 and not on 𝑥

(D) is a constant

Page 1 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.3 Consider the following sample of numbers:

9, 18, 11, 14, 15, 17, 10, 69, 11, 13

The median of the sample is

(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)

Q.5 For positive non-zero real variables 𝑝 and 𝑞, if

log (𝑝2 + 𝑞 2 ) = log 𝑝 + log 𝑞 + 2 log 3 ,

𝑝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 – Q.10 Carry TWO marks Each

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.

(A) (i) down (ii) down (iii) on (iv) for

(B) (i) on (ii) down (iii) for (iv) on

(C) (i) down (ii) out (iii) for (iv) on

(D) (i) on (ii) out (iii) on (iv) for

Page 4 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.7 A rectangular paper sheet of dimensions 54 cm × 4 cm is taken. The two longer


edges of the sheet are joined together to create a cylindrical tube. A cube whose
surface area is equal to the area of the sheet is also taken.

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.

Macronutrient energy contribution

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.

Macronutrient Energy density (kcal/g)


Carbohydrates 4
Proteins 4
Unsaturated fat 9
Saturated fat 9
Trans fat 9

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)

Q.11 – Q.35 Carry ONE mark Each

Q.11 Let 𝑓: ℝ → ℝ be a function such that 𝑓(𝑥) = max{𝑥, 𝑥 3 }, 𝑥 ∈ ℝ , where ℝ is the


set of all real numbers. The set of all points where 𝑓(𝑥) is
NOT differentiable is

(A) {−1, 1, 2}

(B) {−2, −1, 1}

(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?

(A) The events 𝑋 and 𝑌 are mutually exclusive

(B) The events 𝑋 and 𝑌 are independent

(C) Either event 𝑋 or 𝑌 must occur

(D) Event 𝑋 is more likely than event 𝑌

Page 9 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.15 Which one of the following statements is FALSE?

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.

(i) HTTP GET request for the index page


(ii) DNS request to resolve the web server’s name to its IP address
(iii) HTTP GET request for an image object
(iv) TCP SYN to open a connection to the web server

Which one of the following is the CORRECT chronological order (earliest in time
to latest) of the packets leaving the computer ?

(A) (iv), (ii), (iii), (i)

(B) (ii), (iv), (iii), (i)

(C) (ii), (iv), (i), (iii)

(D) (iv), (ii), (i), (iii)

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

(A) both Ο(𝑁) and Ω(𝑁)

(B) Ο(𝑁) but not Ω(𝑁)

(C) Ω(𝑁) but not Ο(𝑁)

(D) neither Ο(𝑁) nor Ω(𝑁)

Page 11 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.18 Consider the following C program:

#include <stdio.h>

int main(){

int a = 6;

int b = 0;

while(a < 10) {

a = a / 12 + 1;

a += b;}

printf(”%d”, a);

return 0;}

Which one of the following statements is CORRECT?

(A) The program prints 9 as output

(B) The program prints 10 as output

(C) The program gets stuck in an infinite loop

(D) The program prints 6 as output

Page 12 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.19 Consider the following C program:

#include <stdio.h> void fX(){

void fX(); char a;

int main(){ if((a=getchar()) != ’\n’)

fX(); fX();

return 0;} if(a != ’\n’)

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?

(A) The program will not terminate

(B) The program will terminate with no output

(C) The program will terminate with 4321 as output

(D) The program will terminate with 1234 as output

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?

(A) Only the root node

(B) All leaf nodes

(C) All internal nodes

(D) Only the leftmost leaf node

Q.22 Which of the following statements about a relation R in first normal form (1NF)
is/are TRUE ?

(A) R can have a multi-attribute key

(B) R cannot have a foreign key

(C) R cannot have a composite attribute

(D) R cannot have more than one candidate key

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?

(A) 𝐿1 = 𝐿2 if and only if 𝐿1 ∩ ̅̅̅


𝐿2 = 𝜙

(B) 𝐿1 ∪ 𝐿3 is not regular

(C) ̅̅̅
𝐿3 is not regular

(D) ̅̅̅
𝐿1 ∪ ̅̅̅
𝐿2 is regular

Q.24 Which of the following statements about threads is/are TRUE?

(A) Threads can only be implemented in kernel space

(B) Each thread has its own file descriptor table for open files

(C) All the threads belonging to a process share a common stack

(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?

(A) Running to Ready

(B) Waiting to Running

(C) Ready to Waiting

(D) Running to Terminated

Q.26 Which of the following is/are Bottom-Up Parser(s)?

(A) Shift-reduce Parser

(B) Predictive Parser

(C) LL(1) Parser

(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?

(A) The two events 𝐴 and 𝐵 are independent

(B) 𝑃(𝐴 ∪ 𝐵) = 0.7

(C) 𝑃(𝐴 ∩ 𝐵 𝑐 ) = 0.2, where 𝐵 𝑐 is the complement of the event 𝐵

𝑃(𝐴𝑐 ∩ 𝐵 𝑐 ) = 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?

(A) With no propagation delays, the output 𝒀 is always logic Zero

(B) With no propagation delays, the output 𝒀 is always logic One

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?

(A) The sequence number 𝑁𝑃 is chosen randomly by P

(B) The sequence number 𝑁𝑃 is always 0 for a new connection

(C) The acknowledgement number 𝑁𝑄 is equal to 𝑁𝑃

(D) The acknowledgement number 𝑁𝑄 is equal to 𝑁𝑃 + 1

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 a pipelined execution, forwarding means the result from a source stage of an


(A)
earlier instruction is passed on to the destination stage of a later instruction

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

(C) Forwarding cannot prevent all pipeline stalls

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

(C) Header Checksum

(D) Total Length

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.

Operator Precedence Associativity


+ Highest Left
− High Right
∗ Medium Right
/ Low Right

The value of the expression 3 + 1 + 5 ∗ 2 / 7 + 2 − 4 − 7 − 6 / 2 as per the


above rules is __________

Page 20 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.34 The number of spanning trees in a complete graph of 4 vertices labelled A, B, C,


and D is _________

Q.35 Consider the following two relations, R(A,B) and S(A,C):

𝑹 𝑺
𝑨 𝑩 𝑨 𝑪
10 20 10 90
20 30 30 45
30 40 40 80
30 50
50 95

The total number of tuples obtained by evaluating the following expression

𝝈𝑩<𝑪 (𝑹 ⋈𝑹.𝑨=𝑺.𝑨 𝑺)
is _________

Page 21 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.36 – Q.65 Carry TWO marks Each

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.

Assume P starts transmitting the chunks at time 𝑡 = 0.


Which one of the following options gives the time (in seconds, rounded off to 3
decimal places) at which R receives all the chunks of the file?

(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)

Q.37 Consider the following syntax-directed definition (SDD).

𝑆 → 𝐷𝐻𝑇𝑈 { 𝑆. 𝑣𝑎𝑙 = 𝐷. 𝑣𝑎𝑙 + 𝐻. 𝑣𝑎𝑙 + 𝑇. 𝑣𝑎𝑙 + 𝑈. 𝑣𝑎𝑙; }

𝐷 → "M"𝐷1 { 𝐷. 𝑣𝑎𝑙 = 5 + 𝐷1 . 𝑣𝑎𝑙; }

𝐷→𝜖 { 𝐷. 𝑣𝑎𝑙 = −5; }

𝐻 → "L"𝐻1 { 𝐻. 𝑣𝑎𝑙 = 5 ∗ 10 + 𝐻1 . 𝑣𝑎𝑙; }

𝐻→𝜖 { 𝐻. 𝑣𝑎𝑙 = −10; }

𝑇 → "C"𝑇1 { 𝑇. 𝑣𝑎𝑙 = 5 ∗ 100 + 𝑇1 . 𝑣𝑎𝑙; }

𝑇→𝜖 { 𝑇. 𝑣𝑎𝑙 = −5; }

𝑈 → "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.

FIRST(𝑆) = {𝑐, 𝑑, 𝑓}, FIRST(𝑇) = {𝑎, 𝑏, 𝜖}, FIRST(𝑅) = {𝑐, 𝜖}

FOLLOW(𝑆) = FOLLOW(𝑇) = {𝑐, 𝑓, $}, FOLLOW(𝑅) = {𝑓}

Which one of the following options CORRECTLY fills in the incomplete


productions?

(A) (1) 𝑆 → 𝑅𝑓 (2) 𝑇 → 𝜖 (3) 𝑅 → 𝑐𝑇𝑅

(B) (1) 𝑆 → 𝑓𝑅 (2) 𝑇 → 𝜖 (3) 𝑅 → 𝑐𝑇𝑅

(C) (1) 𝑆 → 𝑓𝑅 (2) 𝑇 → 𝑐𝑇 (3) 𝑅 → 𝑐𝑅

(D) (1) 𝑆 → 𝑅𝑓 (2) 𝑇 → 𝑐𝑇 (3) 𝑅 → 𝑐𝑅

Page 24 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.39 Consider the following pseudo-code.

𝐿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?

(A) (a = 4, b = 4); (a = 3, b = 3); (a = 4, b = 3)

(B) (a = 3, b = 4); (a = 4, b = 3); (a = 3, b = 3)

(C) (a = 4, b = 4); (a = 4, b = 3); (a = 3, b = 4)

(D) (a = 2, b = 2); (a = 2, b = 3); (a = 3, b = 4)

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?

(A) 82, 90, 101

(B) 82, 11, 93

(C) 131, 11, 93

(D) 131, 111, 90

Page 26 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.42 Consider the following recurrence relation:

𝑇(𝑛) = {√𝑛𝑇(√𝑛) + 𝑛 for 𝑛 ≥ 1,


1 for 𝑛 = 1.
Which one of the following options is CORRECT?

(A) 𝑇(𝑛) = Θ(𝑛 log log 𝑛)

(B) 𝑇(𝑛) = Θ(𝑛 log 𝑛)

(C) 𝑇(𝑛) = Θ(𝑛2 log 𝑛)

(D) 𝑇(𝑛) = Θ(𝑛2 log log 𝑛)

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.44 The symbol → indicates functional dependency in the context of a relational


database. Which of the following options is/are TRUE?

(A) (𝑋, 𝑌) → (𝑍, 𝑊) implies 𝑋 → (𝑍, 𝑊)

(B) (𝑋, 𝑌) → (𝑍, 𝑊) implies (𝑋, 𝑌) → 𝑍

(C) ((𝑋, 𝑌) → 𝑍 and 𝑊 → 𝑌) implies (𝑋, 𝑊) → 𝑍

(D) (𝑋 → 𝑌 and 𝑌 → 𝑍) implies 𝑋 → 𝑍

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 𝑇 ?

(A) There are no back-edges in 𝐺 with respect to the tree 𝑇

(B) There are no cross-edges in 𝐺 with respect to the tree 𝑇

(C) There are no forward-edges in 𝐺 with respect to the tree 𝑇

(D) The only edges in 𝐺 are the edges in 𝑇

Page 28 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.46 Consider the following read-write schedule 𝑆 over three transactions


𝑇1 , 𝑇2 , and 𝑇3 , where the subscripts in the schedule indicate transaction IDs:

𝑆: 𝑟1 (𝑧); 𝑤1 (𝑧); 𝑟2 (𝑥); 𝑟3 (𝑦); 𝑤3 (𝑦); 𝑟2 (𝑦); 𝑤2 (𝑥); 𝑤2 (𝑦);

Which of the following transaction schedules is/are conflict equivalent to 𝑆 ?

(A) 𝑇1 𝑇2 𝑇3

(B) 𝑇1 𝑇3 𝑇2

(C) 𝑇3 𝑇2 𝑇1

(D) 𝑇3 𝑇1 𝑇2

Q.47 Consider a Boolean expression given by 𝐹(𝑋, 𝑌, 𝑍) = ∑(3,5,6,7).

Which of the following statements is/are CORRECT?

(A) 𝐹(𝑋, 𝑌, 𝑍) = Π(0,1,2,4)

(B) 𝐹(𝑋, 𝑌, 𝑍) = 𝑋𝑌 + 𝑌𝑍 + 𝑋𝑍

(C) 𝐹(𝑋, 𝑌, 𝑍) is independent of input 𝑌

(D) 𝐹(𝑋, 𝑌, 𝑍) is independent of input 𝑋

Page 29 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 1 (CS1)

Q.48 Consider the following C function definition.

int f(int x, int y) {


for (int i=0; i<y; i++) {
x=x+x+y;
}
return x;
}
Which of the following statements is/are TRUE about the above function?

(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 ?

(A) There exist at least 𝑚 − 𝑛 linearly independent solutions to this system

There exist 𝑚 − 𝑛 linearly independent vectors such that every solution is a linear
(B)
combination of these vectors

(C) There exists a non-zero solution in which at least 𝑚 − 𝑛 variables are 0

(D) There exists a solution in which at least 𝑛 variables are non-zero

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 𝑤 .

Which of the following statements is/are FALSE?

(A) States 2 and 4 are distinguishable in 𝑀

(B) States 3 and 4 are distinguishable in 𝑀

(C) States 2 and 5 are distinguishable in 𝑀

(D) Any string 𝑤 with 𝑛0 (𝑤) = 𝑛1 (𝑤) is 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?

(A) 𝐺 contains a complete subgraph with 𝑘 vertices

(B) 𝐺 contains an independent set of size at least 𝑛/𝑘

(C) 𝐺 contains at least 𝑘(𝑘 − 1)/2 edges

(D) 𝐺 contains a vertex of degree at least 𝑘

Q.52 Consider the operators ◊ and □ defined by 𝑎 ◊ 𝑏 = 𝑎 + 2𝑏, 𝑎□𝑏 = 𝑎𝑏, for positive
integers. Which of the following statements is/are TRUE?

(A) Operator ◊ obeys the associative law

(B) Operator □ obeys the associative law

(C) Operator ◊ over the operator □ obeys the distributive law

(D) Operator □ over the operator ◊ obeys the distributive law

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) A read miss in WBC never evicts a dirty block

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--;
}

The total number of times the printf statement is executed is _______

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.

Prefix Next hop router


10.1.1.0/24 R1
10.1.1.128/25 R2
10.1.1.64/26 R3
10.1.1.192/26 R4

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 _______

Q.59 Let 𝐺 = (𝑉, Σ, 𝑆, 𝑃) be a context-free grammar in Chomsky Normal Form with


Σ = {𝑎, 𝑏, 𝑐} and 𝑉 containing 10 variable symbols including the start
symbol 𝑆. The string 𝑤 = 𝑎30 𝑏 30 𝑐 30 is derivable from 𝑆. The number of steps
(application of rules) in the derivation 𝑆 →∗ 𝑤 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 _________

Q.65 Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP


header) from a sender to a receiver over a path of two links with a router between
them. The first link (sender to router) has an MTU (Maximum Transmission Unit)
size of 542 bytes, while the second link (router to receiver) has an MTU size of 360
bytes. The number of fragments that would be delivered at the receiver is ________

Page 36 of 36
Organizing Institute: IISc Bengaluru
Computer Science and Information Technology Set 2 (CS2)

General Aptitude (GA)


Q.1 – Q.5 Carry ONE mark Each

Q.1 If ‘→’ denotes increasing order of intensity, then the meaning of the words

[walk → jog → sprint] is analogous to [bothered → ________ → daunted].

Which one of the given options is appropriate to fill the blank?

(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.

The number of students who like their core branches is

(A) 1,800

(B) 3,500

(C) 1,600

(D) 1,500

Q.4 For positive non-zero real variables 𝑥 and 𝑦, if


𝑥+𝑦 1
ln ( ) = [ln⁡(𝑥) + ln⁡(𝑦)]
2 2
𝑥 𝑦
then, the value of + is
𝑦 𝑥

(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)

Q.5 In the sequence 6, 9, 14, x, 30, 41, a possible value of 𝑥 is

(A) 25

(B) 21

(C) 18

(D) 20

Page 3 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)

Q.6 – Q.10 Carry TWO marks Each

Q.6 Sequence the following sentences in a coherent passage.

P: This fortuitous geological event generated a colossal amount of energy and


heat that resulted in the rocks rising to an average height of 4 km across the
contact zone.

Q: Thus, the geophysicists tend to think of the Himalayas as an active geological


event rather than as a static geological feature.

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.

Year Solar Year


2007 5% 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.

The minimum number of such cuts required is

(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)

Q.11 – Q.35 Carry ONE mark Each

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

Q.12 Let 𝑝 and 𝑞⁡be the following propositions:

𝑝: Fail grade can be given.

𝑞: Student scores more than 50% marks.

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 g(int p) { printf("%d", p); return p; }


int h(int q) { printf("%d", q); return q; }

void f(int x, int y) {


g(x);
h(y);
}

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)

Q.14 The format of a single-precision floating-point number as per the


IEEE 754 standard is:

Sign Exponent Mantissa


(1bit) (8 bits) (23 bits)

Choose the largest floating-point number among the following options.

Sign Exponent Mantissa

0 0111 1111 1111 1111 1111 1111 1111 111


(A)

Sign Exponent Mantissa

0 1111 1110 1111 1111 1111 1111 1111 111


(B)

Sign Exponent Mantissa

0 1111 1111 1111 1111 1111 1111 1111 111


(C)

Sign Exponent Mantissa

(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)

Q.15 Let 𝑇(𝑛) be the recurrence relation defined as follows:

𝑇(0) = 1,
𝑇(1) = 2, and
𝑇(𝑛) = 5𝑇(𝑛 − 1) − 6𝑇(𝑛 − 2) for 𝑛 ≥ 2

Which one of the following statements is TRUE?

(A) 𝑇(𝑛) = ⁡Θ(2𝑛 )⁡

(B) 𝑇(𝑛) = ⁡Θ(𝑛2𝑛 )

(C) 𝑇(𝑛) = ⁡Θ(3𝑛 )

(D) 𝑇(𝑛) = ⁡Θ(𝑛3𝑛 )

Q.16 Let 𝑓(𝑥) be a continuous function from ℝ to ℝ such that

𝑓(𝑥) = 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

(B) 𝐺 is a perfect matching

(C) 𝐺 is a complete graph

(D) There is no such graph 𝐺

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)

Q.21 Consider the following two sets:

Set X Set Y

P. Lexical Analyzer 1. Abstract Syntax Tree

Q. Syntax Analyzer 2. Token

R. Intermediate Code Generator 3. Parse Tree

S. Code Optimizer 4. Constant Folding

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

(A) 0∗ 1(0 + 10∗ 1)∗

(B) 0∗ (10∗ 11)∗ 0∗

(C) 0∗ 1(010∗ 1)∗ 0∗

(D) 0(1 + 0∗ 10∗ 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?

(A) The destination IP address is the IP address of R

(B) The destination IP address is the IP address of Y

(C) The destination MAC address is the MAC address of S

(D) The destination MAC address is the MAC address of Y

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?

(A) Allocate a new page table for a newly created process

(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

(D) A timer interrupt is raised by the hardware

Q.26 Which of the following file organizations is/are I/O efficient for the scan operation
in DBMS?

(A) Sorted

(B) Heap

(C) Unclustered tree index

(D) Unclustered hash index

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?

(A) 2PL permits only serializable schedules

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

(D) A deadlock is possible with 2PL

Q.28 Which of the following statements about IPv4 fragmentation is/are TRUE?

The fragmentation of an IP datagram is performed only at the source of the


(A)
datagram

The fragmentation of an IP datagram is performed at any IP router which finds


(B)
that the size of the datagram to be transmitted exceeds the MTU

(C) The reassembly of fragments is performed only at the destination of the datagram

The reassembly of fragments is performed at all intermediate routers along the


(D)
path from the source to the destination

Page 19 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)

Q.29 Which of the following statements is/are FALSE?

An attribute grammar is a syntax-directed definition (SDD) in which the functions


(A)
in the semantic rules have no side effects

The attributes in a L-attributed definition cannot always be evaluated in a depth-


(B)
first order

(C) Synthesized attributes can be evaluated by a bottom-up parser as the input is parsed

All L-attributed definitions based on LR(1) grammar can be evaluated using a


(D)
bottom-up parsing strategy

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)

Q.31 An instruction format has the following structure:

Instruction Number: Opcode destination reg, source reg-1, source reg-2

Consider the following sequence of instructions to be executed in a pipelined


processor:

I1: DIV R3, R1, R2

I2: SUB R5, R3, R4

I3: ADD R3, R5, R6

I4: MUL R7, R3, R8

Which of the following statements is/are TRUE?

(A) There is a RAW dependency on R3 between I1 and I2

(B) There is a WAR dependency on R3 between I1 and I3

(C) There is a RAW dependency on R3 between I2 and I3

(D) There is a WAW dependency on R3 between I3 and I4

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?

(A) Source IP Address

(B) Protocol

(C) Time to Live (TTL)

(D) Header Checksum

Q.33 Consider the following C function definition.

int fX(char *a){

char *b = a;

while(*b)

b++;

return b - a;}

Which of the following statements is/are TRUE?

(A) The function call fX(”abcd”) will always return a value

Assuming a character array c is declared as char c[] = ”abcd” in main(),


(B)
the function call fX(c)will always return a value

(C) The code of the function will not compile

(D) Assuming a character pointer c is declared as char *c = ”abcd” in main(),


the function call fX(c)will always return a value

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

𝑃 = {(𝑥, 𝑥)⁡|⁡𝑥⁡ ∈ {1,2,3,4}} ∪ {(1,2), (3,2), (3,4)}

The number of total orders on {1,2,3,4} that contain 𝑃 is __________

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)

Q.36 – Q.65 Carry TWO marks Each

Q.36 What is the output of the following C program?

#include <stdio.h>

int main() {

double a[2]={20.0, 25.0}, *p, *q;

p = a;

q = p + 1;

printf(”%d,%d”, (int)(q – p), (int)(*q – *p));

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.

A (0, 10), B (2, 6), C (4, 3), and D (6, 7).

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?

(A) SRTF = 6, NP-SJF = 7

(B) SRTF = 6, NP-SJF = 7.5

(C) SRTF = 7, NP-SJF = 7.5

(D) SRTF = 7, NP-SJF = 8.5

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 𝑇.

Which one of the following statements is TRUE?

(A) Inorder traversal of 𝑇 can be determined from 𝑉

(B) Root node of 𝑇 can be determined from 𝑉

(C) Preorder traversal of 𝑇 can be determined from 𝑉

(D) Postorder traversal of 𝑇 can be determined from 𝑉

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 {𝑎,𝑏,𝑐,𝑑}.

𝑆 → 𝐴𝑎𝐴𝑏⁡|⁡𝐵𝑏𝐵𝑎
𝐴 → 𝑐𝑆⁡|⁡𝜖
𝐵 → 𝑑𝑆⁡|⁡𝜖

The following is a partially-filled LL(1) parsing table.

𝑎 𝑏 𝑐 𝑑 $

𝑆 𝑆 → 𝐴𝑎𝐴𝑏 𝑆 → 𝐵𝑏𝐵𝑎 (1) (2)

𝐴 𝐴→𝜖 (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.

(A) (1) 𝑆 → 𝐴𝑎𝐴𝑏 (2) 𝑆 → 𝐵𝑏𝐵𝑎 (3) 𝐴 → 𝜖 (4) 𝐵 → 𝜖

(B) (1) 𝑆 → 𝐵𝑏𝐵𝑎 (2) 𝑆 → 𝐴𝑎𝐴𝑏 (3) 𝐴 → 𝜖 (4) 𝐵 → 𝜖

(C) (1) 𝑆 → 𝐴𝑎𝐴𝑏 (2) 𝑆 → 𝐵𝑏𝐵𝑎 (3) blank (4) blank

(D) (1) 𝑆 → 𝐵𝑏𝐵𝑎 (2) 𝑆 → 𝐴𝑎𝐴𝑏 (3) blank (4) blank

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 𝑀 ?

(A) ⁡(00)∗ ⁡ + ⁡1(11)∗

(B) ⁡0∗ + (1 + 0(00)∗ )(11)∗ ⁡

(C) ⁡(00)∗ + (1 + (00)∗ )(11)∗ ⁡

(D) ⁡0+ + 1(11)∗ + 0(11)∗ ⁡

Page 28 of 40
Organizing Institute: IISc, Bengaluru
Computer Science and Information Technology Set 2 (CS2)

Consider an array X that contains n positive integers. A subarray of X is defined to


Q.42 be a sequence of array locations with consecutive indices.

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 (𝑄).

int first=0, second=0, len1=0, len2=0, maxlen=0;


for (int i=0; i < n; i++) {
if (X[i] == first) {
len2++; len1++;
} else if (X[i] == second) {
len2++;
len1 = ⁡⁡⁡⁡⁡(𝑃)⁡⁡⁡⁡⁡⁡⁡;
second = first;
} else {
len2 = ⁡⁡⁡⁡⁡(𝑄)⁡⁡⁡⁡⁡⁡;
len1 = 1; second = first;
}
if (len2 > maxlen) {
maxlen = len2;
}
first = X[i];
}

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.)

(A) (𝑃) len1+1 (𝑄) len2+1

(B) (𝑃) 1 (𝑄) len1+1

(C) (𝑃) 1 (𝑄) len2+1

(D) (𝑃) len2+1 (𝑄) len1+1

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)

(2) uminus (1)

(3)

(4) / 𝑢 𝑤

(5) + (3) (4)

(6)

(7) = (6) (5)

Which one of the following options fills in the missing entries CORRECTLY?

(A) (1) =[]⁡⁡𝑠⁡⁡𝑖 (3) * (0) (2) (6) []=⁡⁡𝑥⁡⁡𝑖

(B) (1) []=⁡⁡𝑠⁡⁡𝑖 (3) –⁡(0)⁡(2) (6) =[] ⁡𝑥⁡⁡(5)

(C) (1) =[] ⁡𝑠⁡𝑖 (3) * (0)⁡⁡(2) (6) []= ⁡𝑥⁡⁡(5)

(D) (1) []= ⁡𝑠⁡⁡𝑖 (3) –⁡(0)⁡(2) (6) =[] 𝑥⁡⁡𝑖

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?

(A) T1 runs first and prints 1, T2 runs next and prints 2

(B) T2 runs first and prints 1, T1 runs next and prints 2

(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?

(A) The determinant of 𝐵 is the negative of the determinant of 𝐴

(B) If 𝐴 is invertible, then 𝐵 is also invertible

(C) If 𝐴⁡is symmetric, then 𝐵 is also symmetric

(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?

(A) 100, 200, 400, 300

(B) 200, 300, 400, 100

(C) 400, 200, 100, 300

(D) 300, 200, 400, 100

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

(B) 100 in radix-8

(C) 50 in radix-16

(D) 121 in radix-7

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)

(B) 𝒀 = Π(3,4, 5,6,7,8,9,10,12,14,15)

(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 𝐺 ?

(A) All edges in 𝐺 have even weight

(B) All edges in 𝐺 have even weight OR all edges in 𝐺 have odd weight

(C) In each cycle 𝐶 in 𝐺, all edges in 𝐶 have even weight

In each cycle 𝐶 in 𝐺, either all edges in 𝐶 have even weight OR all edges in 𝐶
(D)
have odd weight

Q.52 Consider a context-free grammar 𝐺 with the following 3 rules.

𝑆 → 𝑎𝑆, 𝑆 → 𝑎𝑆𝑏𝑆, 𝑆 → 𝑐

Let 𝑤 ∈ ⁡𝐿(𝐺). Let 𝑛𝑎 (𝑤), 𝑛𝑏 (𝑤), 𝑛𝑐 (𝑤)⁡denote the number of times 𝑎, 𝑏, 𝑐


occur in 𝑤, respectively. Which of the following statements is/are TRUE?

(A) 𝑛𝑎 (𝑤) > 𝑛𝑏 (𝑤)⁡

(B) 𝑛𝑎 (𝑤) > 𝑛𝑐 (𝑤) − 2

(C) 𝑛𝑐 (𝑤) = 𝑛𝑏 (𝑤) + 1

(D) 𝑛𝑐 (𝑤) = 𝑛𝑏 (𝑤) ∗ 2

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 _________

Q.56 A functional dependency 𝐹:⁡𝑋 → 𝑌 is termed as a useful functional dependency if


and only if it satisfies all the following three conditions:
• 𝑋 is not the empty set.
• 𝑌 is not the empty set.
• Intersection of 𝑋 and 𝑌 is the empty set.

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.58 A non-pipelined instruction execution unit operating at 2 GHz takes an average of


6 cycles to execute an instruction of a program P. The unit is then redesigned to
operate on a 5-stage pipeline at 2 GHz. Assume that the ideal throughput of the
pipelined unit is 1 instruction per cycle. In the execution of program P,
20% instructions incur an average of 2 cycles stall due to data hazards and
20% instructions incur an average of 3 cycles stall due to control hazards. The
speedup (rounded off to one decimal place) obtained by the pipelined design over
the non-pipelined design is _________

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.

R-type Instruction Format:

OPCODE UNUSED DST Register SRC Register1 SRC Register 2

I-type Instruction Format:

OPCODE DST Register SRC Register # Immediate value/address

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 ________

Let 𝐿1 be the language represented by the regular expression 𝑏 ∗ 𝑎𝑏 ∗ (𝑎𝑏 ∗ 𝑎𝑏 ∗ )∗


Q.62
and 𝐿2 = {⁡𝑤 ∈ (𝑎 + 𝑏)∗ ⁡|⁡⁡|𝑤| ≤ 4}, where |𝑤| denotes the length of string
𝑤 . The number of strings in 𝐿2 which are also in 𝐿1 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.

The value of X+Y is ________

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

You might also like