Counting techniques
Until now, in small experiments (one die, one coin) counting the possible outcomes was immediate. But what if the experiment is generating a $6$-character password, or choosing a committee of $3$ people from $20$? Counting one by one is not feasible: we need counting techniques. They are tools from pure combinatorics, but here you will mainly use them for one thing: calculating the numerator and the denominator of Laplace's rule.
The fundamental counting principle
To improve the security of a mobile app, a developer decides to create access codes consisting of an uppercase letter (from the standard 26-letter alphabet) followed by…
To improve the security of a mobile app, a developer decides to create access codes consisting of an uppercase letter (from the standard 26-letter alphabet) followed by three digits (from 0 to 9).
-
How many different codes can be created if digits can be repeated?
-
How many different codes would there be if the three digits must be distinct from one another?
-
If a code with repeatable digits is generated at random, what is the probability that the letter is a 'Z'?
Variations: choosing and arranging
When $r$ elements are chosen from a total of $n$ without repetition and the order matters ($AB$ is not the same as $BA$), they are called variations.
To improve the security of an esports platform, users are required to create a 6-character password. The first two characters must be uppercase letters of the Spanish…
To improve the security of an esports platform, users are required to create a 6-character password. The first two characters must be uppercase letters of the Spanish alphabet (27 letters) and the remaining four must be digits from $0$ to $9$.
Calculate how many different passwords can be generated if:
- a) Repetitions of letters and numbers are allowed.
- b) Repeating letters is not allowed, but repeating numbers is allowed.
- c) The letters must be distinct and the numbers must form a strictly increasing sequence (for example: $1258$, but neither $1225$ nor $4321$).
Permutations: arranging all the elements
Permutations are the particular case of variations in which all the available elements are arranged ($r=n$).
A cybersecurity company generates access keys by permuting the characters of the word BLOCKCHAIN. One of these keys is chosen at random. a) Calculate the probability…
A cybersecurity company generates access keys by permuting the characters of the word BLOCKCHAIN. One of these keys is chosen at random.
- a) Calculate the probability that the chosen key starts and ends with a vowel.
- b) Determine the probability that all the vowels appear together in the key.
- c) Given that the key starts with B, what is the probability that the second letter is an L?
Combinations: choosing when order does not matter
When $r$ elements are chosen from $n$ and the order does not matter (choosing $\{A,B\}$ is the same as choosing $\{B,A\}$), they are called combinations.
An engineering class has to choose a committee of 3 representatives. If there are 20 students in the class, calculate: In how many ways can the committee be chosen if…
An engineering class has to choose a committee of 3 representatives. If there are 20 students in the class, calculate:
-
In how many ways can the committee be chosen if the three roles (class representative, deputy representative, and secretary) are distinct?
-
In how many ways can it be chosen if the three representatives have equal rank and order does not matter?
-
If there are 12 men and 8 women, what is the probability that the committee (without distinct roles) consists entirely of women? (Express the fraction using combinations).
Counting to calculate probabilities
The ultimate aim of these techniques, in this unit, is to feed Laplace's rule when the favourable or possible outcomes are too many to list by hand.
An urn contains 12 glass balls for an optics experiment: 5 are blue, 4 are red, and 3 are yellow. If we draw a ball at random, calculate the following probabilities…
An urn contains 12 glass balls for an optics experiment: 5 are blue, 4 are red, and 3 are yellow. If we draw a ball at random, calculate the following probabilities using Laplace's rule:
-
That the ball is red or yellow.
-
That the ball is not blue.
-
That the ball is white.
In a robotics laboratory, 8 proximity sensors in perfect working order and 2 defective sensors have been mixed together in a box. A student draws two sensors…
In a robotics laboratory, 8 proximity sensors in perfect working order and 2 defective sensors have been mixed together in a box. A student draws two sensors consecutively and without replacement (without returning the first one to the box).
Calculate the probability that:
-
Both sensors work correctly.
-
The first is defective and the second is in good working order.
Back to the start: if the $6$-character password uses lower-case letters and digits ($26 + 10 = 36$ options), there are $VR_{36,6} = 36^6 = 2.176.782.336$ possible passwords; for the committee of $3$ from $20$, the order does not matter and there are $C_{20,3} = 1.140$ different groups.