GATE CSE Combinatorics PYQs
GATE evaluates Generating Functions by testing the candidate's ability to find closed-form representations of ordinary generating functions (OGFs) for piecewise… Read the guide
- Questions
- 19
- Asked
- since 2012
- Total marks
- 31
- Marks / paper
- 1.2
19 GATE CSE Combinatorics PYQs with solutions, from Engineering Mathematics. Browse all GATE CSE PYQs.
Questions
Every official paper that asked this topic, newest first.
- GATE CSE 2025 Set 1 · Q30Let be the set of all ternary strings defined over the alphabet . Consider all strings in that contain at least one occurrence of two consecutive symbols, that is, “aa”, “bb” or “cc”. The number of such strings of length 5 that are possible is ________. (Answer in integer)NAT1 markEasySolve
- GATE CSE 2023 · Q48Let , where is a large positive integer greater than 1000. Let be a positive integer less than . Let be subsets of with and . We say that a permutation of separates from if one of the following is…MCQ2 marksMediumSolve
- GATE CSE 2022 · Q36Which one of the following is the closed form for the generating function of the sequence defined below? MCQ2 marksMediumSolve
- GATE CSE 2021 Set 1 · Q19There are 6 jobs with distinct difficulty levels, and 3 computers with distinct processing speeds. Each job is assigned to a computer such that: - The fastest computer gets the toughest job and the slowest computer gets the easiest job. - Every computer gets at least one job. The number of ways in which this can be…NAT1 markMediumSolve
- GATE CSE 2020 · Q42The number of permutations of the characters in LILAC so that no character appears in its original position, if the two L’s are indistinguishable, is _________.NAT2 marksMediumSolve
- GATE CSE 2019 · Q5Let . Let . Consider the following two statements on . I. II. Which of the above statements is/are TRUE?MCQ1 markMediumSolve
- GATE CSE 2019 · Q21The value of is _______.NAT1 markEasySolve
- GATE CSE 2018 · Q1Which one of the following is a closed form expression for the generating function of the sequence , where for all ?MCQ1 markEasySolve
- GATE CSE 2017 Set 1 · Q47The number of integers between 1 and 500 (both inclusive) that are divisible by 3 or 5 or 7 is ________.NAT2 marksMediumSolve
- GATE CSE 2017 Set 2 · Q47If the ordinary generating function of a sequence is , then is equal to ________.NAT2 marksMediumSolve
- GATE CSE 2016 Set 1 · Q26The coefficient of in is ________ .NAT2 marksEasySolve
- GATE CSE 2016 Set 1 · Q27Consider the recurrence relation , . Let . The value of is ________ .NAT2 marksMediumSolve
- GATE CSE 2015 Set 1 · Q49Let represent the number of bit strings of length containing two consecutive 1s. What is the recurrence relation for ?MCQ2 marksMediumSolve
- GATE CSE 2015 Set 2 · Q9The number of divisors of 2100 is ______.NAT1 markEasySolve
- GATE CSE 2015 Set 3 · Q5The number of 4 digit numbers having their digits in non-decreasing order (from left to right) constructed by using the digits belonging to the set is ________.NAT1 markMediumSolve
- GATE CSE 2014 Set 1 · Q37There are 5 bags labeled 1 to 5. All the coins in a given bag have the same weight. Some bags have coins of weight 10 gm, others have coins of weight 11 gm. I pick 1, 2, 4, 8, 16 coins respectively from bags 1 to 5. Their total weight comes out to 323 gm. Then the product of the labels of the bags having 11 gm coins…NAT2 marksEasySolve
- GATE CSE 2014 Set 1 · Q49A pennant is a sequence of numbers, each number being 1 or 2. An -pennant is a sequence of numbers with sum equal to . For example, is a 4-pennant. The set of all possible 1-pennants is , the set of all possible 2-pennants is and the set of all 3-pennants is …NAT2 marksMediumSolve
- GATE CSE 2012 · Q37How many onto (or surjective) functions are there from an -element () set to a 2-element set?MCQ2 marksEasySolve
- GATE CSE 2012 · Q38Let G be a complete undirected graph on 6 vertices. If vertices of G are labeled, then the number of distinct cycles of length 4 in G is equal toMCQ2 marksMediumSolve
What GATE tests in Combinatorics
Concepts, patterns, formulas and traps distilled from past papers.
GATE evaluates Generating Functions by testing the candidate's ability to find closed-form representations of ordinary generating functions (OGFs) for piecewise or parity-dependent sequences. Questions require decomposing sequences linearly and applying operations like substitution (e.g., ) and differentiation to handle polynomial coefficients. These items test analytical fluency with infinite series and discrete mathematics manipulations.
Core concepts
- Inclusion-Exclusion Principle and Complementary Counting
- Linear and Non-Homogeneous Recurrence Relations
- Ordinary Generating Functions (OGF)
- Combinations with Repetition / Multiset Coefficients
- Restricted Permutations and Generalized Derangements
- Graph Substructure Enumeration (Cycles in Kn)
- Positional and Relative Order Permutations
- Product rule of counting
- Complementary counting / Subtraction principle
- String/sequence counting over finite alphabets
- Adjacency and consecutive symbol constraints
- Ordinary Generating Functions (OGF) and negative binomial series
- First-order recurrence relations solved by summation formulas
- Principle of Inclusion-Exclusion (PIE) for multiple finite sets
- Complementary counting in restricted assignments and surjections
- Modular exponentiation via Fermat's Little Theorem and cyclicity
- Fundamental Theorem of Arithmetic (Prime Factorization)
- Product Rule of Combinatorics
- Divisor Function d(n)
- Double counting (Fubini's principle of counting)
- Binomial coefficients and combinatorial identities
- Incidence relations between elements and subsets
- Summation over subset sizes
- Parity and multisection of series (x → x2)
- Differentiation and shift operations on power series
- Linearity of generating functions
- Closed-form rational function representations
Recurring question patterns
Recurrence relation formulation and evaluation
Commonmixed2 marks2015, 2014Formulating linear or non-homogeneous recurrence relations from combinatorial constraints (e.g., bit strings avoiding/containing patterns or sequences summing to a target) and computing terms or finding the recurrence equation.
Restricted permutations and derangement variants
Commonmixed2 marks2023, 2020Counting arrangements where certain elements cannot occupy specific positions (derangements with identical characters) or must appear in specific relative orders.
Stars and bars / Multisets / Combinations with repetition
OccasionalNAT1 marks2015Counting non-decreasing sequences or distributions of identical items into distinct bins, equivalent to .
Generating functions and closed forms
OccasionalMCQ1 marks2018Deriving the ordinary generating function in closed form for arithmetic or polynomial coefficient sequences.
Inclusion-exclusion and onto function counting
CommonMCQ2 marks2012Using inclusion-exclusion or complementary counting to determine surjective mappings or structured subgraphs (such as cycles in complete graphs).
Binary representation and weight partitioning
RareNAT2 marks2014Applying properties of powers of 2 (uniqueness of binary representations) to solve combinatorial identification puzzles.
Complementary Counting on Strings with Adjacency Constraints
OccasionalNAT1 marks2025Counting the number of strings of a given length over an alphabet of size k that contain at least one instance of consecutive identical symbols, solved by subtracting strings with no consecutive identical symbols from the total possible strings.
Generating Function Coefficient Extraction
CommonNAT2 marks2017, 2016Given a formal power series or rational generating function (often expressed using ), determine the coefficient of a specific term or compute an expression like .
Recurrence Solved via Finite Series Summation
OccasionalNAT2 marks2016A first-order non-homogeneous recurrence of the form (where is a polynomial) is evaluated at a large using closed-form summation identities.
Principle of Inclusion-Exclusion (Divisibility)
OccasionalNAT2 marks2017Counting the number of integers in a range divisible by at least one of multiple coprime or prime divisors using 3-set PIE.
Constrained Combinatorial Assignment
OccasionalNAT1 marks2021Distributing distinct objects into distinct categories under specific pinned boundary conditions and non-empty bin requirements using complementary counting.
Modular Exponentiation / Number Theoretic Arithmetic
OccasionalNAT1 marks2019Computing large powers modulo a prime using Fermat's Little Theorem or cyclic period reduction.
Divisor Counting via Prime Factorization
CommonNAT1 marks2015Given a positive integer , compute the total number of positive divisors by decomposing into its canonical prime factorization and applying the multiplicative formula .
Double Counting of Element-Subset Pairs
RareMCQ1 marks2019Counting the cardinality of ordered pairs where and with , formulated both element-first () and subset-cardinality-first ().
Closed-Form OGF for Parity-Dependent Sequences
RareMCQ2 marks2022Given a sequence defined differently for odd and even (or incorporating polynomial factors on one parity), find the closed-form algebraic expression for .
Formulas GATE uses
Surjective functions from n-set to 2-set
Used when counting onto functions from a set of size to a set of size 2 by subtracting 2 constant functions.
Cycles of length k in a complete graph $K_n$
Used to count undirected simple cycles of length on labeled vertices.
Combinations with repetition (Multiset coefficient)
Used to count non-decreasing sequences of length using distinct symbols or distributing identical items into distinct bins.
Generating function for linear sequences
Used to convert sequences of the form into rational closed-form generating functions.
Ordered partition recurrence (Fibonacci type)
Used when an -sum composition is formed using step sizes of 1 and 2.
Total Strings of Fixed Length
Used to find total number of length- strings over an alphabet of size .
Strings without Consecutive Identical Characters
Used to count strings where no two adjacent positions have the same character.
Principle of Complementary Counting
Used when counting strings containing 'at least one' occurrence of an event is harder than counting zero occurrences.
Negative Binomial Series Expansion
Used to find coefficients of terms in ordinary generating functions.
Principle of Inclusion-Exclusion (3 Sets)
Used when counting elements satisfying at least one of three divisibility or property criteria.
Sum of First n Squares
Used in telescoping recurrence relations involving quadratic polynomial increments.
Sum of First n Integers
Used in telescoping recurrence relations involving linear polynomial increments.
Fermat's Little Theorem
Used to reduce large exponent modulo calculations.
Number of Positive Divisors Function ($d(n)$ or $\tau(n)$)
Used to find the total count of positive integer divisors of a given integer given its prime factorization.
Absorption Identity for Binomial Coefficients
Used to simplify summation terms containing an index multiplied by a binomial coefficient.
Binomial Identity for Derivative / First Moment Sum
Used when counting the total number of element-subset incidence pairs with where .
Ordinary Generating Function (OGF)
Fundamental definition used to convert a discrete sequence into a power series.
Geometric Series Sum
Summing infinite constant sequences over all integers or restricted parities.
Index Multiplication via Differentiation
Generating linear factors (like or ) attached to series coefficients.
Examiner traps in Combinatorics
- Overcounting/undercounting due to indistinguishable elements in derangement problems (e.g., duplicate letters in words like LILAC).
- Forgetting directionality in undirected graphs (forgetting to divide cycle permutations by 2 for undirected edges).
- Mixing up whether order matters (using simple combinations nk instead of combinations with repetition n+k-1k for non-decreasing digit strings).
- Missing non-homogeneous terms in recurrence relations (e.g., forgetting the 2n-2 term when the target substring condition is satisfied immediately at the suffix).
- Missing symmetry factors (such as the factor of 2 when either set A precedes B or set B precedes A).
- Attempting inclusion-exclusion on overlapping consecutive pairs directly instead of using the complement, leading to complex overlapping casework.
- Forgetting that the first character has k choices while subsequent non-matching positions have (k-1) choices.
- Off-by-one errors in length exponents (e.g., using 3 × 25 instead of 3 × 25-1).
- Failing to factor out the leading term in geometric power series before applying (1-x)-n (e.g., (x3 + x4 + )3 = x9(1-x)-3).
- Miscalculating the requested sequence value (e.g., giving a3 instead of a3 - a0, or omitting the scaling factor K).
- Double-subtracting or misapplying non-empty constraints in restricted mappings when some bins are already non-empty due to fixed assignments.
- Arithmetic errors in calculating pairwise and triple set intersections using LCMs in PIE divisibility problems.
- Multiplying the prime exponents directly without adding 1 to each (i.e., computing Π ai instead of Π (ai + 1)).
- Incorrect prime factorization of numbers with terminal zeros (e.g., miscounting factors of 2 or 5).
- Forgetting that p0 = 1 is a valid factor choice for each prime, which leads to the +1 term.
- Confusing the number of subsets containing a fixed element (2n-1) with the total number of all subsets (2n).
- Believing that only one representation (summation vs closed form) is mathematically valid rather than recognizing both as equivalent expressions of the same count.
- Index boundary confusion between k=0 and k=1 (even though 0 n0 = 0, leading terms require careful handling).
- Forgetting to multiply by x after differentiating, resulting in Σ (2k+1)x2k instead of Σ (2k+1)x2k+1
- Sign errors in quotient rule when differentiating rational forms like (x)/(1-x2)
- Applying operations to the whole sequence instead of splitting into parity components (an = 1 + bn)
- Misidentifying base cases at n=0 (e.g., treating n=0 as odd)
How questions are asked
- Recurrence relation setup from string constraints
- Numeric answer for word permutations with fixed/banned positions
- Closed-form ordinary generating function identification
- Abstract counting formula derivation with subsets and permutations
- Integer composition / step-counting sequences
- Numerical calculation of constrained strings of fixed length
- Extract coefficient in algebraic power series expansion
- Compute value/coefficient ratio K from a polynomial recurrence
- Range divisibility count using inclusion-exclusion
- Constrained job-to-machine assignment counting
- Modular arithmetic reduction ab mod m
- Direct integer calculation in a fill-in-the-blank NAT prompt
- Multi-statement correctness evaluation (Statement I / Statement II)
- Closed-form identification for piecewise sequence
Paper trends
Shift from basic formula identification (onto functions, cycles) towards constructive NAT problems involving case casework and derangements.
2020, 2014, 2012
Introduction of abstract algebraic combinatorial questions involving parameterized sets and order relations.
2023
Direct numerical-answer counting problems evaluating elementary combinatorial principles like complementary counting are featured as concise 1-mark NAT questions.
2025
Exclusively tested as NAT questions across the sampled years, demanding exact integer computation without multiple-choice elimination.
2021, 2019, 2017, 2016
Higher-weight 2-mark questions focus on generating function expansions and 3-set PIE, while 1-mark questions assess direct modular arithmetic or assignment principles.
2021, 2019, 2017, 2016
Direct calculation items on elementary combinatorics/number theory are placed as 1-mark NAT questions without multiple-choice options, testing arithmetic precision and basic divisor function application.
2015
Emphasis on multi-statement verification where both closed-form and summation representations of the same combinatorial quantity must be identified as valid.
2019
Appears as a 2-mark calculus/algebra-heavy discrete mathematics question requiring series differentiation and algebraic simplification rather than simple recurrence solving.
2022
Difficulty notes
Easy: Direct closed-form formula substitution or standard generating function expansions (1 mark). Medium: Multi-step case breakdowns (such as derangements with duplicate items, recurrence derivations for substring constraints, or parameterized permutation problems) (2 marks).