CS_Cat_A
CS_Cat_A
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.
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
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.
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?