Mathematics

Combinatorics

Permutations, variations and combinations with and without repetition. Binomial coefficient and scheme to differentiate combinatorics operations.

It is the number of different ways in which we can order the elements of a set. It is calculated by:
Pn=n!P_n = n!
It is read permutations of n elements.
Example: Calculate the number of words, with or without meaning, that can be formed with the letters MESA.
P4=4!=4321=24P_4 = 4! = 4 \cdot 3 \cdot 2 \cdot 1 = 24

Permutations with repetition
The different ways in which n elements can be ordered, where one is repeated aa times, another is repeated bb times... etc.
PRna,b,c...=n!a!b!c!...PR_n^{a,b,c...} = \frac{n!}{a!b!c!...}
Example: How many words, with or without meaning, can be formed with the letters CARCAJADA?
The set has 9 elements, of which the letter A is repeated 4 times and the letter C is repeated 2 times, then:
PR94,2=9!4!2!=7560PR_9^{4,2} = \frac{9!}{4!2!} = 7560
Given a set of m elements, the number of different ways in which n distinct elements can be ordered, are variations of m elements taken n at a time (nmn \le m)
Vmn=m!(mn)!V_m^n = \frac{m!}{(m-n)!}
Example: How many different 2-letter words can we form with the letters ABETO?
V52=5!(52)!=54321321=20V_5^2 = \frac{5!}{(5-2)!} = \frac{5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}{3 \cdot 2 \cdot 1} = 20

Variations with repetition
Given a set of m elements, the number of different sequences of n elements, including repetitions, that can be formed, are the variations with repetition of m elements taken n at a time
VRmn=mnVR_m^n = m^n
Example: How many 4-digit numbers can we form with the digits 1, 2, 3?
It is a set of 3 elements. We take them 4 at a time
VR34=34=81VR_3^4 = 3^4 = 81
Binomial coefficient
The binomial coefficient (mn)\binom{m}{n}, read mm choose nn, is the operation:
(mn)=m!n!(mn)!\binom{m}{n} = \frac{m!}{n!(m-n)!}

Combinations
Given a set of m elements, the number of different subsets of n elements that we can extract are the combinations of m elements taken n at a time (nmn \le m)
Cmn=(mn)C_m^n = \binom{m}{n}
Example: an exam consists of 10 questions from which 5 must be chosen. In how many different ways can we choose those 5 questions?
C105=(105)=10!5!(105)!=252C_{10}^5 = \binom{10}{5} = \frac{10!}{5!(10-5)!} = 252

Combinations with repetition
Given m types of elements, the number of groups of n elements that we can form, including repetitions, are the combinations with repetition of m elements taken n at a time
CRmn=(m+n1n)CR_m^n = \binom{m+n-1}{n}
Example: in a bakery there are 3 types of cakes. In how many different ways can we buy 5 cakes?
CR35=(3+515)=(75)=7!5!(75)!=21CR_3^5 = \binom{3+5-1}{5} = \binom{7}{5} = \frac{7!}{5!(7-5)!} = 21
Scheme to differentiate combinatorics