chapter
    Counting, Sets and Elementary Probability PYQs for GATE CS

    Solve 3+ Counting, Sets and Elementary Probability previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    2026 Slot Set1 PYQ
    Level 3: Exam Standard

    An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice in succession and the number on the top face is recorded each time. The probability that the number appearing in the second roll is an integer multiple of the number appearing in the first roll is __________

    Question 2
    2024 Slot Set2 PYQ
    Level 3: Exam Standard
    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?
    Question 3
    2024 Slot Set2 PYQ
    Level 3: Exam Standard
    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 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
    Free preview ends here

    Login to view the complete previous-year questions 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.

    Counting, Sets and Elementary Probability PYQs for GATE CS

    Solve 3+ Counting, Sets and Elementary Probability previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: Counting, Sets and Probability

    Your Learning Journey

    1 Sets and Inclusion-Exclusion

    Organize objects into collections and count them systematically. Learn the fundamental principle for avoiding double-counting.

    Weightage: ~40% of chapter questions

    2 Permutations and Arrangements

    Count ordered selections. Master factorial notation and arrangement problems.

    Weightage: ~40% of chapter questions

    3 Elementary Dice Probability

    Apply counting to chance events. Calculate probabilities for dice rolls and similar experiments.

    Weightage: ~20% of chapter questions

    What You Will Master

    • Systematic organization of counting problems
    • Core formulas for sets, permutations, and probability
    • Ability to recognize question patterns quickly
    • Techniques to avoid common calculation errors

    What Are Sets? The Foundation of Counting

    Definition

    A set is a well-defined collection of distinct objects.

    Notation

    • Sets:
    • Elements:
    • " belongs to ":
    • " does not belong to ":

    Examples

    • (even numbers less than 10)
    • (vowels in English)
    • (first 100 natural numbers)

    Cardinality

    The number of elements in a set is denoted by:

    For the examples above:

    Why Sets Matter in Counting

    Sets provide a systematic way to:

    • Group objects by shared properties
    • Avoid counting the same object twice
    • Apply formulas to find totals efficiently

    Counting, Sets and Elementary Probability: Solved Questions with Step-by-Step Explanations (3 Problems)

    Question 1 · Quantitative Aptitude · 2026_Set1 MCQ

    An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice in succession and the number on the top face is recorded each time. The probability that the number appearing in the second roll is an integer multiple of the number appearing in the first roll is __________

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: fix the first roll, count the multiples available to the second roll; "integer multiple" includes equality.

    Exam route:

    • Sample space ordered pairs .
    • For each first roll , count with :
    • : → 6
    • : → 3
    • : → 2
    • : → 1
    • : → 1
    • : → 1
    • Favourable .
    • .

    Learning route:

    Let the first roll be and the second be . The condition " is an integer multiple of " means for some positive integer . Since , the multiples of not exceeding are exactly up to .

    Build the case table:

    | | Allowed | Count |

    |---|---|---|

    | 1 | 1, 2, 3, 4, 5, 6 | 6 |

    | 2 | 2, 4, 6 | 3 |

    | 3 | 3, 6 | 2 |

    | 4 | 4 | 1 |

    | 5 | 5 | 1 |

    | 6 | 6 | 1 |

    Total favourable . Since the two rolls are independent and ordered, , so

    Verification: the complement (second roll is NOT a multiple of the first) has outcomes; , and .

    Wrong-path autopsy:

    • (A) counts only the row (6 outcomes) and forgets the other five rows.
    • (B) drops equality — counting only <i>strict</i> multiples — giving or a similar miscount; the problem says "integer multiple", which includes .
    • (D) is the complement of , i.e. the same miscount promoted to the other side.

    Generalisation: for any condition linking the first and second rolls, fix one roll and enumerate the compatible values of the other; never treat the 11 possible sums or the 21 unordered pairs as equally likely.

    Question 2 · Quantitative Aptitude · 2024_Set2 MCQ
    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?
    1. A.

      24

    2. B.

      48

    3. C.

      16

    4. D.

      12

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: "all possible orders of all four elements" is the textbook trigger for ; "each wizard independently" does not multiply the per-wizard count.

    Exam route:

    • Four distinct elements, all used, order matters arrangements.
    • Each wizard works independently and tries all of them, so each wizard makes attempts.

    Learning route:

    The problem asks for the number of attempts <i>each</i> wizard makes. The two wizards are independent actors; the question is not asking for the total across both wizards.

    Step 1 — identify the counting task. We are arranging all four distinct elements (water, air, fire, earth) in a sequence. Order matters because "water, air, fire, earth" is a different mix from "air, water, fire, earth".

    Step 2 — apply the permutation-of-all formula. Arranging distinct objects in order gives outcomes. Here , so

    Step 3 — read the question carefully. "How many attempts does each wizard make, independently?" Each wizard runs through all arrangements on their own. The presence of a second wizard does not change the count per wizard.

    Verification: listing a few arrangements confirms the scale — starting with water there are arrangements, and there are choices for the first element, giving .

    Wrong-path autopsy:

    • (B) multiplies , confusing "each wizard" with "both wizards together".
    • (C) uses or , mixing up permutations with independent binary choices.
    • (D) uses or , either halving for a non-existent symmetry or stopping one step early.

    Generalisation: whenever a problem says "arrange all distinct objects in all possible orders", the answer is ; extra actors working independently do not change the per-actor count unless the question explicitly asks for a total.

    Question 3 · Quantitative Aptitude · 2024_Set2 MCQ
    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 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
    1. A.

      1,800

    2. B.

      3,500

    3. C.

      1,600

    4. D.

      1,500

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: "Neither" tells you the union immediately; the ratio then collapses to one unknown.

    Exam route:

    • Total , neither .
    • Given , so .
    • Inclusion-exclusion: .
    • .
    • .

    Learning route:

    Let be the set of students who like their core branch and the set who like other branches. The universal set has .

    Step 1 — use "neither" to get the union. Students who like neither are outside , so

    Step 2 — translate the ratio. means .

    Step 3 — apply inclusion-exclusion for two sets:

    Substituting and :

    Step 4 — solve: , so .

    Verification: . Then , and . All constraints satisfied.

    Wrong-path autopsy:

    • Choosing (B) comes from computing or mixing up which set is of which; it breaks the ratio .
    • Choosing (C) comes from using instead of (forgetting to add the intersection back); this violates the union equation.
    • Choosing (D) is just echoing the "neither" count — a comprehension slip, not a calculation.

    Generalisation: whenever a problem gives a total, a "neither" count, and a ratio between two sets, convert "neither" to the union first, then substitute the ratio into inclusion-exclusion.

    More previous year questions (pyqs) in this unit