Mathematics | PnC and Binomial Coefficients

Last Updated : 27 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Permutations and Combinations (PnC) are fundamental concepts in combinatorics and are essential for counting and arranging objects. Binomial coefficients are closely related and used in various mathematical formulas, including the Binomial Theorem. These concepts are widely used in engineering, computer science, probability, and statistics for solving problems involving discrete structures and optimization.

Read More: Combinatorics Basics

What are Permutations?

A permutation is an arrangement of objects in a specific order. The number of permutations of n distinct objects taken r at a time is given by:

P(n,r) =

Example: Number of ways to arrange 3 out of 5 objects:

P(5,3) = 5! / (5−3)! = 5!/2! = 60.

Read More: Permutation – Formula, Definition, Examples

What are Combinations?

A combination is a selection of objects without regard to the order. The number of combinations of n distinct objects taken r at a time is given by:

C(n, r) =

Example: Number of ways to choose 3 out of 5 objects:

C(5,3) = 5! / 3!2! = 10.

Read More: Combinations

Binomial Coefficients

(x + y)^n = \sum_{k=0}^{n} \binom{n}{k} x^{n-k} y^k

Binomial Coefficient Example

Expand: (x + y)3

(x + y)3 = C(3,0)x3y0 + C(3,1)x2y1 + C(3,2)x1y2 + C(3,3)x0y3

= 1x3 + 3x2y + 3xy2 + 1y3

People Also Read:

Solved Examples on PnC and Binomial Coefficients

Permutation

Problem 1: How many ways can 5 books be arranged on a shelf?

Solution: This is a straightforward permutation.

P(5) = 5! = 5 × 4 × 3 × 2 × 1 = 120 ways

Combination

Problem 2: In how many ways can a committee of 3 be chosen from 10 people?

Solution: This is a combination problem.

C(10,3) = 10! / (3! × 7!) = 120

Binomial Coefficient

Problem 3 : Find the coefficient of x³y² in the expansion of (x + y)⁵

Solution: This is the binomial coefficient ⁵C₃ (as we need to choose 3 x’s out of 5 terms)

⁵C₃ = 5! / (3! × 2!) = 10

Permutation with Repetition

Problem 4: How many 4-digit numbers can be formed using the digits 1, 2, 3 if repetition is allowed?

Solution: We have 3 choices for each of the 4 positions.

3⁴ = 81 numbers

Combination with Repetition

Problem 5: How many ways are there to select 4 ice cream scoops if there are 5 flavors available?

Solution: This is a combination with repetition.

C(5+4-1, 4) = C(8,4) = 8! / (4! × 4!) = 70 ways

Binomial Theorem Application

Problem 6: Find the value of (1 + x)¹⁰ when x = 0.1

Solution: Using the binomial theorem:

(1 + 0.1)¹⁰ = ¹⁰C₀ + ¹⁰C₁(0.1) + ¹⁰C₂(0.1)² + … + ¹⁰C₁₀(0.1)¹⁰

≈ 2.5937 (rounded to 4 decimal places)

Permutation with Restrictions

Problem 7: How many ways can 8 people be seated in a row if 2 specific people must sit together?

Solution: Treat the 2 people as 1 unit. So we have 7 units to arrange.

7! × 2! = 5040 × 2 = 10,080 ways

Combination Problem

Problem 8: From a standard 52-card deck, how many 5-card hands contain exactly 2 hearts?

Solution: Choose 2 hearts from 13 hearts, and 3 non-hearts from 39 non-hearts.

C(13,2) × C(39,3) = 78 × 9139 = 712,842 hands

Binomial Probability

Problem 9: If the probability of a defective item is 0.1, what’s the probability of exactly 2 defectives in a sample of 5?

Solution: Use binomial probability formula:

P(X=2) = ⁵C₂ (0.1)² (0.9)³ = 10 × 0.01 × 0.729 = 0.0729 or about 7.29%

Permutation with Indistinguishable Objects:

Problem 10 : How many distinct ways can the letters of “MISSISSIPPI” be arranged?

Solution: 11! / (4! × 4! × 2!) = 34,650 ways

Applications in Engineering

1. Probability and Statistics

Permutations and combinations are used to calculate probabilities and analyze statistical data.

2. Computer Science

In algorithms and data structures, permutations and combinations are used for optimization and enumeration problems.

3. Operations Research

Permutations and combinations are used in resource allocation, scheduling, and optimization problems.

4. Cryptography

Permutations and combinations are used in encryption algorithms to create secure keys and ensure data integrity.

5. Network Design

In designing efficient networks, combinations are used to determine the optimal number of connections.

Conclusion – PnC and Binomial Coefficients

Permutations and combinations, along with binomial coefficients, are essential tools in combinatorics with wide-ranging applications in engineering, computer science, and other fields. Understanding these concepts allows for efficient problem-solving and optimization in various domains.

FAQs on PnC and Binomial Coefficients

What is the difference between permutations and combinations?

Permutations consider the order of objects, while combinations do not.

Binomial coefficients are the coefficients in the expansion of the binomial theorem and are calculated using combinations.

Can you give an example of permutations in real life?

Arranging books on a shelf in different orders is an example of permutations.

How are combinations used in probability?

Combinations are used to calculate the probability of selecting a specific group of items from a larger set.

Why are permutations and combinations important in computer science?

They are used in algorithms for optimization, data arrangement, and solving enumeration problems.

GATE CS Corner Questions on PnC and Binomial Coefficients

Practicing the following questions will help you test your knowledge. All questions have been asked in GATE in previous years or in GATE Mock Tests. It is highly recommended that you practice them. 

1. GATE CS 2007, Question 84 
2. GATE CS 2007, Question 85 
3. GATE CS 2003, Question 4 
4. GATE CS 2003, Question 5 



Previous Article
Next Article

Similar Reads

Mathematics | Generalized PnC Set 1
Prerequisite - PnC and Binomial Coefficients So far every problem discussed in previous articles has had sets of distinct elements, but sometimes problems may involve repeated use of elements. This article covers such problems, where elements of the set are indistinguishable (or identical or not distinct). Permutations with repetition -Counting per
6 min read
Mathematics | Generalized PnC Set 2
Prerequisite - Generalized PnC Set 1 Combinatorial problems can be rephrased in several different ways, the most common of which is in terms of distributing balls into boxes. So we must become familiar with the terminology to be able to solve problems. The balls and boxes can be either distinguishable or indistinguishable and the distribution can t
5 min read
Count odd and even Binomial Coefficients of N-th power
Given an integer N, the task is to count the number of even and odd binomial coefficients up to Nth power. Examples: Input: N = 4Output:Odd: 2Even: 3Explanation:The binomial coefficients are as follows:4C0 = 1, 4C1 = 4 , 4C2 = 6 , 4C3 = 4 , 4C4 = 1.Therefore, it can be observed that there exists exactly 2 odd and 3 even Binomial Coefficients. Input
9 min read
Sum of Binomial coefficients
Given a positive integer n, the task is to find the sum of binomial coefficient i.enC0 + nC1 + nC2 + ....... + nCn-1 + nCnExamples: Input : n = 4 Output : 16 4C0 + 4C1 + 4C2 + 4C3 + 4C4 = 1 + 4 + 6 + 4 + 1 = 16 Input : n = 5 Output : 32 Method 1 (Brute Force): The idea is to evaluate each binomial coefficient term i.e nCr, where 0 <= r <= n a
8 min read
Program for Binomial Coefficients table
Given an integer max, print Binomial Coefficients table that prints all binomial coefficients B(m, x) where m and x vary from 0 to maxExample : Input : max = 3 Output : 0 1 1 1 1 2 1 2 1 3 1 3 3 1 The easiest way to explain what binomial coefficients is to say that they count certain ways of grouping items. Specifically, the binomial coefficient B(
6 min read
Find sum of even index binomial coefficients
Given a positive integer n. The task is to find the sum of even indexed binomial coefficient. That is, nC0 + nC2 + nC4 + nC6 + nC8 + ...........Examples : Input : n = 4Output : 8Explanation: 4C0 + 4C2 + 4C4= 1 + 6 + 1= 8 Input : n = 6Output : 32 Method 1: (Brute Force) The idea is to find all the binomial coefficients and find only the sum of even
8 min read
Sum of squares of binomial coefficients
Given a positive integer n. The task is to find the sum of square of Binomial Coefficient i.e nC02 + nC12 + nC22 + nC32 + ......... + nCn-22 + nCn-12 + nCn2 Examples: Input : n = 4 Output : 70 Input : n = 5 Output : 252 Method 1: (Brute Force) The idea is to generate all the terms of binomial coefficient and find the sum of square of each binomial
9 min read
Sum of all products of the Binomial Coefficients of two numbers up to K
Given three integers N, M and K, the task is to calculate the sum of products of Binomial Coefficients C(N, i) and C(M, K - i), where i ranges between [0, K]. [Tex]\begin{*align} \sum_{i=0}^{k}C(n, i)*C(m, k-i) \label{sum} \end{*align} [/Tex] Examples: Input: N = 2, M = 2, K = 2 Output: 6 Explanation: C(2, 0) * C(2, 2) + C(2, 1) * C(2, 1) + C(2, 2)
8 min read
Sum of binomial coefficients (nCr) in a given range
Given three values, N, L and R, the task is to calculate the sum of binomial coefficients (nCr) for all values of r from L to R. Examples: Input: N = 5, L = 0, R = 3Output: 26Explanation: Sum of 5C0 + 5C1 + 5C2 + 5C3 = 1 + 5 + 10 + 10 = 26. Input: N = 3, L = 3, R = 3Output: 1 Approach(Using factorial function): Solve this problem by straightforward
8 min read
Sum of product of consecutive Binomial Coefficients
Given a positive integer n. The task is to find the sum of product of consecutive binomial coefficient i.e nC0*nC1 + nC1*nC2 + ..... + nCn-1*nCn Examples: Input : n = 3Output : 153C0*3C1 + 3C1*3C2 +3C2*3C3= 1*3 + 3*3 + 3*1= 3 + 9 + 3= 15Input : n = 4Output : 56Method 1: The idea is to find all the binomial coefficients up to nth term and find the s
15 min read
Mathematics | Probability Distributions Set 4 (Binomial Distribution)
The previous articles talked about some of the Continuous Probability Distributions. This article covers one of the distributions which are not continuous but discrete, namely the Binomial Distribution. Introduction - To understand the Binomial distribution, we must first understand what a Bernoulli Trial is. A Bernoulli trial is a random experimen
5 min read
Sum of product of r and rth Binomial Coefficient (r * nCr)
Given a positive integer n. The task is to find the sum of the product of r and rth Binomial Coefficient. In other words find: ? (r * nCr), where 0 <= r <= n.Examples: Input : n = 2 Output : 4 0.2C0 + 1.2C1 + 2.2C2 = 0*2 + 1*2 + 2*1 = 4 Input : n = 5 Output : 80 Method 1 (Brute Force) : The idea is to iterate a loop i from 0 to n and evaluate
9 min read
Space and time efficient Binomial Coefficient
Here the function takes two parameters n and k and returns the value of Binomial Coefficient C(n, k). Example: Input: n = 4 and k = 2 Output: 6 Explanation: 4 C 2 is 4!/(2!*2!) = 6Input: n = 5 and k = 2 Output: 10 Explanation: 5 C 2 is 5!/(3!*2!) = 10 We have discussed O(n*k) time and O(k) extra space algorithm in this post. The value of C(n, k) ca
6 min read
Middle term in the binomial expansion series
Given three integers A, X, and n. The task is to find the middle term in the binomial expansion series. Examples: Input : A = 1, X = 1, n = 6Output : MiddleTerm = 20 Input : A = 2, X = 4, n = 7Output : MiddleTerm1 = 35840, MiddleTerm2 = 71680 Approach (A + X)n = nC0 An X0 + nC1 An-1 X1 + nC2 An-2 X2 + ......... + nCn-1 A1 Xn-1 + nCn A0 Xn Total num
11 min read
Maximum binomial coefficient term value
Given a positive integer n. The task is to find the maximum coefficient term in all binomial coefficient. The binomial coefficient series is nC0, nC1, nC2, ...., nCr, ...., nCn-2, nCn-1, nCn the task is to find maximum value of nCr. Examples: Input : n = 4 Output : 6 4C0 = 1 4C1 = 4 4C2 = 6 4C3 = 1 4C4 = 1 So, maximum coefficient value is 6. Input
11 min read
Program to print binomial expansion series
Given three integers, A, X and n, the task is to print terms of below binomial expression series. (A+X)n = nC0AnX0 + nC1An-1X1 + nC2An-2X2 +....+ nCnA0Xn Examples: Input : A = 1, X = 1, n = 5 Output : 1 5 10 10 5 1 Input : A = 1, B = 2, n = 6 Output : 1 12 60 160 240 192 64 Simple Solution : We know that for each value of n there will be (n+1) term
12 min read
Central binomial coefficient
Given an integer N, the task is to find the [Tex]N^{th} [/Tex]Central binomial coefficient. The first few Central binomial coefficients for N = 0, 1, 2, 3... are 1, 2, 6, 20, 70, 252, 924, 3432..... Examples: Input: N = 3 Output: 20 Explanation: [Tex]N^{th} [/Tex]Central Binomial Coefficient = [Tex]\binom{2N}{N} [/Tex]= [Tex]\binom{2*3}{3} [/Tex]=
5 min read
Binomial Coefficient | DP-9
The following are the common definitions of Binomial Coefficients. A binomial coefficient C(n, k) can be defined as the coefficient of x^k in the expansion of (1 + x)^n. A binomial coefficient C(n, k) also gives the number of ways, disregarding order, that k objects can be chosen from among n objects more formally, the number of k-element subsets (
15+ min read
Mathematics | Unimodal functions and Bimodal functions
Unimodal Function : A function f(x) is said to be unimodal function if for some value m it is monotonically increasing for x≤m and monotonically decreasing for x≥m. For function f(x), maximum value is f(m) and there is no other local maximum. See figure (A) and (B): In figure (A), graph has only one maximum point and rest of the graph goes do
2 min read
Mathematics | Rings, Integral domains and Fields
Prerequisite - Mathematics | Algebraic Structure Ring - Let addition (+) and Multiplication (.) be two binary operations defined on a non empty set R. Then R is said to form a ring w.r.t addition (+) and multiplication (.) if the following conditions are satisfied: (R, +) is an abelian group ( i.e commutative group) (R, .) is a semigroup For any th
7 min read
Application of Derivative - Maxima and Minima | Mathematics
The Concept of derivative can be used to find the maximum and minimum value of the given function. We know that information about and gradient or slope can be derived from the derivative of a function. We try to find a point which has zero gradients then locate maximum and minimum value near it. It is of use because it can be used to maximize profi
3 min read
Subgroup and Order of Group | Mathematics
In mathematics, a group is a fundamental algebraic structure consisting of a set of elements combined with a binary operation that satisfies four key properties: closure, associativity, identity, and invertibility. An example of a group is the set of integers under addition. In this case, the binary operation is addition (+), the identity element i
7 min read
Cayley Table and Cyclic Group | Mathematics
Cyclic groups are a foundational concept in group theory, a branch of abstract algebra that studies algebraic structures known as groups. A cyclic group is a group that can be generated by a single element, meaning every element in the group can be expressed as a power (or multiple) of this generator. This generator is often referred to as the "pri
6 min read
Graph Isomorphisms and Connectivity | Engineering Mathematics
Graph theory is a fundamental area in mathematics and computer science, which studies the properties of graphs and their applications. Two essential concepts in graph theory are graph isomorphisms and connectivity. Graph isomorphisms help determine if two graphs are structurally identical, while connectivity measures the degree to which the vertice
3 min read
Partial Orders and Lattices (Set-2) | Mathematics
Partial orders and lattices are important concepts in discrete mathematics and are widely used in computer science, especially in data structures, database theory, and the theory of computation. Partial orders and lattices play pivotal roles in a wide array of applications within engineering, computer science, and beyond. These structures enable th
9 min read
Mathematics | Euler and Hamiltonian Paths
Euler and Hamiltonian paths are fundamental concepts in graph theory, a branch of mathematics that studies the properties and applications of graphs. An Euler path visits every edge of a graph exactly once, while a Hamiltonian path visits every vertex exactly once. These paths have significant applications in various fields, including computer scie
9 min read
PDNF and PCNF in Discrete Mathematics
PDNF (Principal Disjunctive Normal Form)It stands for Principal Disjunctive Normal Form. It refers to the Sum of Products, i.e., SOP. For eg. : If P, Q, and R are the variables then (P. Q'. R) + (P' . Q . R) + (P . Q . R') is an example of an expression in PDNF. Here '+' i.e. sum is the main operator. You might be confused about whether there exist
4 min read
Mathematics | Sequence, Series and Summations
Sequences, series, and summations are fundamental concepts of mathematical analysis and it has practical applications in science, engineering, and finance. Table of Content What is Sequence?Theorems on SequencesProperties of SequencesWhat is Series?Properties of SeriesTheorems on SeriesSummation DefinitionProperties of Summation FormulaExamples of
8 min read
Mathematics | Independent Sets, Covering and Matching
Mathematics | Independent Sets, Covering and Matching1. Independent SetsA set of vertices I is called an independent set if no two vertices in set I are adjacent to each other in other words the set of non-adjacent vertices is called an independent set.It is also called a stable set.The parameter α0(G) = max { |I|: I is an independent set in G } is
5 min read
Mathematics | Power Set and its Properties
For a given set S, Power set P(S) or 2^S represents the set containing all possible subsets of S as its elements. For example, S = {1, 2, 3} P(S) = {ɸ, {1}, {2}, {3} {1,2}, {1,3}, {2,3}, {1,2,3}} Number of Elements in Power SetFor a given set S with n elements, number of elements in P(S) is 2^n. As each element has two possibilities (present or abs
6 min read