nPr Formula: Seating Arrangements for Campus Aptitude Tests
P(n,r) formula derived from first principles, the theater seating example worked step by step, and decision rules for campus placement aptitude tests.
P(n,r) counts the ordered arrangements of r items chosen from n distinct items, and the formula is n! / (n-r)!. Every seating, word-arrangement, and ranked-selection problem on a campus placement aptitude test that specifies order traces to this one formula.
What P(n,r) Measures
The P stands for permutation. The essential word is “ordered”: two arrangements that use the same items in a different sequence are counted as distinct outcomes.
Take a 3-letter arrangement from the set {A, B, C, D}. ABC and BAC use identical letters, but they are different arrangements because the letters sit in a different order. In permutation counting, they are two separate outcomes. In combination counting, they are the same outcome. That distinction is the only conceptual boundary you need to place clearly before tackling any question.
Campus placement tests including those run on SHL India’s AMCAT platform include permutation and combination as a standard topic in the Quantitative Aptitude section. The broader campus placement aptitude test guide covers what the full test measures; this article focuses specifically on permutations.
Common Scenarios That Use P(n,r)
Placement test questions phrase the same underlying count in several ways. These all call for P(n,r):
- n people filling r specific numbered seats (theater, row, panel)
- Arranging r letters from a set of n distinct letters
- Selecting r candidates for r ranked positions (first, second, third) from a pool of n
- Awarding first, second, and third prizes to r distinct winners from n participants
If the positions are interchangeable (a committee has no rank, a team has no assigned role), the problem uses combination instead.
Deriving the Formula from First Principles
Place n distinct people into r seats, one person per seat, and count the choices at each step.
- Seat 1: n available people. Choose any one. That leaves n-1.
- Seat 2: n-1 remaining people. Choose one. That leaves n-2.
- Seat 3: n-2 remaining. Choose one.
- Continue to seat r, which has n-r+1 options.
The total count is the product of all these choices:
n × (n-1) × (n-2) × ... × (n-r+1)
This product has r terms. Rewrite it using factorial notation:
n! / (n-r)!
The division by (n-r)! cancels the terms in n! that fall below position r+1. That’s where the formula comes from, and knowing this derivation lets you reconstruct it on the spot if you ever blank on the form.
The Formula
P(n,r) = n! / (n-r)!
Constraints: n and r are non-negative integers, and n must be at least as large as r.
When r equals 0, P(n,0) = n! / n! = 1. There is exactly one way to arrange zero items: choose nothing, and that one outcome counts once. When r equals n, P(n,n) = n! / 0! = n!, since 0! equals 1 by convention.
The Theater Seating Problem, Worked Out
Five friends go to a movie. The theater row has 3 open numbered seats. In how many different ways can the 5 friends occupy those 3 seats?
Using the formula:
P(5,3) = 5! / (5-3)!= 5! / 2!= 120 / 2- = 60 ways
Direct counting verifies this:
- Seat 1: 5 choices
- Seat 2: 4 choices (one friend is already seated)
- Seat 3: 3 choices
- Total: 5 × 4 × 3 = 60
Both methods agree. For small r, the direct multiplication (sometimes called the falling factorial) is faster to compute by hand because you avoid computing the full factorial of n.
Additional Worked Examples
Practice these to build pattern recognition before the test:
- P(6,2): count arrangements of 2 items from 6. Direct: 6 × 5 = 30. Formula:
6! / 4! = 720 / 24 = 30. ✓ - P(4,4): arrange all 4 items. Direct: 4 × 3 × 2 × 1 = 24. Formula:
4! / 0! = 24 / 1 = 24. ✓ - P(7,3): arrange 3 from 7. Direct: 7 × 6 × 5 = 210. Formula:
7! / 4! = 5040 / 24 = 210. ✓ - P(10,1): one item from 10. Direct: 10. Formula:
10! / 9! = 10. ✓
For any P(n,r) where r is small (2 or 3), the direct method is the fastest approach. The formula is essential when r is large or when a restricted-arrangement problem requires algebraic setup.
Question Patterns on Campus Aptitude Tests
Campus tests repackage the permutation count in several formats beyond the plain seating problem. Knowing each format on sight saves time.
Word Arrangements
How many 3-letter arrangements can be formed from the letters of the word PLACE?
PLACE has 5 distinct letters. This is exactly P(5,3) = 60. The count is identical to the theater problem because the underlying math is the same: ordered selection of 3 from 5.
When a word has repeated letters, the denominator changes. For NOON (two N’s and two O’s), the total arrangements of all 4 letters = 4! / (2! × 2!) = 24 / 4 = 6. This is a multinomial coefficient, not standard nPr.
Rank of a Word
Some tests ask: “Find the rank of the word ACE in alphabetical order among all arrangements of its letters.” The approach:
- List the letters alphabetically: A, C, E.
- Count words that start with A and come before ACE: just those starting AC, which gives ACE itself in position 1.
- Rank = 1.
For longer words, the same logic applies: fix each position, count how many words precede the target arrangement at that position, and sum the results.
Restricted Seating
A common variant: “4 people are to be seated in a row of 6 chairs; the two end chairs must stay empty.” This reduces the effective pool to 4 middle seats, all of which must be filled:
P(4,4) = 24 ways
Another variant: “A and B must not sit adjacent.” Use complementary counting:
- Total arrangements of all people minus arrangements where A and B are adjacent.
Treating adjacent-A-and-B as a single block reduces n by 1 (the block counts as one unit), then multiply by 2 for the two internal orderings of A and B within the block.
Circular Arrangements
For n distinct people around a circular table, the count is (n-1)!, not n!. One person is fixed as a reference point to eliminate rotational equivalences (rotating the whole circle does not produce a new arrangement). Five people around a table: (5-1)! = 4! = 24 ways.
Analytics firms that recruit from Tier-2 and Tier-3 engineering colleges frequently include restricted and circular permutation questions in their written tests. FACE Prep’s Mu Sigma aptitude test guide covers the question patterns that appear in those assessments in more detail.
For a large practice question bank covering standard and variant permutation problems, IndiaBix’s Permutation and Combination section is a reliable source.
The Permutation-Combination Decision Rule
Before reaching for the formula, ask one question: if two selected items are swapped, does the outcome change?
- Theater seating: swapping two people to different numbered seats gives a different arrangement. Use permutation.
- Choosing a committee of 3 from 10 people:
{A, B, C}is the same committee as{C, A, B}. The order does not matter. Use combination.
The formula for combination is C(n,r) = n! / (r! × (n-r)!), which equals P(n,r) / r!. The extra division by r! removes the ordering within each selected group.
Two more checks that resolve most ambiguous questions:
- If the question mentions positions, ranks, or labels (first chair, second chair; gold medal, silver medal), it’s permutation.
- If the question uses words like “committee,” “team,” “group,” or “subset” without assigning roles, it’s combination.
The word “select” alone is not a signal. “Select 3 people for 3 specific roles” is permutation. “Select 3 people for a team” is combination.
Time and Work is the single most tested topic in campus placement Quantitative Aptitude. Permutation and combination appears less often per test, but the questions tend to carry higher point values at companies that weight analytical reasoning.
Computing P(n,r) in Code
The formula translates directly to code without any library:
def permutation(n, r):
if r > n:
return 0
result = 1
for i in range(n, n - r, -1):
result *= i
return result
# Theater example: 5 people, 3 seats
print(permutation(5, 3)) # 60
Time complexity: O(r). Space: O(1). No factorial overflow for the range of n values that appear in aptitude tests.
The permutation formula counted 60 arrangements for 5 people in 3 specific seats. TinkerLLM includes projects where you apply this same formula to real code problems: building arrangement validators, API endpoint generators, and similar tools. The platform starts at ₹299 and the first module is self-paced.
Primary sources
Frequently asked questions
What is the difference between P(n,r) and C(n,r)?
P(n,r) counts ordered arrangements: selecting r items from n where the order matters. C(n,r) counts unordered selections: selecting r items from n where the order does not matter. C(n,r) = P(n,r) divided by r!, because each unordered group of r items can itself be arranged in r! distinct ways.
How many ways can 5 people sit in 3 theater seats?
P(5,3) = 5 factorial divided by (5-3) factorial = 120 divided by 2 = 60 ways. You can verify by direct counting: the first seat has 5 options, the second has 4, the third has 3, giving 5 times 4 times 3 = 60.
What does P(n,n) equal and why?
P(n,n) = n factorial divided by 0 factorial = n factorial divided by 1 = n factorial. This makes sense: arranging all n items in all n positions gives n factorial total arrangements, which is the maximum possible.
When do permutation questions appear in campus placement tests?
Permutation and combination questions appear in the Quantitative Aptitude section of most campus placement tests. Platforms like AMCAT, eLitmus, and company-specific assessments regularly include one to three questions on this topic, covering seating, word arrangements, and restricted-placement variants.
How do I solve circular permutation problems on aptitude tests?
For n distinct objects arranged in a circle, the number of arrangements is (n-1) factorial rather than n factorial. One object is fixed as a reference to remove rotational equivalences. For 5 people around a circular table, the count is 4 factorial = 24 ways.
What if some items in a permutation are identical?
Divide by the factorial of each repeated count. For a word with n letters where one letter repeats p times and another repeats q times, the number of distinct arrangements is n factorial divided by (p factorial times q factorial). For example, NOON has 4 letters with two N's and two O's, so the count is 4 factorial divided by (2 factorial times 2 factorial) = 24 divided by 4 = 6.
A self-paced playground for building with LLMs.
TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.
Try TinkerLLM (₹299 launch)