Back to homeMathematics · 2nd Bach. Science · Change subject
Start for free
BAC2 tech · Mathematics
Randomness and probability · Probability

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.

Before you start, make sure you know: Combinatorics (1st Bachillerato)
Before you start, make sure you know: Laplace's rule (1st ESO)

The fundamental counting principle

Three-stage product diagram (letter with 27 options, digit with 10 and digit with 10) giving 2.700 possible combinations letter27 options × digit10 options × digit10 options = 27 · 10 · 10 = 2.700
Practice★☆☆Not started
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'?

Solve

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.

Comparison of variations with and without repetition, showing how in the former n options are kept in each box and in the latter they decrease successively choosing and arranging 3 of 20 students as class representative, deputy representative and secretary representative deputy representative secretary 201918 V(20,3) = 20 · 19 · 18 = 6.840 (the post matters: being representative is not the same as secretary)
Practice★★☆Not started
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:

  1. a) Repetitions of letters and numbers are allowed.
  2. b) Repeating letters is not allowed, but repeating numbers is allowed.
  3. c) The letters must be distinct and the numbers must form a strictly increasing sequence (for example: $1258$, but neither $1225$ nor $4321$).
{A, B, ..., Z} {0, 1, ..., 9} L₁ L₂ D₁ D₂ D₃ D₄ 2 Letters 27 options 4 Digits 10 options
Solve

Permutations: arranging all the elements

Permutations are the particular case of variations in which all the available elements are arranged ($r=n$).

Diagram showing the rearrangement of the 10 letters (all different) of the word MURCIELAGO through 10 factorial permutations M U R ... 10 letters → 10! arrangements
Practice★★★Not started
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.

  1. a) Calculate the probability that the chosen key starts and ends with a vowel.
  2. b) Determine the probability that all the vowels appear together in the key.
  3. c) Given that the key starts with B, what is the probability that the second letter is an L?
Permutations (10!/2!) B L O C K C H A I N 1 2 3 4 5 6 7 8 9 10 n = 10 characters 3 Vocales (O, A, I) 7 Consonantes (B, L, C, K, C, H, N)
Solve

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.

Diagram showing how combinations are derived by dividing variations by r factorial to eliminate the different arrangements of the same subset choosing 3 representatives from 20 students, with no distinct posts C(20,3) = 20!/(3!·17!) = 1.140 (the order of selection does not matter, only who makes up the group)
Practice★☆☆Not started
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).

Solve

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.

Explanatory diagram of Laplace's rule showing that both favourable and possible outcomes are obtained using counting techniques P(A) = favourable outcomes / possible outcomes numerator and denominator: count them with V, P or C Laplace's formula does not change; what changes is how to count
Practice★☆☆Not started
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.

Solve
Practice★☆☆Not started
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.

Solve

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.

Summary

See all the exercises in this section