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

Permutation

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

In Mathematics, Permutation is defined as a mathematical concept that determines the number of possible arrangements for a specific set of elements. therefore, it plays a big role in computer science, cryptography, and operations research.

For example, take a set {1, 2, 3}:
All Permutations taking all three objects are {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}.
All Permutations taking two objects at a time are, {1, 2}, {1, 3}, {2, 3}, {3, 2}, {3, 1}, {2, 1}.
Note: In Permutations, order matters, for example (2, 1) and (1, 2) are counted as different.

How to Calculate Permutations

Calculating permutations involves figuring out how many different ways you can arrange a set of items where the order matters.

Permutation Formula

The permutation formula is used to calculate the number of ways to arrange a subset of objects from a larger set where the order of selection matters.

The formula for Permutation is given as follows,

Permutation

Some of the most common representations or notations are as follows:

  • P(n, r)
  • nPr
  • nPr
  • Pn, k

What is Factorial?

The factorial of a natural number n is denoted by the notation n! which represents the product of all natural numbers starting from 1 till n, including 1 and n. i.e. n! = n × (n-1) × (n-2) × (n-3) . . . × 1.

For example, If n = 3, then 3! = 3 × 2 × 1 = 6, and If n = 5 then 5! = 5 × 4 × 3 × 2 × 1 = 120.

Note: The factorial of 0 is defined as 1 by convention, i.e.

0! = 1

Derivation of Permutation Formula

To derive the formula for permutation, we can use the first principle of counting

If an event can occur in m different ways, and another event can occur in n different ways, then the total number of occurrences of the events is m × n.

By the definition of permutation and the principle of counting, we know

nPr = n × (n - 1)  . . .  (n - r + 1)

This product is exactly:

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

Note that there are n ways to pick an item for the first position, (n - 1) ways to pick the second and so on

Multiplying and dividing by (n - r)! on the LHS, we get

nPr = n × (n - 1) × (n - 2) × . . . × (n - r + 1) × (n - r)! / (n - r)!

⇒ nPr = n × (n - 1) × (n - 2) × . . . × (n - r + 1) × (n - r) × (n - r - 1) × . . . × 1 / (n - r)!

⇒ nPr = n! / (n - r)! where  0 ≤ r ≤ n

Permutation Examples in Real Life

Some real-life examples of Permutation include password generation, seating arrangements, shuffling cards, phone numbers, lock combinations, etc.

Properties of Permutations

Some of the common properties of permutations are listed as follows:

  • nPn = n (n-1) (n-2) . . . 1 = n!
  • nP0 = n! / n! = 1
  • nP1 = n
  • nPn - 1 = n!/1
  • nPr / nPr-1 = n - r + 1
  • nPr =n × n-1Pr-1 = n × (n-1) × n-2Pr-2 = n × (n-1) × (n-2) × n-3Pr-3 = and so on.
  • n-1Pr + r × n-1Pr-1 = nPr

Solved Examples of Permutation

Permutation-2

Let's consider some problems based on the derived formula to better understand its use.

Example 1: Find 6P3

As per the formula,

nPr = n! / (n - r)!
6P3 = 6! / (3!)
= 6 × 5 × 4 = 120

Example 2: Find n if nP2 = 12

nPr = n! / (n - r)!

⇒ nP2 = n! / (n - 2)!
⇒ nP2 = n × (n - 1) × (n - 2)! / (n - 2)!
⇒ nP2 = n × (n - 1)
⇒ nP2 = n2 - n
∴ n2 - n = 12

Solving the equation,

n2 - n - 12 = 0
⇒ n (n - 4) + 3 (n - 4) = 0
⇒ (n + 3) (n - 4) = 0
∴ n = -3 or n = 4
∵ n ≥ 0

Thus, n = 4

Types of Permutation

In the study of permutation, there are some cases such as:

  • Permutation with Repetition
  • Permutation without Repetition
  • Permutation of Multi-Sets

Let's explain these cases in detail with solved examples as follows:

Permutation With Repetition

This is the simplest of the lot. In such problems, the objects can be repeated. Let's understand these problems with some examples.

Example: How many 3-digit numbers greater than 500 can be formed using 3, 4, 5, and 7?

Since a three-digit number greater than 500 will have either 5 or 7 at its hundredth place, we have 2 choices for this place.

There is no restriction on the repetition of the digits hence, for the remaining 2 digits; we have 4 choices for each

So the total permutations are,

2 × 4 × 4 = 32

Permutation Without Repetition

In this class of problems, the repetition of objects is not allowed. Let's understand these problems with some examples.

Example: How many 3-digit numbers divisible by 3 can be formed using the , digits 2, 4, 6, and 8 without repetition?

For a number to be divisible by 3, the sum of it digits must be divisible by 3

From the given set, various arrangements like 444 can be formed but since repetition isn't allowed we won't be considering them.

We are left with just 2 cases i.e. 2, 4, 6 and 4, 6, 8

Number of arrangements are 3! in each case

Hence the total number of permutations are: 3! + 3! = 12

Permutation of Multi-Sets

A permutation is when the objects are not distinct

This can be thought of as the distribution of n objects into r boxes where the repetition of objects is allowed and any box can hold any number of objects.

1st  box can hold n objects

2nd box can hold n objects

3rd box can hold n objects
.                                          . 
.                                          . 
.                                          . 

rth box can hold n objects

Hence the total number of arrangements is,

n × n × n . . . (r times) = nr

Examples: A police officer visits the crime scene 3 times a week for investigation. Find the number of ways to schedule his visit if there is no restriction on the number of visits per day?

Number of ways to schedule first visit is 7 (any of the 7 days)

Number of ways to schedule second visit is 7 (any of the 7 days)

Number of ways to schedule third visit is 7 (any of the 7 days)

Hence, the number of ways to schedule first and second and third visit is

7 × 7 × 7 = 73 = 343

Permutation and Combination

Permutation and Combination are the two most fundamental concepts in combinatorics, as these lay the foundation of this branch of mathematics. Combinatorics deals with all the mathematics which we need to solve problems based on selection, arrangement, and operation within a finite or discrete system.

Permutation-an-Combination
Permutaion and Combination Example

Relation Between nPr and nCr

We can understand nCr through the following analogy. Consider that we have n distinct boxes and r identical balls. (n > r)

The task is to place all the r balls into boxes such that no box contains more than 1 ball.

As all r objects are the same, the r! Ways of arranging them can be considered as a single way.

To group all r! ways of arranging, we divide nPr by r!

nCr = nPr/r! = n!/{(n - r)! × r!}

Hence, the relation between nPr and nCr is,

nCr = nPr/r!

Permutation vs Combination

The key differences between permutation and combination, some of those differences are listed as follows:

Aspect

Permutations

Combinations

DefinitionArrangements of elements in a specific order.Selections of elements without considering the order.
FormulanPr = n!​/(n−r)!nPr = n!​/[(n−r)! × r!]
NotationnPr  OR P(n, r)nCr  OR C(n, r)
Order MattersYes, order matters.No, the order doesn't matter.
ExampleArranging books on a shelf.Selecting members for a committee.
Sample ProblemsHow many ways to arrange 3 books out of 5?How many ways to choose 2 fruits from a basket of 7?
ApplicationPermutations are used when order matters, 
such as when arranging items in a sequence or forming a code.
Combinations are used when order doesn't matter, 
like selecting a group of people or choosing items without caring about their order.

Learn more: Permutation vs Combination

Fundamental Counting Principle

Fundamental principle of the counting states that, "To perform a operation if we have m ways and to perform second operation if we have n different ways then to perform both the operation together there are m × n different ways."

We can also extend the principle of counting for more operations such that, if for 1 operation we have m, 2 operation we have n, for third operation we have o, different ways respectively than, for performing all the operation together we have m × n × o ways.

People Also Read:

  • Combinations
  • Binomial Theorem
  • Probability

Permutation and Combinations Class 11

By understanding these above concepts and practicing various problems, you'll be well-prepared to tackle questions on permutations and combinations in your Class 11 math exams.

Resources related to Permutations Class 11:

  • Permutations and Combinations Class 11 Notes
  • Permutations and Combinations Class 11 NCERT Solutions

Solved Problems of Permutation

Problem 1. How many 4-letter words, with or without meaning? Can be formed out of the letters of the word, 'SATURDAY' if repetition of letters is not allowed?

Solution:

Word SATURDAY has 8 letters i.e. S, A, T, U, R, D, A, and Y

To form 4-letter words, we first have to select 4 letters from these 8 letters

The ways of selecting 4 letters from 8 letters disregarding the order is 8C4 .

After selection, there are 4! arrangements.

Hence, total number of words formed are: 8C4 × 4!

Note: Selecting r objects out of n objects and then arranging them is same as r-permutation of n objects.

Problem 2. Find the number of ways of selecting 6 balls from 4 red, 6 blue, and 5 white given that the selection must have 2 balls of each color.,

Solution:

We need to select 2 balls each of color red, blue and white as per the given condition.

Number of ways of selecting 2 red balls is 4C2

Number of ways of selecting 2 blue balls is 6C2

Number of ways of selecting 2 white balls is 5C2

Hence, the total ways of selection are 4C2 × 6C2 × 5C2  = 900

Problem 3. A class has just 3 seats vacant. Three people, P, A, and R, arrive at the same time. In how many ways can P, A, and R be arranged on those 3 vacant seats?

Solution:

For the very first seat, we have 3 choices i.e. P, A and R.

Let us randomly select A for the first seat.

For the second seat, we have 2 choices i.e. P and R

Let us randomly select R for the second seat.

For the third seat, we have 1 choice i.e. P

To summarize, we did the following:

Placed a person on seat 1 and placed a person on seat 2 and placed a person on seat 3.

Usage of and comes from the fact that occupation of all 3 seats was mandatory.

In mathematics, and is related with multiplication, hence we can say that total choices = 3 × 2 × 1 = 3!

If we change the seating order to P on the first seat, A on the second seat, and R on the third, does that change the total number of choices?

No, it does not. This is because equal importance is given to all three P, A, and R.

Problem 4. Find the number of ways of arranging 5 people if 2 of them always sit together.

Solution:

Let us consider the 2 people as a unit and the remaining 3 person as 3 separate units, So we have total 4 units.

Number of ways of arranging these 4 units is 4!

(just the way we proved in previous problem)

Number of ways of arranging the 2 person amongst themselves is 2!

In conclusion, the number of ways of arranging the 4 units and 2 person amongst themselves is 4! × 2!

Problem 5. Find all the three-letter words beginning and ending with a vowel. Given that repetition of alphabets is not allowed.

Solution:

Total vowels in english = 7 ( a, e, i, o, u, y, w)

Total consonants in english = 26 - 7 = 19

  • Choices for the first letter are 7
  • Choices for the third letter are 6 (since 1 vowel was placed as first letter)
  • Choices for the middle letter are 19 + (7 - 2) = 24 (19 consonants + the vowels which were not placed)

Hence, total permutations are 7 × 6 × 24 = 1008

Do observe that here we first satisfied the vowel condition for first and third letter and then placed the middle letter.

Problem 6. An ice-cream shop has 10 flavors of ice cream. Find the number of ways of preparing an ice cream cone with any 3 different flavors.

Solution:

Let us consider n = 10 (total number of flavors) and r = 3 (number of different flavors needed)

For first flavor we have 10 choices

For second flavor we have 10 - 1 choices

For third flavor we have 10 - 2 choices and this is same as (n - r + 1)

The numbers of arrangement would be: 10 × (10 - 1) × (10 - 3 + 1) = 720

From this we can generalize that, the number of ways of arranging r objects out of n different objects is:

n × (n - 1)  . . . (n - r + 1) = nPr

Problem 7. 10 Olympians are running a race. Find the different arrangements of 1st, 2nd, and 3rd place possible?

Solution:

We have to find different arrangements of 10 taken 3 at time.
Here,

  • n = 10
  • r = 3

Different arrangement of for 1, 2, and 3 places are

10P3 = 10! / (7!)
= 10 × 9 × 8 = 720

Problem 8. How many even numbers lying between 1000 and 2000 can be formed using the digits 1, 2, 4, 5, and 9?

Solution:

Since the number is supposed to be even, the digits at units place must either be 2 or 4 leaving us with 2 choices for the digit at units place.

The number is supposed to lie between 1000 and 2000, So the digits at thousand's place must be 1, we thus have 

1 choice for the digit at thousands place.

Rest of the 2 digits can be any one from 1, 2, 4, 5 and 9 i.e. 5 choices each

So the total permutations are: 2 × 5 × 5 × 1 = 50

Problem 9. How many 4-digit numbers divisible by 5 can be formed using 0, 3, 5, 7, and 9 if repetition of digits is not allowed?

Solution:

For the number to be divisible by 5, the digit at units place must either be 0 or 5, hence we have 2 possibilities.

Case 1. Digit at units place is 0

  • There are 4 choices for 103 place (all numbers except 0)
  • There are 3 choices for the 102 place (1 got used up at 103 place)
  • There are 2 choices for the 101 place (1 got used up at 103 place and 1 at 102 place)

Hence the possible arrangements with 0 at units place are

4 × 3 × 2 = 24

Case 2. Digit at units place is 5

  • There are 3 choices for 103 place (all except 0 and 5)
  • There are 2 choices for 102 place (1 got used up at 103 place)
  • There is 1 choice for 101 place (1 got used up at 103 place and 1 at 102 place)

Hence the possible arrangements with 5 at units place are 3 × 2 × 1 = 6
Total Arrangements = Number of arrangements in case 1 + Number of arrangements in case 2
Total Arrangements = 24 + 6 = 30

Practice Problems on Permutation

Question 1. In how many ways can 6 prisoners be placed in 4 cells if any number of prisoners can fit in a cell?

Question 2. Find how many 4-digit numbers divisible by 8 can be formed using 0, 1, 2, 3, 5, 7, and 9 if repetition of digits is not allowed.

Question 3. Find the number of ways of selecting 8 balls from 10 red, 16 blue, and 15 white given that the selection must have 1 ball of each color.

Question 4. Find how many even numbers lying between 4000 and 8000 can be formed using the digits 1, 2, 3, 4, 5, and 6 when repetition is allowed.

Conclusion

Permutations and Combinations are extremely important in many problems in mathematics where arrangement or selection is involved. Mastering permutation formulae and being able to solve permutation questions builds a person with all the tools needed to break down analysis and predict the possibility of outcomes in many practical situations, from computer science to event planning. Problems on permutations and combinations and mastering their differences allow one to deal efficiently with complex problems of ordering or selection of elements of exact order or selection.


S

sanatr
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Technical Scripter 2020
  • Permutation and Combination
  • Maths-Class-11

Similar Reads

    Simplification and Approximation

    Profit and Loss

    Mixtures & Allegations

    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
    Mixture and Alligation | Set 2
    Question 1: 30 litres of a mixture of milk and water contains 10% of water, the water to be added, to make the water content 25% in the new mixture. Find how many litres water will be added? Solution : Water in the 30 litre of mixture = 30 x 10/100 = 3 litres Milk in the mixture = 30 - 3 = 27 litres
    3 min read

    Simple Interest & Compound Interest

    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
    Compound Interest
    Compound Interest is the interest that is calculated against a loan or deposit amount in which interest is calculated for the principal as well as the previous interest earned. Compound interest is used in the banking and finance sectors and is also useful in other sectors. A few of its uses are:Gro
    9 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

    Time,Speed,and Distance

    Mensuration and Geometry

    Mensuration in Maths
    Mensuration is a branch of mathematics that deals with measuring geometric figures, including their length, area, volume, and surface area. It provides formulas and techniques for calculating these attributes for 2D (plane) shapes and 3D (solid) objects.Types of Mensuration 2D Mensuration- Deals wit
    4 min read
    Geometry
    Geometry is a branch of mathematics that studies the properties, measurements, and relationships of points, lines, angles, surfaces, and solids. From basic lines and angles to complex structures, it helps us understand the world around us.Geometry for Students and BeginnersThis section covers key br
    2 min read
    Introduction to Geometry
    Geometry is the branch of mathematics that deals with the shapes, angles, dimensions, and sizes of various things that we see in everyday life. It is mainly divided into plane and solid geometry. In plane geometry, 2d shapes such as triangles, squares, rectangles, and circles are studied. Whereas, i
    9 min read
    Coordinate Geometry
    Coordinate geometry is a branch of mathematics that combines algebra and geometry using a coordinate plane. It helps us represent points, lines, and shapes with numbers and equations, making it easier to analyze their positions, distances, and relationships. From plotting points to finding the short
    3 min read

    Ratio & Proportion,Percentage

    Ratios and Percentages
    Ratios and Percentages: Comparing quantities is easy, each of the quantities is defined to a specific standard and then the comparison between them takes place after that. Comparing quantities can be effectively done by bringing them to a certain standard and then comparing them related to that spec
    6 min read
    Ratio and Proportion
    Ratio and Proportion are used for comparison in mathematics. Ratio is a comparison of two quantities while Proportion is a comparison of two ratios. When a fraction a/b is written a:b then it is termed as a ratio b. When two ratios let's say a:b and c:d are equal a:b and c:d are said to be proportio
    8 min read

    Number System

    What is a Number System?
    A number system is a way of writing numbers using specific symbols or digits. It helps us represent numbers mathematically. There are different types of number systems, such as the decimal system, binary system, octal system, and hexadecimal system.Here, we will discuss the types of number systems i
    4 min read
    Number System in Maths
    Number System is a method of representing numbers on the number line with the help of a set of Symbols and rules. These symbols range from 0-9 and are termed as digits. Let's learn about the number system in detail, including its types, and conversion.Number System in MathsNumber system in Maths is
    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
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