twonew - Chapter Two. Counting Techniques 2.1. Basic...

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

View Full Document Right Arrow Icon
Chapter Two. Counting Techniques 2.1. Basic Counting Rules (or Principles): The Sum Rule: Suppose there are two approaches to completing a task. The first approach produces m results, and the second approach produces n results, where all these results are distinct from one another. Thus, there are a total of m + n results for completing the task (based on the two approaches). A set-theoretic interpretation of the sum rule using Venn diagrams: 2-1, © Dr. S. Lang m results n results Total: m + n results If we let A = the set of m results from approach one, and let B = the set of n results from approach two, then | A | = m , and | B | = n . Thus, | A B | = | A | + | B | = m + n , since A B = . Notes: (1) More generally, | A B | = | A | + | B | – | A B|, when all sets are finite. (2) The sum rule is often used in a complementary fashion, i.e., | A | = | A B | – | B |, if A B = . Example: How many positive integers less than 1000 are not divisible by 12? The positive integers less than 1000 (i.e., from 1 through 999) that are a multiple of 12 include 12, 24, …; the total count equals 999/12 = 83 (the integer quotient using the floor notation). Thus, the count of positive integers less than 1000 not divisible by 12 is 999 – 83 = 916.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Example: How many positive integers less than 1000 are a multiple of 3 or 5 (or both)? Let A = { n | 1 n 999, and 3 | n }, and let B = { n | 1 n 999, and 5 | n }; that is, A is the set of multiples of 3 less than 1000, and B is the set of multiples of 5 less than 1000. Thus, | A| = 999/3 = 333, and | B| = 999/5 = 199. Note that A B = { n | 1 n 999, and 15 | n } because a multiple of 3 and 5 is exactly a multiple of 15. Thus, | A B| = 999/15 = 66. Therefore, by applying the sum rule, | A B | = | A | + | B | – | A B| = 333 + 199 – 66 = 466. The Product Rule: Suppose it takes two steps to complete a task. There are m paths (methods, or ways) to complete the first step and, for each of these paths, there are n paths to complete the second step. Thus, there are a total of mn paths to complete the two steps (in that order). Path 1 Path m Path 1 Path n Path n Path 1 Total: mn paths Notes: (1) The product rule can be generalized to situations involving more than 2 steps. (2) The product rule applies to situations in which the ordering of the steps is crucial, i.e, a result must follow the order of step 1, then step 2, etc. Step 1 Step 2 2-2, © Dr. S. Lang A graphical representation of the product rule (see figure):
Background image of page 2
Example: How many 3-digit decimal integers are there? (That is, count the integers from 100, the smallest 3-digit integer, through 999, the largest 3-digit integer.) We can include (or count) all such integers by performing 3 steps: select the first (leftmost) digit, select the middle digit, then select the last (rightmost) digit. There are 9 choices (1 through 9) for the first digit, and for each of these, there are 10 choices (0 through 9) for the middle digit, and
Background image of page 3

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

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

Page1 / 16

twonew - Chapter Two. Counting Techniques 2.1. Basic...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online