counting - Counting Margaret M Fleck 29 October 2010 These...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Counting Margaret M. Fleck 29 October 2010 These notes cover counting methods. (Sections 5.1, 5.3, 5.4, 5.5 of Rosen.) 1 Introduction to counting Many applications require counting, or estimating, the size of a finite set. For small examples, you can just list all the elements. For examples with a simple structure, you could probably improvise the right answer. But when it’s not so obvious, some techniques are often helpful. 2 Product rule Let’s start with the more obvious rules, e.g. The product rule : if you have p choices for one part of a task, then q choices for a second part, and your options for the second part don’t depend on what you chose for the first part, then you have pq options for the whole task. So if T-shirts can come in 4 colors and 3 sizes, there are 4 · 3 = 12 types of T-shirts. In general, if the objects are determined by a sequence of independent decisions, the number of different objects is the product of the number of 1
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
options for each decision. So if the T-shirts come in 4 colors, 5 sizes, and 2 types of necklines, there are 4 · 5 · 2 = 40 types of shirts. Yup. That’s pretty much what you thought. Nothing hard here. 3 The sum rule, inclusion/exclusion The sum rule : suppose your task can be done in one of two ways, which are mutually exclusive. If the first way has p choices and the second way has q choices, then you have p + q choices for how to do the task. Example: it’s late evening and you want to watch TV. You have 37 programs on cable, 57 DVD’s on the shelf, and 12 movies stored in I-tunes. So you have 37 + 57 + 12 = 106 options for what to watch. Weeeellll, maybe. This analysis assumes that there is no overlap between the movies available on the three media. If any movies are in more than one collection, this will double-count them. So we would need to subtract off the number that have been double-counted. For example, if the only overlap is that 2 movies are on I-tunes and also on DVD, you would have only (37 + 57 + 12) 2 = 104 options. The formal name for this correction is the “Inclusion-Exclusion Princi- ple”. Formally, suppose you have two sets A and B . Then Inclusion-Exclusion Principle: | A B | = | A | + | B | − | A B | We can use this basic 2-set formula to derive the corresponding formula for three sets A , B , and C : 2
Image of page 2
| A B C | = | A | + | B C | − | A ( B C ) | = | A | + | B | + | C | − | B C | − | A ( B C ) | = | A | + | B | + | C | − | B C | − | ( A B ) ( A C ) | = | A | + | B | + | C | − | B C | − ( | A B | + | A C | − | ( A B ) ( A C ) | ) = | A | + | B | + | C | − | B C | − | A B | − | A C | + | A B C | 4 Combining these basic rules Let’s see what happens on a more complex example, where we have to use both the product and the sum rules. Suppose S contains all 5-digit decimal numbers that start with 2 one’s or end in 2 zeros, where we don’t allow leading zeros. How many numbers does S contain?
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern