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

CS_Cat_A

The Computer Science Category A exam is scheduled for December 21, 2024, from 9:00 AM to 12:00 PM IST, consisting of twelve questions divided into two parts: six integer type questions and six subjective questions. Candidates must submit their answers via a specified Google form by 12:15 PM IST, adhering to strict submission guidelines and regulations to avoid disqualification. Contact details for subject and technical queries are provided, along with a series of complex mathematical and algorithmic questions for evaluation.

Uploaded by

deshveena
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)
2 views

CS_Cat_A

The Computer Science Category A exam is scheduled for December 21, 2024, from 9:00 AM to 12:00 PM IST, consisting of twelve questions divided into two parts: six integer type questions and six subjective questions. Candidates must submit their answers via a specified Google form by 12:15 PM IST, adhering to strict submission guidelines and regulations to avoid disqualification. Contact details for subject and technical queries are provided, along with a series of complex mathematical and algorithmic questions for evaluation.

Uploaded by

deshveena
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/ 7

Computer Science Category A

Exam Date : 21st December, 2024


Exam Timing : 9:00 AM - 12:00 PM IST
Rules and Regulations
Marking Scheme
1. The question paper contains twelve questions, six integer type questions (Part A), and six
subjective questions (Part B).
2. Each subjective question is worth 7 marks, and each integer type question is worth 3 marks.
3. A candidate’s submission for the Part B of the exam will be checked only if they are in the top
30 candidates for Part A.
4. Time duration is 3 hours: 9:00 AM IST - 12:00 PM IST.
Submit your answers on the google form given below by 12:15 PM IST.

Miscellaneous
1. Use the google form: https://forms.gle/aUPTiVr9BTaYPASV8, to submit your answers.
You are only allowed to submit the google form once, please check twice before submitting
2. For Part A, give answers in the form of a single integer, without any whitespaces, commas, peri-
ods, semi-colons, underscores or any other special characters. Submissions with special characters
such as these will NOT be graded (hyphens are allowed for negative integers).
3. For Part B, you can either LaTeX or handwrite your solutions neatly. For each question, you
must justify your answer with a proof. Partial marks will be awarded based on partial progress
towards the full solution.
4. Submit a PDF file (either scanned or LaTeXed) ONLY. No other form of file submission will be
accepted. Use the last 5 digits of your roll number to name your file submission for the subjective
paper. If your roll number is stems2025XXXXX, name your file CSA XXXXX
5. Make sure to keep the file size below the 10 MB limit. You can use online file compression services
in case your file size exceeds 10 MB.
6. Use a good application to scan handwritten text into PDF. Kindly make sure that the answers
are legible and the scan is clear and complete.
7. Solutions should be brief and should contain all the necessary details. Ambiguous or illegible
answers will not gain credits. If you strike something out, strike it out properly so that it is clear
to the evaluator what you want to be read. Please avoid overwriting your answers.
8. Do NOT post/share/discuss the questions appearing in the contest on any forums or discussion
groups while the contest is live. It will result in immediate disqualification of involved candidates
when caught. Also refrain from posting/sharing/discussing until we explicitly mention you can or
till 23rd of December, whichever is earlier.
9. Answers should be your own and should reflect your independent thinking process. Any form of
plagiarism or failure to comply with aforementioned regulations may lead to disqualification.

Contact details
• For subject related queries, clearly mention your category (A/B) in the mail or WhatsApp text.
• For subject related queries, contact:

1
– Official email ID: [email protected]
– Siddharth Choppara
Email: [email protected]
– Sk Md Sayeed Ikram
Email: [email protected]
– Anusha Gupta
Email:[email protected]
– Krutarth Shah
Email: [email protected]
WhatsApp: +91 90324 42266
Note: Use the personal emails only if the official email is unreachable. Use WhatsApp only if
absolutely necessary, otherwise email is preferred.
• For technical queries, contact:
– Official email ID: [email protected]
– Vedant Neema
Email: [email protected]
– Krutarth Shah
Email: [email protected]

2
Questions

Notations:
• ⌊⋅⌋ : Greatest integer function.
• N : The set of all natural numbers.
• Z≥0 : The set of all non-negative integers.

Part A
1. A natural number n is called nice if its base 4 representation has all non-zero digits and forms a
palindrome. Find the number of nice numbers less than 410 which are divisible by 3.
2. You are given 2 directed paths of length 2025 and 2027. From each vertex out of these 2 paths,
add one edge to any vertex on the other path. Find the number of such graphs which do not
contain any directed cycle.

Directed Path of length 4

3. In the following figure, each cell stores a value of 0 or 1. Each cell which is not in the bottom layer
has value 1 if between the two cells directly below it, the value in the one to the left is smaller
than the value on the right. Otherwise, the cell has value 0. Determine the expected value of
the topmost cell if each cell in the bottom layer is independently chosen to be 0 or 1 with equal
probability. Express your answer as a + b where ab is the expected value in reduced form.

4. Hilbert hotel in Siruseri has 126 rooms arranged linearly. Each room has an instruction number:
the first 63 rooms have numbers 1, 2, . . . , 63 and the last 63 rooms have numbers −63, −62, . . . , −1(as
shown below). Every morning, a cleaning robot, NeatNik, starts in an arbitrary room, jumps
according to the instruction number:
• If x > 0, it jumps x rooms to the right.
• If x < 0, it jumps ∣x∣ rooms to the left.
NeatNik cleans whichever room it visits, and keeps jumping according to the instruction numbers.
At any point of time, you have the special power to teleport the robot to a different room. To

3
ensure NeatNik cleans all rooms at least once, what is the minimum number of teleportations you
need to make?

5. Alice and Bob are playing a game starting with a pile of n coins, where n is a natural number and
they alternate turns starting with Alice. During each turn, the player whose turn it is chooses k
such that √ √
0 < k ≤ x − 1 − ⌊ x + 1⌋ (⌊ x + 1⌋ − 2)
where x is the current number of coins in the pile during the move, and removes k coins from the
pile. If a player cannot make a move (i.e. the pile is empty), they lose. Determine the number of
natural numbers n ≤ 2025090000 such that Alice can guarantee a win.
6. The functions f ∶ Z≥0 → Z≥0 and g ∶ Z≥0 × Z≥0 → Z≥0 are defined recursively as follows

f (0) = 0 and f (2n) = 4f (n), f (2n + 1) = 4f (n) + 2, ∀n ∈ N

g(4m + x, 4n + y) − x − y x+y
g(m, n) = +⌊ ⌋ ∀m, n, x, y ∈ Z≥0 , such that x, y < 4
4 4

Sequence {ai } in Z≥0 is defined as a0 = 0 and an = g(a(n−1) , f (n)), ∀n ∈ N. What is the value of
a20252025 .

4
Part B
1. Bob starts out for a journey with a natural number k ≥ 3 at the bottom left corner of an n × n
grid and faces upward. At every step, Bob can either
(a) Move one cell in the direction he is currently facing.
(b) Turn clockwise by 90○ and move one cell in this direction.
Bob also doesn’t want to visit a cell he has previously visited. Bob can end his journey at any
point. Help Bob find the number of distinct paths he can trace on the grid while turning 90○
exactly k times.
2. An alien criminal is hiding in a torus-shaped UFO with n rooms arranged in a circular layout,
numbered 1 through n as shown in the image below. You don’t know the alien’s initial room,
and you can shoot at any room. If you shoot the room where the alien is hiding, the alien dies;
otherwise, it teleports v rooms away in the clockwise direction, where v is a fixed but unknown
integer.
Devise a shooting strategy that guarantees the alien’s death in O(n log n) shots.

3. There is a hidden bijective function f from {1, 2, . . . , n} to {1, 2, . . . , n} where n is a natural


number known to you. A machine takes any 3 numbers 1 ≤ i, j, k ≤ n (not necessarily distinct) and
outputs f (i), f (j), f (k) in any arbitrary order. Your task is to determine the minimum number
of machine queries (input words) required to uniquely determine the mapping f .
4. Find all n, for which it is possible to fill an n × n matrix with entries from {1, . . . , n} such that
the following two conditions are satisfied:
• There are exactly n distinct entries in each row and column.
• No contiguous sequence of length ≥ 3 horizontally or vertically is monotonically increasing or
decreasing.
5. Alice wants to install a sprinkler system for her 2025 × 2025 garden made of 20252 square patches.
She can install sprinklers on the patches so that between any 2 patches with sprinklers, there exists
a path of adjacent patches of sprinklers from one to the other. Out of the remaining patches, only
those adjacent to a sprinkler patch or those which share a corner with a sprinkler patch will get
watered. Help Alice find the maximum number of patches she can water this way.
Note: 2 patches are adjacent if and only if they share an edge.

5
6. On a blackboard, there are n tuples of size n where the ith tuple, 1 ≤ i ≤ n, has a 1 at the ith
position and 0 everywhere else. In one operation, you can take any two tuples on the board and
write their slot wise sum on the board without erasing the original two tuples.
(a) What is the minimum number of operations so that all the n tuples which have a single 0
and (n − 1) 1’s are present on the board?
(b) In all the ways in which the above can be achieved, consider the set of tuples that are on the
board at the end of this process. What is the number of distinct sets you can obtain this
way?

END OF QUESTION PAPER

You might also like