Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Sequences and Series
Next article icon

Permutations and Combinations

Last Updated : 29 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Permutation and Combination are the most fundamental concepts in mathematics related to picking items from a group or set.

  • Permutation is arranging items considering the order of selection from a certain group.
  • Combination is selecting items without considering order.
  • For example, in the below diagram, PQ and QP are different in permutation but same in combination. Therefore we have more permutations than combinations.
Permutation-an-Combination
Permutations and Combinations

Table of Content

  • Permutation Meaning
  • Combination Meaning
  • Derivation of Permutation and Combination Formulas
  • Difference Between Permutation and Combination
  • Solved Examples on Permutation and Combination

Permutation Meaning

Permutation is the distinct interpretations of a provided number of components carried one by one, or some, or all at a time. For example, if we have two components A and B, then there are two likely performances, AB and BA.

A numeral of permutations when ‘r’ components are positioned out of a total of ‘n’ components is n Pr. For example, let n = 3 (A, B, and C) and r = 2 (All permutations of size 2). Then there are 3P2 such permutations, which is equal to 6. These six permutations are AB, AC, BA, BC, CA, and CB. The six permutations of A, B, and C taken three at a time are shown in the image added below:

Permutation of Two elements out of A, B, and C
Permutation Meaning

Permutation Formula

Permutation formula is used to find the number of ways to pick r things out of n different things in a specific order, and replacement is not allowed, and is given as follows:

Permutation Formula
Permutation Formula

Explanation of Permutation Formula

As we know, permutation is an arrangement of r things out of n where the order of arrangement is important( AB and BA are two different permutations). If there are three different numerals 1, 2 and 3 and if someone is curious to permute the numerals taking 2 at a moment, it shows (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), and (3, 2). That it can be accomplished in 6 methods. 

Here, (1, 2) and (2, 1) are distinct. Again, if these 3 numerals shall be put handling all at a time, then the interpretations will be (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2) and (3, 2, 1) i.e. in 6 ways. 

In general, n distinct things can be set taking r (r < n) at a time in n(n - 1)(n - 2)...(n - r + 1) ways. In fact, the first thing can be any of the n things. Now, after choosing the first thing, the second thing will be any of the remaining n - 1 things. Likewise, the third thing can be any of the remaining n - 2 things. Alike, the rth thing can be any of the remaining n - (r - 1) things. 

Hence, the entire number of permutations of n distinct things carrying r at a time is n(n - 1)(n - 2)...[n - (r - 1)], which is written as n Pr. Or, in other words, 

\bold{{}^nP_r = \frac{n!}{(n-r)!} }

Combination Meaning

It is the distinct sections of a shared number of components carried one by one, or some, or all at a time. For example, if there are two components A and B, then there is only one way to select two things, select both of them.

For example, let n = 3 (A, B, and C) and r = 2 (All combinations of size 2). Then there are 3C2 such combinations, which is equal to 3. These three combinations are AB, AC, and BC.

Here, the combination of any two letters out of three letters A, B, and C is shown below, we notice that in combination the order in which A and B are taken is not important as AB and BA represent the same combination.

what is combination
Combination Example

Note: In the same example, we have distinct points for permutation and combination. For, AB and BA are two distinct items i.e., two distinct permutation, but for selecting, AB and BA are the same i.e., same combination.

Combination Formula

Combination Formula is used to choose ‘r’ components out of a total number of ‘n’ components, and is given by:

Combination Formula
Combination Formula

Using the above formula for r and (n-r), we get the same result. Thus,

\bold{{}^nC_r = {}^nC_{(n-r)}}

Explanation of Combination Formula

Combination, on the further hand, is a type of pack. Again, out of those three numbers 1, 2, and 3 if sets are created with two numbers, then the combinations are (1, 2), (1, 3), and (2, 3). 

Here, (1, 2) and (2, 1) are identical, unlike permutations where they are distinct. This is written as 3C2. In general, the number of combinations of n distinct things taken r at a time is, 

\bold{{}^nC_r = \frac{n!}{r!\times(n-r)!} = \frac{{}^nP_r}{r!}}

Derivation of Permutation and Combination Formulas

We can derive these Permutation and Combination formulas using the basic counting methods, as these formulas represent the same thing. Derivation of these formulas is as follows:

Derivation of Permutations Formula

Permutation is selecting r distinct objects from n objects without replacement, and where the order of selection is important. By the fundamental theorem of counting and the definition of permutation, we get

P (n, r) = n . (n-1) . (n-2) . (n-3).  . . .  .(n-(r+1))

By multiplying and dividing above with (n-r)! = (n-r).(n-r-1).(n-r-2).  . . .  .3. 2. 1, we get

P (n, r) = [n.(n−1).(n−2)….(nr+1)[(n−r)(n−r−1)(n-r)!] / (n-r)!

⇒ P (n, r) = n!/(n−r)!

Thus, the formula for P (n, r) is derived.

Derivation of Combinations Formula

Combination is choosing r items out of n items when the order of selection is of no importance. Its formula is calculated as,

C(n, r) = Total Number of Permutations /Number of ways to arrange r different objects. 
[Since by the fundamental theorem of counting, we know that number of ways to arrange r different objects in r ways = r!]

C(n,r) = P (n, r)/ r!

⇒ C(n,r) = n!/(n−r)!r!

Thus, the formula for Combination i.e., C(n, r) is derived.

Read in Detail - [Combinations Formulas in Maths]

Permutation Vs Combination

Differences between permutation and combination can be understood by the following table:

Permutation

Combination

In Permutation order of arrangement is important.
For example, AB and BA are different combinations.
In Combination order of arrangement is not important.
For example, AB and BA are the same combinations.
A permutation is used when different kinds of things 
are to be sorted or arranged.
Combinations are used when the same kind of things are to
be sorted.
Permutation of two things out of three given things 
a, b, c is ab, ba, bc, cb, ac, ca.
The combination of two things from the three given things
a, b, c is ab, bc, ca.
Formula for permuation is: n Pr = n!/(n - r)!The formula for Combination is:  n Cr = n! /{r! × (n - r)!}

Also Check,

  • Binomial Theorem
  • Binomial Expansion
  • Binomial Random Variables
  • Fundamental Theorem of Counting

Solved Examples on Permutation and Combination

Example 1: Find the number of permutations and combinations of n = 9 and r = 3.

Solution: 

Given, n = 9, r = 3

Using the formula given above:

For Permutation:

nPr = (n!) / (n - r)! 
⇒ nPr = (9!) / (9 - 3)! 
⇒ nPr = 9! / 6! = (9 × 8 × 7 × 6! )/ 6! 
⇒ nPr = 504

For Combination:

nCr = n!/r!(n − r)!
⇒ nCr = 9!/3!(9 − 3)!
⇒ nCr = 9!/3!(6)!
⇒ nCr = 9 × 8 × 7 × 6!/3!(6)!

⇒ nCr = 84

Example 2: In how many ways can a committee consisting of 4 men and 2 women can be chosen from 6 men and 5 women?

Solution:

  • Choose 4 men out of 6 men = 6C4 ways = 15 ways
  • Choose 2 women out of 5 women = 5C2 ways = 10 ways

The committee can be chosen in 6C4 × 5C2  = 150 ways.

Example 3: In how many ways can 5 different books be arranged on a shelf?

Solution: 

This is a permutation problem because the order of the books matters. 

Using the permutation formula, we get:
5P5 = 5! / (5 - 5)! = 5! / 0! = 5 x 4 x 3 x 2 x 1 = 120

Therefore, there are 120 ways to arrange 5 different books on a shelf.

Example 4: How many 3-letter words can be formed using the letters from the word "FABLE"?

Solution: 

This is a permutation problem because the order of the letters matters. 

Using the permutation formula, we get:
5P3 = 5! / (5 - 3)! = 5! / 2! = 5 x 4 x 3 = 60

Therefore, there are 60 3-letter words that can be formed using the letters from the word "FABLE".

Example 5: A committee of 5 members is to be formed from a group of 10 people. In how many ways can this be done?

Solution: 

This is a combination problem because the order of the members doesn't matter. 

Using the combination formula, we get:

10C5 = 10! / (5! x (10 - 5)!) = 10! / (5! x 5!) 
⇒10C5= (10 x 9 x 8 x 7 x 6) / (5 x 4 x 3 x 2 x 1) = 252

Therefore, there are 252 ways to form a committee of 5 members from a group of 10 people.

Example 6: A pizza restaurant offers 4 different toppings for their pizzas. If a customer wants to order a pizza with exactly 2 toppings, in how many ways can this be done?

Solution: 

This is a combination problem because the order of the toppings doesn't matter. 

Using the combination formula, we get:
4C2 = 4! / (2! x (4 - 2)!) = 4! / (2! x 2!) = (4 x 3) / (2 x 1) = 6

Therefore, there are 6 ways to order a pizza with exactly 2 toppings from 4 different toppings.

Example 7: How many considerable words can be created by using 2 letters from the term“LOVE”?

Solution: 

The term “LOVE” has 4 distinct letters.

Therefore, required number of words = 4P2 = 4! / (4 – 2)!

Required number of words = 4! / 2! = 24 / 2

⇒ Required number of words = 12

Example 8: Out of 5 consonants and 3 vowels, how many words of 3 consonants and 2 vowels can be formed?

Solution:

Number of ways of choosing 3 consonants from 5 = 5C3
Number of ways of choosing 2 vowels from 3 = 3C2
Number of ways of choosing 3 consonants from 2 and 2 vowels from 3 = 5C3 × 3C2

⇒ Required number = 10 × 3
= 30

It means we can have 30 groups where each group contains a total of 5 letters (3 consonants and 2 vowels).

Number of ways of arranging 5 letters among themselves
= 5! = 5 × 4 × 3 × 2 × 1 = 120

Hence, the required number of ways = 30 × 120

⇒ Required number of ways = 3600

Example 9: How many different combinations do you get if you have 5 items and choose 4?

Solution:

Insert the given numbers into the combinations equation and solve. “n” is the number of items that are in the set (5 in this example); “r” is the number of items you’re choosing (4 in this example):

C(n, r) = n! / r! (n – r)! 
⇒ nCr = 5! / 4! (5 – 4)!
⇒ nCr = (5 × 4 × 3 × 2 × 1) / (4 × 3 × 2 × 1 × 1)
⇒ nCr = 120/24 
⇒ nCr = 5

The solution is 5.

Example 10: Out of 6 consonants and 3 vowels, how many expressions of 2 consonants and 1 vowel can be created?

Solution:

Number of ways of selecting 2 consonants from 6 = 6C2
Number of ways of selecting 1 vowels from 3 = 3C1
Number of ways of selecting 3 consonants from 7 and 2 vowels from 4.
⇒ Required ways = 6C2 × 3C1
⇒ Required ways = 15 × 3
⇒ Required ways= 45

It means we can have 45 groups where each group contains a total of 3 letters (2 consonants and 1 vowels).

Number of ways of arranging 3 letters among themselves = 3! = 3 × 2 × 1
⇒ Required ways to arrenge three letters = 6

Hence, the required number of ways = 45 × 6

⇒ Required ways = 270

Example 11: In how many distinct forms can the letters of the term 'PHONE' be organized so that the vowels consistently come together?

Solution:

The word 'PHONE' has 5 letters. It has the vowels 'O',' E', in it and these 2 vowels should consistently come jointly. Thus these two vowels can be grouped and viewed as a single letter. That is, PHN(OE).

Therefore we can take total letters like 4 and all these letters are distinct.

Number of methods to organize these letters = 4! = 4 × 3 × 2 × 1
⇒ Required ways arrenge letters = 24

All the 2 vowels (OE) are distinct.

Number of ways to arrange these vowels among themselves = 2! = 2 × 1
⇒ Required ways to arrange vowels = 2

Hence, the required number of ways = 24 × 2
⇒ Required ways = 48.

Practice Questions - Permutations and Combinations

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

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

Question 3: How many 4-digit PIN codes can be created using the digits 0-9 if repetition is allowed?

Question 4: A pizza shop offers 8 toppings. How many different 3-topping pizzas can be made?

Question 5: In how many ways can 6 people be seated at a round table?

Question 6: How many ways are there to select 2 boys and 3 girls from a class of 5 boys and 6 girls?

Question 7: How many different 5-card hands can be dealt from a standard 52-card deck?

Question 8: In how many ways can the letters of the word "MATHEMATICS" be arranged?

Question 9: A bag contains 5 red marbles, 3 blue marbles, and 2 green marbles. How many ways are there to select 4 marbles?

Question 10: How many ways are there to arrange the letters in the word "MISSISSIPPI"?

Summary

Permutations and combinations are fundamental concepts in probability and statistics used to calculate the number of possible outcomes in various scenarios. Permutations deal with arrangements where order matters, calculated using the formula P(n,r) = n! / (n-r)!, where n is the total number of items and r is the number being arranged. Combinations, on the other hand, focus on selections where order is irrelevant, using the formula C(n,r) = n! / (r! * (n-r)!). The key difference lies in whether the order of selection is important. Factorials, denoted as n!, play a crucial role in both calculations, representing the product of all positive integers up to and including n. These concepts find applications in diverse fields, from creating PIN codes and arranging seating plans (permutations) to selecting team members and calculating lottery odds (combinations). Understanding when to apply each concept is essential for solving problems involving counting and probability in both academic and real-world contexts.


Next Article
Sequences and Series

C

chhabradhanvi
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Class 12
  • Permutation and Combination
  • Maths-Formulas
  • Maths-Class-12

Similar Reads

    Simplification and Approximation

    Profit & Loss

    Profit and Loss - Aptitude Questions and Answers
    Question 1: A person buys a pen from a wholesaler at Rs. 10 for 20 pens. He sells those pens at Rs. 10 for 15 pens. Find his profit or loss percent. Solution: CP for each pen = 10 / 20 = Rs. 0.50SP for each pen = 10 / 15 = Rs. 2 / 3 Profit = SP - CP = Rs. (2 / 3) - 0.50 = Rs. 1 / 6 Therefore, profit
    5 min read

    Mixtures & Alligations

    Mixture and Alligation - Solved Questions and Answers
    Question 1: From a vessel of 20 liters of pure milk, 1 liter is taken out and replaced with water, so as to keep the volume constant at 20 liters. This process is repeated 5 times. Find the percentage of pure milk left in the vessel after 5 replacements. Solution: Here, we need to apply the formula
    3 min read

    Permutation and Combination

    Permutations and Combinations
    Permutation and Combination are the most fundamental concepts in mathematics related to picking items from a group or set. Permutation is arranging items considering the order of selection from a certain group.Combination is selecting items without considering order.For example, in the below diagram
    14 min read
    Time and Work - Aptitude Questions and Answers
    Time and Work is one of the most basic concepts in Quantitative Aptitude, which is tested extensively in government exams. Undoubtedly, having a strong background in this topic can give candidates an upper hand and help them to score well in competitive exams. A candidate needs to be aware of the ba
    13 min read

    Sequence & Series

    Sequences and Series
    A sequence is an ordered list of numbers following a specific rule. Each number in a sequence is called a "term." The order in which terms are arranged is crucial, as each term has a specific position, often denoted as an​, where n indicates the position in the sequence.For example:2, 5, 8, 11, 14,
    10 min read
    Sequences and Series Formulas
    Sequences and Series Formulas: In mathematics, sequence and series are the fundamental concepts of arithmetic. A sequence is also referred to as a progression, which is defined as a successive arrangement of numbers in an order according to some specific rules. A series is formed by adding the eleme
    10 min read
    Special Series in Maths - Sequences and Series | Class 11 Maths
    Special Series: A series can be defined as the sum of all the numbers of the given sequence. The sequences are finite as well as infinite. In the same way, the series can also be finite or infinite. For example, consider a sequence as 1, 3, 5, 7, … Then the series of these terms will be 1 + 3 + 5 +
    10 min read

    Simple Interest & Compound Interest

    Simple Interest - Solved Questions and Answers
    Question 1: What would be the annual interest accrued on a deposit of Rs. 10,000 in a bank that pays a 4 % per annum rate of simple interest?Solution : Here, P = 10000, R = 4, T = 1SI = P x R x T / 100SI = 10000 x 4 x 1 / 100SI = 400Thus, the annual interest would be Rs. 400Question 2: A sum of mone
    4 min read
    Compound Interest - Solved Questions and Answers
    Question 1: Find the compound interest on Rs. 10,000 at 10% per annum for a time period of three and a half years.Solution:Time period of 3 years and 6 months means for 3 years, the interest is compounded yearly and for the remaining 6 months, the interest is compounded half-yearly. This means that
    6 min read
    Simple Interest
    Simple Interest (SI) is a method of calculating the interest charged or earned on a principal amount over a fixed period. It is calculated based solely on the principal amount, which remains unchanged throughout the calculation.Simple Interest is widely used across industries such as banking, financ
    9 min read
    Monthly Compound Interest Formula
    Interest is the extra amount of fees paid to borrow money or any other assets. Interest is paid on a monthly, quarterly, or annual basis. The interest earned depends on the time for which money is invested, the amount of money invested, and the rate at which money is invested.Two common types of int
    5 min read
    Daily Compound Interest Formula with Examples
    Compound interest is interest earned on both the principal and interest over a specific period. The interest that accumulates on a principal over time is equally accounted for as the principal. Furthermore, the following period's interest calculation is based on the cumulative principal value. It is
    6 min read
    Surd and Indices in Mathematics
    Indices and surds are very important ideas in math, specifically within algebra. They are useful when it comes to reducing expressions and resolving equations with different roots or powers involved. To be able to deal with various mathematical problems that range from simple algebraic ones to compl
    6 min read

    Mensuration _ Cylinder, Cone, Sphere

    Mensuration Formulas
    Mensuration is the branch of geometry that deals with the measurement of area, length, or volume in 2D and 3D shapes. The 2D and 3D shapes are often called geometric shapes. In this article, we have curated all the mensuration formulas for various 2-D and 3-D shapes in detail.Mensuration FormulasTyp
    10 min read
    Mensuration 3D | Set-2
    Question 1: If the diagonal of cube is √18 cm, then its volume is Solution : Let the side of the cube is x cm. We know diagonal of cube = a√3 cm Put equal both a√3 = √18 Squaring both sides a2(3) = 18 a2 = 6 a = √6 Volume of the cube = a3 = (√6)3 = 6√6 cm3 Question 2: The areas of three consecutive
    7 min read
    Area of Polygons
    Area of the Polygon is the area enclosed by the boundary of the polygon. A polygon is a closed, two-dimensional shape with straight sides. Each side of a polygon is a line segment, and the points where the sides meet are called vertices.Area of PolygonsA polygon is a figure formed by joining 'n' str
    14 min read

    Time, Speed, & Distance

    Speed, Time and Distance – Solved Questions and Answers
    Question 1: A runner can complete a 750 m race in two and a half minutes. Will he be able to beat another runner who runs at 17.95 km/hr? Solution: We are given that the first runner can complete a 750 m race in 2 minutes and 30 seconds or 150 seconds. Speed of the first runner = 750 / 150 = 5 m / s
    7 min read
    Speed Time Distance Formula
    Speed, Distance, and Time are the three most important physical quantities which are of utmost importance in Kinematics. The three quantities Speed, Distance, and Time are related to each other through a unique relation called as Time Speed Distance Formula abbreviated as TSD Formula. The Speed Dist
    12 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences