20.4: Division Rule
( \newcommand{\kernel}{\mathrm{null}\,}\)
Sometimes it is easier to count a related but more structured collection, where the collection we actually want to count corresponds to equivalence classes of the more structured collection.
Suppose ≡ is an equivalence relation on a finite set A so that the equivalence classes all have the same number of elements. Then
#{equivalence classes}=|A|common size of classes.
That is,
|A/≡|=|A||[a]|,
where a is an arbitrary element of A.
- Proof.
-
Write N for the number of equivalence classes, and write C for the common cardinality of the classes. We know that the equivalence classes partition the set A, so using the Addition Rule we have
|A|=|[a1]|+|[a2]|+⋯+|[aN]|,
where a1,a2,…,aN are a complete set of equivalence class representatives. But we have assumed that these class cardinalities are all equal to each other, with each class satisfying |[aj]|=C. So|A|=C+C+⋯+C⏟N terms=NC,
which leads toN=|A|C,
as desired.
Let Σ={α,β,γ}. How many words in Σ∗4 contain exactly two αs, one β and one γ?
Solution
Write Λ for the collection of words in Σ∗4 of the type described. Instead of trying to count Λ directly, consider the following more structured collection.
Write Σ′={α1,α2,β,γ}, and let Λ′ be the set of words in Σ′∗4 that have no repeated letters. Similar to Worked Example 20.3.7, we have
|Λ′|=4⋅3⋅2⋅1=24.
For each pair of these words, write w1≡w2 if the following two conditions hold.
At whatever position w1 contains α1, w2 contains either α1 or α2 at that same position.
At whatever position w1 contains α2, w2 contains either α1 or α2 at that same position.
You may check that ≡ defines an equivalence relation on Λ′. Each class consists of exactly two words {w1,w2}, where w2 has an α2 where w1 has an α1 and an α1 where w1 has an α2. For example, one class of Λ′/≡ is
[α1βα2γ]={α1βα2γ,α2βα1γ}.
Effectively, the classes remove the distinction between α1 and α2, so that they might as well be the same letter, say, α. In other words, there is a bijective correspondence between the classes in Λ′/≡ and the words in Λ. Using the Division Rule, we have
|Λ|=|Λ′/≡|=|Λ′|2=242=12.