CMI Data Science
    Previous Year Papers
    Verified Solutions Included
    CMI Data Science 2023 Question Paper with Solutions: 21 Questions, Answer Key & Section-wise Analysis

    CMI Data Science 2023 previous year paper: 21 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    21 Qs

    Total Questions

    48 Marks

    Total Marks

    1.6800000000000002 Mins

    Duration

    +3 / -1 / 0

    Marking Scheme

    Section-wise Paper Structure

    School Level Mathematics

    12 Qs

    57% of total marks

    Discrete Mathematics

    5 Qs

    24% of total marks

    Programming

    2 Qs

    10% of total marks

    Probability Theory

    2 Qs

    10% of total marks

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1
    2023 PYQ
    Level 3: Exam Standard

    Consider the following single variable, real-valued functions:

    Which of the following is/are true?

    Question 2
    2023 PYQ
    Level 3: Exam Standard

    Let be a positive integer such that

    is an integer. Which of the following is/are true?

    Question 3
    2023 PYQ
    Level 3: Exam Standard

    Let be the following function defined on integers:

    Compute

    Question 4
    2023 PYQ
    Level 3: Exam Standard
    There are 5 friends . Because of a heated argument not all of them are on speaking terms anymore. The array below describes who is talking to whom. A value of 1 indicates that the pair is on speaking terms, while a 0 indicates that they are not.
    A B C D E A B C D E - 1 1 1 1 1 - 1 0 1 1 1 - 1 0 1 0 1 - 1 1 1 0 1 1
    A gossip route is an ordered sequence of all the five friends such that every person hears the gossip from exactly one friend (with whom they are on speaking terms) and shares it with exactly one other friend (with whom they are on speaking terms). The friend who starts the gossip doesn’t hear it from anyone else and the fifth friend doesn’t pass it on to anybody.
    Answer the following questions:
    (a) Suppose starts spreading gossip along a gossip route and hears it the last. Who is the third person to hear it?
    (b) List all the gossip routes from to .
    (c) There is another dispute between the friends. As a result, is now not speaking with and . List all the gossip routes starting from .
    Question 5
    2023 PYQ
    Level 3: Exam Standard
    Solitaire Tic-Tac-Toe is a new game on the market. Instead of adding X’s and O’s to an empty grid, you start with a grid in which every position already has an X or an O. In each move, you select a row, column or diagonal and reverse all the entries along the chosen line: all X’s become O’s and all O’s become X’s.
    For instance, here is a sequence of possible moves.
    XOXOXOXOXBottomrowXOXOXOOXOSW-to-NEdiagonalXOOOOOXXOMiddlecolumnXXOOXOXOO
    Given an arrangement , we want to explore all arrangements of the grid that we can generate starting with . What is the smallest number such that each such arrangement can be reached using at most moves, starting with ?
    Question 6
    2023 PYQ
    Level 3: Exam Standard
    A perfect shuffle of a deck of cards divides the deck into two equal parts and then interleaves the cards from each half, starting with the first card of the first half.
    For instance, if we shuffle a deck of cards containing 10 cards arranged , we first create two equal decks with cards and and then interleave them to get a new deck .
    We start with the deck and keep shuffling. Which card(s) will never appear next to 5?
    Question 7
    2023 PYQ
    Level 3: Exam Standard

    Consider the following pseudocodes of two functions, where denotes the remainder when is divided by 2. The function returns the absolute value of an integer .

    function foo1(u):

    if u % 2 == 0 AND abs(u) > 0:

    u = u + foo2(u-1)

    return u

    function foo2(v):

    if v % 2 == 1 AND abs(v) > 1:

    v = v + foo1(v-1)

    return v

    Which of the following is/are true?

    Question 8
    2023 PYQ
    Level 3: Exam Standard

    Consider the pseudocode below, where denotes the remainder when is divided by 6. The notation stands for integer division, i.e., .

    function sixer(n):

    count = 0

    while n > 0:

    if n % 6 == 0:

    n = n - 1

    else:

    n = n//2

    count = count + 1

    return count

    Which of the following is true when sixer(n) is invoked with sufficiently large , say ?

    Question 9
    2023 PYQ
    Level 3: Exam Standard

    Let be events such that . Which of the following is/are true?

    Question 10
    2023 PYQ
    Level 3: Exam Standard

    Consider the set such that . Let be an element sampled uniformly at random from . Let denote mod . Which of the following statements is/are true?

    Unlock All 21 Questions in Real Examination Mode

    Practice with the authentic timer, on-screen calculator, instant percentile ranking, and section-wise analytics.

    More CMI Data Science Previous Year Papers

    Free preview ends here

    Login to view the complete paper and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    CMI Data Science 2023 Question Paper with Solutions: 21 Questions, Answer Key & Section-wise Analysis

    CMI Data Science 2023 previous year paper: 21 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    Paper breakdown

    21 questions · 48 marks · 1.6800000000000002 minutes. School Level Mathematics: 12 · Discrete Mathematics: 5 · Programming: 2 · Probability Theory: 2

    Free sample questions from CMI Data Science 2023 Question Paper

    Question 1 · School Level Mathematics · 2023 MSQ

    Consider the following single variable, real-valued functions:

    Which of the following is/are true?

    1. A.

      The function has a removable discontinuity at 1 and has it at 0.

    2. B.

      Only is continuous everywhere.

    3. C.

      As tends to also tends to .

    4. D.

      The range of is bounded.

    Correct Answer:

    ["C","D"]

    Step-by-Step Solution

    Key idea: This is a multi-statement question testing continuity, discontinuities, and limits at infinity for rational functions. We must analyze the domain, factor the expressions, and check the behavior at critical points and infinity.

    Step 1: Analyze Option A. . At , the denominator is , but the numerator is . This is a non-removable (infinite) discontinuity, not removable. False.

    Step 2: Analyze Option B. . For , . At , the original function is undefined, but the limit exists. Thus, has a removable discontinuity at and is not continuous everywhere. False.

    Step 3: Analyze Option C. As , . Since , . True.

    Step 4: Analyze Option D. For , . Since for , we have , so . Therefore, . The range of is , which is bounded. True.

    Answer: C, D

    Question 2 · School Level Mathematics · 2023 MSQ

    Let be a positive integer such that

    is an integer. Which of the following is/are true?

    1. A.

      has to be even.

    2. B.

      does not divide

    3. C.

      divides

    4. D.

      does not divide

    Correct Answer:

    ["A","C","D"]

    Step-by-Step Solution

    Key idea: This is a Diophantine condition problem where a sum of fractions must equal an integer. We use bounding arguments to find the unique value of .

    Step 1: Simplify the constant part of the sum.

    Let .

    The common denominator is .

    Step 2: Set up the equation.

    We are given that , where is an integer.

    Step 3: Bound the possible values of .

    Since is a positive integer, , so .

    Also, since , .

    Thus, .

    The only integer satisfying is .

    Step 4: Solve for .

    Step 5: Evaluate the options for .

    A: " has to be even." -> is even. (True)

    B: " does not divide ." -> , so 3 divides . The statement is False.

    C: " divides ." -> , so 7 divides . (True)

    D: " does not divide ." -> is not divisible by 5. (True)

    Answer: ["A", "C", "D"]

    Question 3 · School Level Mathematics · 2023 SUB

    Let be the following function defined on integers:

    Compute

    Correct Answer:

    none

    Step-by-Step Solution

    Insight: This is a symmetric-summation puzzle — the sum runs over a consecutive integer range and the function has the form . The endpoints and add to , which tells you to pair index with . Each pair sums to exactly .

    Exam route:

    Step 1: Define . We need .

    Step 2: Endpoints , give . Pair index with .

    Step 3: Compute .

    Step 4: Multiply numerator and denominator by : .

    Step 5: Factor from the denominator: .

    Step 6: Cancel : .

    Step 7: Add the pair: .

    Step 8: Count terms: terms, forming pairs.

    Step 9: Total .

    Verification: pair — six disjoint pairs covering all 12 indices. Each pair sums to . ✓

    Learning route:

    This is a symmetric-summation puzzle. The sum is over a consecutive integer range and the function has the form . The endpoints of the summation range add up to a specific value, which tells you how to pair the indices.

    Step 1: Identify the symmetry. The endpoints are and . Their sum is . This means we pair index with index .

    Step 2: Evaluate the pair sum. Let . We compute by multiplying top and bottom by , then factor out of the denominator. The result is .

    Step 3: Add the pair: .

    Step 4: Count the pairs. Twelve terms form six pairs, so the total is .

    Trap: A common trap is trying to evaluate each term individually, or to pair with (which does not produce a constant sum here — the correct partner is ).

    Question 4 · Discrete Mathematics · 2023 SUB
    There are 5 friends . Because of a heated argument not all of them are on speaking terms anymore. The array below describes who is talking to whom. A value of 1 indicates that the pair is on speaking terms, while a 0 indicates that they are not.
    A B C D E A B C D E - 1 1 1 1 1 - 1 0 1 1 1 - 1 0 1 0 1 - 1 1 1 0 1 1
    A gossip route is an ordered sequence of all the five friends such that every person hears the gossip from exactly one friend (with whom they are on speaking terms) and shares it with exactly one other friend (with whom they are on speaking terms). The friend who starts the gossip doesn’t hear it from anyone else and the fifth friend doesn’t pass it on to anybody.
    Answer the following questions:
    (a) Suppose starts spreading gossip along a gossip route and hears it the last. Who is the third person to hear it?
    (b) List all the gossip routes from to .
    (c) There is another dispute between the friends. As a result, is now not speaking with and . List all the gossip routes starting from .
    Correct Answer:

    none

    Step-by-Step Solution

    Insight: A "gossip route" visiting every friend exactly once is a Hamiltonian path in the undirected graph defined by the adjacency matrix.

    Exam route: Translate the matrix to a graph, identify the missing edges, and use endpoint neighbors to systematically build valid paths by casework.

    Learning route:

    Step 1: Graph Translation. The matrix is symmetric with dashes on the diagonal (no self-loops). The only off-diagonal 0s are at , , , and . Thus, the graph is a complete graph minus the edges and .

    Step 2: Part (a) – Paths from A to E. A path has the form . The 4th person () must be a neighbor of . Neighbors of are . Since is the start, must be or .

    • If : Path is . Remaining vertices for are . Sequence fails because edge is missing. Sequence gives . All edges exist. Valid.
    • If : Path is . Remaining vertices for are . Sequence fails because edge is missing. Sequence gives . All edges exist. Valid.

    In both valid paths, the third person () is .

    Step 3: Part (b) – Paths from B to E. Path form: . must be a neighbor of (excluding ), so .

    • If : Remaining . is valid. ( is missing).
    • If : Remaining . and are both valid.

    Total routes: , , .

    Step 4: Part (c) – A not speaking with B and D. A's neighbors are now only .

    • If path starts : Next can be or .
    • (valid, since connects to , connects to ).
    • (valid, since connects to , connects to ).
    • If path starts : Next can be or .
    • (valid).
    • (valid).

    Total routes: 4.

    Question 5 · Discrete Mathematics · 2023 MSQ
    Solitaire Tic-Tac-Toe is a new game on the market. Instead of adding X’s and O’s to an empty grid, you start with a grid in which every position already has an X or an O. In each move, you select a row, column or diagonal and reverse all the entries along the chosen line: all X’s become O’s and all O’s become X’s.
    For instance, here is a sequence of possible moves.
    XOXOXOXOXBottomrowXOXOXOOXOSW-to-NEdiagonalXOOOOOXXOMiddlecolumnXXOOXOXOO
    Given an arrangement , we want to explore all arrangements of the grid that we can generate starting with . What is the smallest number such that each such arrangement can be reached using at most moves, starting with ?
    1. A.

      8

    2. B.

      16

    3. C.

      64

    4. D.

      256

    Correct Answer:

    ["A"]

    Step-by-Step Solution

    Key idea: This is a grid transformation invariant question, recognizable by the operation of flipping rows, columns, or diagonals.

    Step 1: Identify the available moves. There are 3 rows, 3 columns, and 2 diagonals, making a total of 8 distinct moves.

    Step 2: Note the properties of the moves. Each move is its own inverse (flipping a line twice returns it to the original state, since X becomes O and O becomes X). Also, the moves commute (the order of flips does not matter).

    Step 3: Determine the maximum number of moves needed. Since applying any move twice is redundant, any reachable arrangement can be achieved by applying a subset of the 8 available moves, each at most once.

    Step 4: Conclude the upper bound. The size of any such subset is at most 8. Therefore, every reachable arrangement can be reached in at most 8 moves. (While a tighter bound of 5 exists due to linear dependencies among the moves, 8 is the smallest valid upper bound among the given options and follows directly from the 8 distinct moves).

    Answer: 8

    Question 6 · Discrete Mathematics · 2023 MSQ
    A perfect shuffle of a deck of cards divides the deck into two equal parts and then interleaves the cards from each half, starting with the first card of the first half.
    For instance, if we shuffle a deck of cards containing 10 cards arranged , we first create two equal decks with cards and and then interleave them to get a new deck .
    We start with the deck and keep shuffling. Which card(s) will never appear next to 5?
    1. A.

      1

    2. B.

      2

    3. C.

      7

    4. D.

      8

    Correct Answer:

    ["D"]

    Step-by-Step Solution

    Key idea: This is a permutation cycle decomposition question, recognizable because it asks about the long-term behavior of a deterministic rearrangement (shuffle).

    Step 1: Understand the shuffle mapping. For an 8-card deck, the perfect shuffle maps positions as follows: if , and if .

    Step 2: Find the cycles of positions.

    • Position 1 maps to 1. (Cycle: {1})
    • Position 8 maps to 8. (Cycle: {8})
    • Position 2 3 5 2. (Cycle: {2, 3, 5})
    • Position 4 7 6 4. (Cycle: {4, 6, 7})

    Step 3: Track the cards in these cycles.

    Initial deck: [8, 1, 4, 5, 3, 6, 2, 7] at positions 1 to 8.

    • Cycle {1} always contains card 8.
    • Cycle {8} always contains card 7.
    • Cycle {2, 3, 5} contains cards {1, 4, 3}.
    • Cycle {4, 6, 7} contains cards {5, 6, 2}.

    Step 4: Determine adjacencies for card 5. Card 5 is always in Cycle {4, 6, 7}.

    • If 5 is at pos 4, neighbors are pos 3 and 5 (both in Cycle {2, 3, 5}, cards {1, 3, 4}).
    • If 5 is at pos 6, neighbors are pos 5 (Cycle {2, 3, 5}) and pos 7 (Cycle {4, 6, 7}).
    • If 5 is at pos 7, neighbors are pos 6 (Cycle {4, 6, 7}) and pos 8 (Cycle {8}, card 7).

    Step 5: Check the options. Card 8 is fixed at position 1. For 8 to be next to 5, 5 would need to be at position 2. However, 5 only visits positions 4, 6, and 7. Thus, 8 can never be next to 5.

    Answer: 8

    Question 7 · Programming · 2023 MSQ

    Consider the following pseudocodes of two functions, where denotes the remainder when is divided by 2. The function returns the absolute value of an integer .

    function foo1(u):

    if u % 2 == 0 AND abs(u) > 0:

    u = u + foo2(u-1)

    return u

    function foo2(v):

    if v % 2 == 1 AND abs(v) > 1:

    v = v + foo1(v-1)

    return v

    Which of the following is/are true?

    1. A.

      , when called on a positive integer , returns

    2. B.

      , when called on an odd positive integer , returns

    3. C.

      goes into infinite recursion

    4. D.

      returns 105

    Correct Answer:

    ["B","D"]

    Step-by-Step Solution

    Key idea: This is a mutual recursion evaluation question. We need to trace the functions for small values to find a mathematical pattern, and carefully evaluate the conditions for negative numbers using standard C-style remainder rules.

    Step 1: Trace foo1(u) for small positive even u.

    foo1(2): 2 % 2 == 0 and abs(2) > 0. u = 2 + foo2(1).

    foo2(1): 1 % 2 == 1 but abs(1) > 1 is False. Returns 1.

    foo1(2) = 2 + 1 = 3. Note: .

    Step 2: Trace foo2(v) for small positive odd v.

    foo2(3): 3 % 2 == 1 and abs(3) > 1. v = 3 + foo1(2) = 3 + 3 = 6. Note: .

    Step 3: Generalize the pattern.

    By induction, foo1(u) for positive even u sums all integers from 1 to u, yielding .

    foo2(v) for positive odd v sums all integers from 1 to v, yielding .

    Step 4: Evaluate Option A.

    For an odd positive integer like u=3, foo1(3) checks 3 % 2 == 0, which is false, and returns 3. But . So Option A is false.

    Step 5: Evaluate Option B.

    For any odd positive integer v, it follows the pattern . Option B is true.

    Step 6: Evaluate Option D.

    foo1(14) where 14 is a positive even integer. It returns . Option D is true.

    Step 7: Evaluate Option C.

    For foo2(-13), we check -13 % 2. In standard C-style programming remainder, -13 % 2 = -1. The condition -1 == 1 is false. The function returns -13 immediately without recursion. Option C is false.

    Answer: B, D

    Question 8 · Programming · 2023 MSQ

    Consider the pseudocode below, where denotes the remainder when is divided by 6. The notation stands for integer division, i.e., .

    function sixer(n):

    count = 0

    while n > 0:

    if n % 6 == 0:

    n = n - 1

    else:

    n = n//2

    count = count + 1

    return count

    Which of the following is true when sixer(n) is invoked with sufficiently large , say ?

    1. A.

      The value of count is approximately

    2. B.

      The value of count is approximately

    3. C.

      The value of count is approximately

    4. D.

      The value of count is approximately

    Correct Answer:

    ["C"]

    Step-by-Step Solution

    Key idea: This is a while-loop iteration count question, recognisable because it asks for the approximate number of steps to reduce to using conditional halving and subtracting.

    Step 1: Analyze the loop behavior. If is a multiple of , the loop executes , making it no longer a multiple of .

    Step 2: In the very next iteration, since is not a multiple of , the else branch executes: .

    Step 3: Thus, every time is a multiple of , it takes exactly steps to approximately halve . If is not a multiple of , it takes step to halve .

    Step 4: In all cases, is halved in at most steps. Therefore, the number of iterations is bounded between and .

    Step 5: This means the count grows logarithmically with . Among the given options, "approximately " is the only one that correctly describes this logarithmic growth rate.

    Answer: C

    Question 9 · Probability Theory · 2023 MSQ

    Let be events such that . Which of the following is/are true?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    ["B"]

    Step-by-Step Solution

    Key idea: This is an event algebra question requiring the Addition Rule and bounding using the fact that the probability of any event cannot exceed 1.

    Step 1: Evaluate Option A using the Addition Rule. . The option claims 0.75, so A is false.

    Step 2: Evaluate Option B. Since , the events are mutually exclusive. . This is always true, so B is correct.

    Step 3: Evaluate Options C and D using the universal bound .

    We know .

    Since , .

    Thus, .

    Because , we must have .

    This means could be 0.2, 0.3, etc., so it is not necessarily exactly 0.2 (Option C is false).

    Consequently, . Option D claims 0.9, which is impossible (Option D is false).

    Answer: Only B is necessarily true.

    Question 10 · Probability Theory · 2023 MSQ

    Consider the set such that . Let be an element sampled uniformly at random from . Let denote mod . Which of the following statements is/are true?

    1. A.

    2. B.

      for all

    3. C.

      is always an element of

    4. D.

    Correct Answer:

    ["C","D"]

    Step-by-Step Solution

    Key idea: Modular arithmetic preserves uniform distribution, but creates deterministic dependence.

    Step 1: Recognize that x is uniformly distributed over S = {0, 1, ..., n-1}.

    Step 2: The transformation y = (x + 2^n) mod n is a bijection on S because adding a constant and taking modulo n simply permutes the elements of S.

    Step 3: Therefore, y is also uniformly distributed over S. This means P[y = k] = 1/n for any k in S.

    Step 4: Evaluate Option 1: It claims P[y = k] = k/n, which is false (it is 1/n).

    Step 5: Evaluate Option 2: It claims x and y are independent. But y is a deterministic function of x, so they are perfectly dependent. P[x=a, y=b] is 1/n if b = (a+2^n) mod n, and 0 otherwise. This does not equal (1/n)*(1/n) = 1/n^2. False.

    Step 6: Evaluate Option 3: By definition of modulo n, the result is always in {0, 1, ..., n-1}, which is exactly S. True.

    Step 7: Evaluate Option 4: For n >= 2, n-1 >= 1, so log_2(n-1) >= 0. Also, for n >= 2, n-1 < 2^{n-1}, so log_2(n-1) < n-1. Thus, floor(log_2(n-1)) is an integer between 0 and n-2, which is in S. Since y is uniform on S, the probability is 1/n. True.

    Other CMI Data Science papers