Skip to main content
Mathematics LibreTexts

1: Counting

  • Page ID
    15314
  • \( \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}}\)

    One of the first things you learn in mathematics is how to count. Now we want to count large collections of things quickly and precisely. For example:

    • In a group of 10 people, if everyone shakes hands with everyone else exactly once, how many handshakes took place?
    • How many ways can you distribute 1010 girl scout cookies to 77 boy scouts?
    • How many anagrams are there of “anagram”?

    Before tackling questions like these, let's look at the basics of counting.

    • 1.1: Additive and Multiplicative Principles
      Consider this rather simple counting problem: at Red Dogs and Donuts, there are 14 varieties of donuts, and 16 types of hot dogs. If you want either a donut or a dog, how many options do you have? This isn't too hard, just add 14 and 16. Will that always work? What is important here?
    • 1.2: Binomial Coefficients
      Here are some apparently different discrete objects we can count: subsets, bit strings, lattice paths, and binomial coefficients. We will give an example of each type of counting problem (and say what these things even are). As we will see, these counting problems are surprisingly similar.
    • 1.3: Combinations and Permutations
      A permutation is a (possible) rearrangement of objects.
    • 1.4: Combinatorial Proofs
      To give a combinatorial proof for a binomial identity, say A=B you do the following: (1) Find a counting problem you will be able to answer in two ways. (2) Explain why one answer to the counting problem is A. (3) Explain why the other answer to the counting problem is B. Since both A and B are the answers to the same question, we must have A=B. The tricky thing is coming up with the question.
    • 1.5: Stars and Bars
      Many of the counting problems in this section might at first appear to be examples of counting functions. After all, when we try to count the number of ways to distribute cookies to kids, we are assigning each cookie to a kid, just like you assign elements of the domain of a function to elements in the codomain.
    • 1.6: Advanced Counting Using PIE
      The Principle of Inclusion/Exclusion (PIE) gives a method for finding the cardinality of the union of not necessarily disjoint sets.  If there is any overlap among the sets, those elements are counted multiple times. So we subtract the things in each intersection of a pair of sets. But doing this removes elements which are in all three sets once too often, so we need to add it back in.
    • 1.7: Pigeonhole Principle
    • 1.E: Counting (Exercises)
    • 1.S: Counting (Summary)
      While we have covered many counting techniques, we have really only scratched the surface of the large subject of enumerative combinatorics. There are mathematicians doing original research in this area even as you read this. Counting can be really hard.


    This page titled 1: Counting is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Oscar Levin.

    • Was this article helpful?