When we talk of permutations
and combinations we often use the two terms
In statistics, the two each have very specific meanings.
of a number of objects is the number of different ways they can be
ordered: the position is important. With combinations, one
does not consider the order in which objects were placed.
This algorithm (program in Matlab) calculates the number of permutations and combinations
objects taken D
at a time.
The full Matlab code is:
variables and screen
user for input
of objects: ');
d = input('Size
and displays permut. according to basic formulas
i = n - d + 1 :
and displays combin. according to basic formulas
permut. and combin. can be made of the 26 letters of the
alphabet, taking five at a time?
We run the
code above and enter:
Total number of objects: 26
The answer is:
How many different ways can 12 computers be repaired if the workshop
only support 2 at a time?
We run the Matlab m-file above and enter:
number of objects: 12
The answer (with no doubt) is:
Combinations' to home
'Permutations and Combinations' to 'Probability and Stats' Menu