Skip to main content
Mathematics LibreTexts

20.2: Addition and subtraction rules

  • Page ID
    83506
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    As usual in mathematics, breaking a big problem into smaller parts is a useful strategy.

    Theorem \(\PageIndex{1}\): Addition Rule

    Assume \(U\) is a finite set.

    1. If \(U = A_1 \sqcup A_2\text{,}\) then \(\vert U \vert = \vert A_1 \vert + \vert A_2 \vert\text{.}\)
    2. If \(U = A_1 \cup A_2\text{,}\) then \(\vert U \vert = \vert A_1 \vert + \vert A_2 \vert - \vert A_1 \cap A_2 \vert\text{.}\)
    Proof Idea.

    After recalling the definition of disjoint union, Statement 1 should be obvious. To prove Statement 2, apply Statement 1 to the following disjoint unions:

    \begin{align*} U & = A_1 \sqcup (A_2 \setminus A_1), & A_2 & = (A_2 \setminus A_1) \sqcup (A_1 \cap A_2). \end{align*}
    Then combine the resulting equalities of cardinalities.

    Remark \(\PageIndex{1}\)

    Statement 1 of Theorem \(\PageIndex{1}\) can be extended to a disjoint union of any number of subsets.

    Example \(\PageIndex{1}\): Counting by breaking into cases.

    How many words of length \(3\) or less are there using alphabet \(\Sigma = \{ \alpha, \omega \}\text{?}\)

    Solution

    Write \(\Sigma ^{\ast}_{\le 3}\) to mean the set of words in alphabet \(\Sigma\) of length \(3\) or less. Then

    \begin{equation*} \Sigma ^{\ast}_{\le 3} = \Sigma ^{\ast}_0 \sqcup \Sigma ^{\ast}_1 \sqcup \Sigma ^{\ast}_2 \sqcup \Sigma ^{\ast}_3 \text{,} \end{equation*}
    so we can break into cases based on length and then apply the Addition Rule.

    Count \(\Sigma ^{\ast}_0\).
    There is only one word of length \(0\text{:}\) the empty word. So \(\vert \Sigma ^{\ast}_0 \vert = 1\text{.}\)

    Count \(\Sigma ^{\ast}_1\).
    There are only two words of length \(1\text{:}\) the single-letter words \(w_\alpha = \alpha\) and \(w_\omega = \omega\text{.}\) So \(\vert \Sigma ^{\ast}_1 \vert = 2\text{.}\)

    Count \(\Sigma ^{\ast}_2\).
    We can count be simply listing the elements:

    \begin{equation*} \Sigma ^{\ast}_2 = \{ \alpha \alpha, \alpha \omega, \omega \alpha, \omega \omega \} \text{.} \end{equation*}
    So \(\vert \Sigma ^{\ast}_2 \vert = 4\text{.}\)

    Count \(\Sigma ^{\ast}_3\).
    This time we will just use inductive reasoning. Each word in \(\Sigma ^{\ast}_2\) may be extended to a word in \(\Sigma ^{\ast}_3\) by appending either an \(\alpha\) or an \(\omega\) onto the end. So there must be twice as many words in \(\Sigma ^{\ast}_3\) as in \(\Sigma ^{\ast}_2\text{,}\) i.e. \(\vert \Sigma ^{\ast}_3 \vert = 8\text{.}\)

    Total count.
    Using the Addition Rule, we obtain the total by adding up our preliminary results:

    \begin{equation*} \vert \Sigma ^{\ast}_{\le 3} \vert = 1 + 2 + 4 + 8 = 15 \text{.} \end{equation*}

    Another common strategy in mathematics is to consider the opposite.

    Theorem \(\PageIndex{2}\): Subtraction Rule.

    Assume \(U\) is a finite set. For every subset \(A \subseteq U\text{,}\) we have \(\vert A \vert = \vert U \vert - \vert A^C \vert \text{.}\)

    Proof Idea.

    Since \(U = A \sqcup A^C \) is always true, simply apply Statement 1 of Theorem 20.2.1 to this disjoint union and rearrange to isolate \(\vert A \vert\text{.}\)

    Example \(\PageIndex{2}\): Counting by counting the complement.

    For alphabet \(\Sigma = \{a, b, c, \ldots, y, z\} \text{,}\) how many words in \(\Sigma ^{\ast}_2\) do not begin with the letter \(\mathrm{a}\text{?}\) It's much easier to count the number of words in \(\Sigma ^{\ast}_2\) that do begin with \(\mathrm{a}\text{,}\) as there are only \(26\) possibilities for the second letter.

    Later in this chapter we will learn a rule that will allow us to easily calculate the total number of words in \(\Sigma ^{\ast}_2\) to be \(26^2\) (see Worked Example 20.3.6). Accepting this fact for the moment, we can then use the Subtraction Rule to compute

    \begin{align*} \# \{ 2\text{-letter words not beginning with } \mathrm{a} \} & = \vert \Sigma ^{\ast}_2 \vert - \# \{ 2\text{-letter words beginning with } \mathrm{a} \}\\ & = 26^2 - 26 \\ & = 26 (26 - 1) \\ & = 26 \cdot 25 \text{.} \end{align*}


    This page titled 20.2: Addition and subtraction rules is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Jeremy Sylvestre via source content that was edited to the style and standards of the LibreTexts platform.