counting
GATE CSE & IT · Combinatorics · 1987-2026
Study anchor
Rosen — Discrete Mathematics and Its Applications
Discrete structures, counting, relations, graph theory
Practice action
Start latest PYQPYQs in this concept
All concepts →Consider a knock-out women's badminton singles tournament where there are no ties. The loser in each game is eliminated from the tournament. Every player plays until she is defeate...
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 probabilit...
Let S be the set of all ternary strings defined over the alphabet {a, b, c}. Consider all strings in S that contain at least one occurrence of two consecutive symbols, that is, "aa...
Let $S$ be the set of all ternary strings defined over the alphabet $\{a, b, c\}$. Consider all strings in $S$ that contain at least one occurrence of two consecutive symbols, that...
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...
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 1/4th of the number...
Let P be the partial order defined on the set {1,2,3,4} as follows P = {(x,x) | x ∈ {1,2,3,4}} ∪ {(1,2), (3,2), (3,4)} The number of total orders on {1,2,3,4} that contain P is ___...
Consider the following two regular expressions over the alphabet {0,1}: r = 0* + 1* s = 01* + 10* The total number of strings of length less than or equal to 5, which are neither i...
Let $$U = \{ 1,2,....,n\} $$, where n is a large positive integer greater than 1000. Let k be a positive integer less than n. Let A, B be subsets of U with $$|A| = |B| = k$$ and $$...
The number of arrangements of six identical balls in three identical bins is ___________.
There 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 tou...
Consider the following sets, where n > 2: S 1 : Set of all n x n matrices with entries from the set {a, b, c} S 2 : Set of all functions from the set {0,1, 2, ..., n 2 — 1} to the...
There are five bags each containing identical sets of ten distinct chocolates. One chocolate is picked from each bag. The probability that at least two chocolates are identical is...
Let R be the set of all binary relations on the set {1,2,3}. Suppose a relation is chosen from R at random. The probability that the chosen relation is reflexive (round off to 3 de...
The number of possible min-heaps containing each value from $$\left\{ {1,2,3,4,5,6,7} \right\}$$ exactly once is _____.
Arun, Gulab, Neel and Shweta must choose one shirt each from a pile of four shirts coloured red, pink, blue and white respectively. Arun dislikes the colour red and Shweta dislikes...
The number of onto functions (subjective functions) from set $$X = \left\{ {1,2,3,4} \right\}$$ to set $$Y = \left\{ {a,b,c} \right\}$$ is __________________.
The 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 $${1, 2, 3}$$ is____________...
The dual of a Boolean function $$F\left( {{x_1},{x_2},\,....,\,{x_n},\, + , \cdot ,'} \right),$$ written as $${F^D}$$, is the same expression as that of $$F$$ with $$+$$ and $$ \cd...
Consider the following pseudo code. What is the total number of multiplications to be performed? D = 2 for i = 1 to n do for j = i to n do for k = j + 1 to n do D = D * 3
Let $$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 to
A deck of 5 cards (each carrying a distinct number from 1 to 5) is shuffled thoroughly. Two cards are then removed one at a time from the deck. What is probability that the two car...
What is the possible number of reflexive relations on a set $$5$$ elements?
What is the probability that divisor of $${10^{99}}$$ is a multiple of $${10^{96}}$$ ?
How many distinct BSTs can be constructed with 3 distinct keys?
Suppose that a robot is placed on the Cartesian plane. At each step it is allowed to move either one unit up or one unit right, i.e., if it is at $$(i, j)$$ then it can move to eit...
What is the maximum number of different Boolean functions involving $$n$$ Boolean variables?
The maximum number of binary trees that can be formed with three unlabeled nodes is:
Let $$X,. Y, Z$$ be sets of sizes $$x, y$$ and $$z$$ respectively. Let $$W = X x Y$$ and $$E$$ be the set of all subjects of $$W$$. The number of functions from $$Z$$ to $$E$$ is
Let S = {1, 2, 3,....., m} , m > 3. Let $${X_1},\,....,\,{X_n}$$ be subsets of S each of size 3. Define a function f from S to the set of natural numbers as, f (i) is the number of...
How many distinct binary search trees can be created out of 4 distinct keys?
The number of different $$n$$ $$x$$ $$n$$ symmetric matrices with each elements being either $$0$$ or $$1$$ is (Note: power ($$2,$$ $$x$$) is same as $${2^x}$$)
The number of different $$n \times n$$ symmetric matrices with each elements being either $$0$$ or $$1$$ is
How many graphs on $$n$$ labeled vertices exist which have at least $$\left( {{n^2} - 3n} \right)/2\,\,\,$$ edges?
Mala has a colouring book in which each English letter is drawn two times. She wants to paint each of these 52 prints with one of $$k$$ colours, such that the colour-pairs used to...
In a population of N families, 50% of the families have three children, 30% of the families have two children and the remaining families have one child. What is the probability tha...
$$n$$ couples are invited to a party with the condition that every husband should be accompanied by his wife. However, a wife need not be accompanied by her husband. The number of...
Let $$A$$ be a set of $$n\left( { > 0} \right)$$ elements. Let $${N_r}$$ be the number of binary relations on $$A$$ and Let $${N_r}$$ be the number of functions from $$A$$ to $$A$$...
how many undirected graphs (not necessarily connected) can be constructed out of a given $$\,\,\,\,V = \left\{ {{v_1},\,\,{v_2},\,....,\,\,{v_n}} \right\}$$ of $$n$$ vertices?
Seven (distinct) car accidents occurred in a week. What is the probability that they all occurred on the same day ?
How many 4 digit even numbers have all 4 digits distinct?
A multiset is an unordered collection of elements where elements may repeat ay number of times. The size of a multiset is the number of elements in it counting repetitions. (a) wha...
The number of binary relations on a set with $$n$$ elements is:
Two girls have picked 10 roses, 15 sunflowers and 14 daffodils. What is the number of ways they can divide the flowers among themselves?
How many substrings of different lengths (non-zero) can be formed from a character string of length $$n$$ ?
The number of functions from an $$m$$ element set to an $$n$$ element set is
Two dice are thrown simultaneously. The probability that at least one of them will have 6 facing up is
Suppose $$X$$ and $$Y$$ are sets and $$\left| X \right|$$ and $$\left| Y \right|$$ are their respective cardinalities. It is given that there are exactly 97 functions from $$X$$ to...
The probability that a number selected at random between $$100$$ and $$999$$ (both inclusive ) will not contain the digit $$7$$ is
The number of substrings (of all length inclusive) that can be formed from a character string of length $$n$$ is
The number of sub-strings (of all lengths inclusive) that can be formed from a character string of length $$n$$ is
How many sub strings can be formed from a character string of length $$n$$?
(a) How many binary relations are there on a set A with n elements? (b) How many one - to - one functions are there from a set A with n elements onto itself