CMI Data Science
    Test Series
    Verified Solutions Included

    Algebra & Number Theory, Sets, Logic & Relations, Probability & Random… Test for CMI Data Science: 40 Questions with Solutions & Analysis

    Attempt the Algebra & Number Theory, Sets, Logic & Relations, Probability & Random… test for CMI Data Science: 40 exam-level questions, detailed solutions and

    40 Qs

    Total Questions

    Not provided

    Total Marks

    Not provided

    Duration

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1

    An urn contains 5 red, 4 blue, and 3 green balls (12 balls in total). Nine balls are drawn without replacement. Find the probability that after drawing nine balls, exactly one color remains in the urn. If this probability equals in lowest terms, find the value of .

    Question 2
    Peppa and her friends Suzy and Emily are making 3 masks : a knight mask, a pirate mask and an elf mask. The one wearing the knight mask must always tell the truth, the one wearing the pirate mask must always lie and the one wearing the elf mask could sometimes lie and sometimes tell the truth. After making three masks, one of each kind, they all wear one each and make the following statements:
    Peppa : I am a wearing an elf mask.
    Suzy : That is true.
    Emily : I am not wearing an elf mask.
    What kind of mask is each one wearing?
    Question 3

    The unique real solution to the equation

    is

    Question 4

    Let be uniformly distributed on . Define . Find .

    Question 5

    Consider the following three recursive functions defined for non-negative integers :

    ```

    function f(n):

    if n == 0: return 1

    return f(n-1) + n

    function g(n):

    if n == 0: return 1

    if n > 5: return g(n-1) + 100

    return g(n-1) + n

    function h(n):

    if n == 0: return 1

    return 2 * h(n-1)

    ```

    Which of the following correctly ranks the values of , , and in increasing order?

    Question 6

    Let and . How many functions satisfy ?

    Unlock All 40 Questions in Real Examination Mode

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

    More CMI Data Science Test Series

    Free preview ends here

    Login to view the complete test 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.

    Explore complete test series, official past papers, and chapter-wise study tools.

    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.

    Algebra & Number Theory, Sets, Logic & Relations, Probability & Random… Test for CMI Data Science: 40 Questions with Solutions & Analysis

    Attempt the Algebra & Number Theory, Sets, Logic & Relations, Probability & Random… test for CMI Data Science: 40 exam-level questions, detailed solutions and performance analysis. First questions free.

    Paper breakdown

    40 questions.

    Free sample questions from Algebra & Number Theory, Sets, Logic & Relations, Probability & Random…

    Question 1 · Probability Theory SUB

    An urn contains 5 red, 4 blue, and 3 green balls (12 balls in total). Nine balls are drawn without replacement. Find the probability that after drawing nine balls, exactly one color remains in the urn. If this probability equals in lowest terms, find the value of .

    Correct Answer:

    30

    Step-by-Step Solution

    Key idea: This is a "one color remains" without-replacement question, recognizable because drawing 9 balls from 12 leaves 3 balls, and you need exactly one color among those 3.

    Step 1: Understand the condition.

    Drawing 9 balls leaves 3 balls in the urn. "Exactly one color remains" means all 3 remaining balls are the same color.

    Step 2: Count favorable outcomes.

    Case 1: All 3 remaining are red.

    This means we drew 2 red, 4 blue, 3 green (9 balls).

    Number of ways = .

    Case 2: All 3 remaining are blue.

    This means we drew 5 red, 1 blue, 3 green (9 balls).

    Number of ways = .

    Case 3: All 3 remaining are green.

    This means we drew 5 red, 4 blue, 0 green (9 balls).

    Number of ways = .

    Total favorable = 10 + 4 + 1 = 15.

    Step 3: Count total outcomes.

    Total ways to draw 9 balls from 12 = .

    Step 4: Compute the probability.

    .

    Step 5: Find .

    is in lowest terms (gcd(3,44) = 1).

    , , so .

    Wait, let me recalculate. .

    . Correct.

    Favorable: 10 + 4 + 1 = 15. Correct.

    . Correct.

    .

    Answer: 47.

    Question 2 · Discrete Mathematics SUB
    Peppa and her friends Suzy and Emily are making 3 masks : a knight mask, a pirate mask and an elf mask. The one wearing the knight mask must always tell the truth, the one wearing the pirate mask must always lie and the one wearing the elf mask could sometimes lie and sometimes tell the truth. After making three masks, one of each kind, they all wear one each and make the following statements:
    Peppa : I am a wearing an elf mask.
    Suzy : That is true.
    Emily : I am not wearing an elf mask.
    What kind of mask is each one wearing?
    Correct Answer:

    2

    Step-by-Step Solution

    Key idea: This is a three-role truth-teller puzzle (Knight=Truth, Pirate=Lie, Elf=Variable). The key is to test assumptions against the constraints of each role.

    Step 1: Analyze Peppa's statement "I am wearing an elf mask". If Peppa were the Knight (always truth), she would say "I am Knight". She cannot claim to be Elf because that would be a lie. So Peppa Knight.

    Step 2: If Peppa is the Pirate (always lie), claiming to be Elf is a lie, which is consistent. If Peppa is the Elf (variable), she could tell the truth or lie.

    Step 3: Test Peppa = Pirate. Then "Peppa is Elf" is False. Suzy says "That is true", so Suzy is lying. Since Peppa is Pirate, Suzy must be Elf (lying). This leaves Emily as Knight.

    Step 4: Verify Emily (Knight). Emily says "I am not wearing an elf mask". Since Emily is Knight, this is True. Consistent.

    Step 5: Test Peppa = Elf (telling truth). Then Suzy tells truth. Suzy could be Knight. Then Emily = Pirate. Emily says "I am not Elf". Since Emily is Pirate, this must be a lie, meaning Emily IS Elf. Contradiction.

    Answer: Peppa=Pirate, Suzy=Elf, Emily=Knight. (Encoded as 2 for NAT format: 1=Knight, 2=Pirate, 3=Elf mapping to Peppa).

    Question 3 · School Level Mathematics MSQ

    The unique real solution to the equation

    is

    1. A.

    2. B.

      4

    3. C.

      5

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a multi-radical equation that simplifies beautifully upon squaring, recognizable because the sum of the radicands on the left equals the radicand on the right plus a constant. The standard method is to square both sides and isolate the remaining radical.

    Step 1: Determine the domain.

    We need , , and .

    The most restrictive condition is .

    Step 2: Square both sides of the equation.

    Step 3: Simplify the left side.

    Step 4: Isolate the radical.

    Step 5: Square both sides again.

    Step 6: Check against the domain .

    , so it is valid.

    , so it is rejected.

    The unique real solution is .

    Answer:

    Question 4 · Probability Theory SUB

    Let be uniformly distributed on . Define . Find .

    Correct Answer:

    5

    Step-by-Step Solution

    Key idea: This is a non-bijective modular transformation question, recognisable because , so the map is not a bijection. You need to find the range of and its PMF, then compute the expectation.

    Step 1: Determine the range of .

    Since , compute for each:

    So takes values in (odd numbers only).

    Step 2: Find the PMF of .

    Each value in appears exactly twice:

    • :
    • :
    • :
    • :
    • :

    Since is uniform on 10 values:

    Step 3: Compute .

    Answer: $5$

    Question 5 · Programming MSQ

    Consider the following three recursive functions defined for non-negative integers :

    ```

    function f(n):

    if n == 0: return 1

    return f(n-1) + n

    function g(n):

    if n == 0: return 1

    if n > 5: return g(n-1) + 100

    return g(n-1) + n

    function h(n):

    if n == 0: return 1

    return 2 * h(n-1)

    ```

    Which of the following correctly ranks the values of , , and in increasing order?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a constraint-aware recursion question where one function has a hidden conditional that changes its behavior. The trap is ignoring the constraint in .

    Step 1: Trace :

    Step 2: Trace carefully, respecting the constraint:

    • (since , use the special branch)

    Step 3: Trace :

    Step 4: Compare: , , .

    Therefore, .

    Answer: A

    Question 6 · Discrete Mathematics SUB

    Let and . How many functions satisfy ?

    Correct Answer:

    21

    Step-by-Step Solution

    Key idea: This is a "monotone function counting" problem. A non-decreasing function from a chain to a chain is completely determined by how many domain elements map to each codomain value. This reduces to a multiset (stars and bars) problem.

    Step 1: Translate the condition.

    The condition means the sequence is non-decreasing.

    Once we decide how many elements map to 1, how many to 2, and how many to 3, the function is completely determined (all 1s come first, then 2s, then 3s).

    Step 2: Set up the equation.

    Let = number of elements mapping to 1, = number mapping to 2, = number mapping to 3.

    We need with .

    Step 3: Apply stars and bars.

    The number of non-negative integer solutions to is:

    Answer: 21

    More CMI Data Science tests