You are on page 1of 2

What is the difference between a combination and a

permutation?
Combination:
Is the selection of a group of items/objects where order does NOT matter:

The following example is an equivalent combination (all contain letters A to E):


A, B, C, D, E
E, D, C, B, A

Permutation:
Is the selection of a group of items/objects where order DOES matter.

With each order variation, a different permutation is counted. Therefore, permutations


have more distinct states than combinations.

The following example show two permutations (all contain letters A to E, but in
different order):
A, B, C, D, E
E, D, C, B, A

Questions
Is a “combination lock” a permutation or combination?
The name “combination” is incorrect for this object because it actually
implements permutation!
- Lock-A has a “combination” of: 10 25 55
- Lock-B has a “combination” of: 25 10 55
The reason these are different from one another is because ORDER matters, so
this applies permutation logic!

[On your way to school you can go:


east and then north
or
north and then east

If you are indifferent between these two paths are these routes an example of a
permutation or a combination?
Are the characters in a password a combination or a permutation?
Sol’n: permutation because it matters which order you enter the characters in.]

How do permutations and combinations impact a


program?

[These are important because they lead to many states, and in order to get to the right one you have to
program many different conditions]

“Selection”
i.e., apply logic based on one or more conditions.

The number of conditions can be unavoidably and painstakingly


overwhelming because of the nature of the requirements and the logic that is needed to
be applied for various states.

Some applications are logically bound to combinations or permutations of a set of


possible states.

When combinations and permutations drive the application logic, it will usually
contribute and/or mandate an intensive number of unavoidable selection
routines

You might also like