Study Guides for Discrete Mathematics

Section 4.1 - The Basics of Counting

An event (such as rolling an even number on a die) may be composed of many subevents (such as rolling a 2, 4 or 6). It is useful to think of events as sets and the atomic subevents as elements of the sets. Recall that the cardinality of a set, S, is the number of elements (events) of S and is denoted |S|

The SUM rule

The SUM rule is used to determine the number of ways two events can occur.

To utilize the SUM rule the two events A and B cannot both occur at the same time. I.e. sets A and B have no intersection. To determine the number of ways A OR B can occur simply add the number of ways A can occur to the number of ways B can occur.

Example: In how many ways can one draw a single heart or diamond from an ordinary deck of 52 cards?

It is not possible to draw a heart and a diamond simultaneously on a single card therefore the SUM rule applies. There are 13 ways to draw a heart and 13 ways to draw a diamond. Therefore there are 13+13=26 ways of drawing a heart or a diamond.

To apply the SUM rule remember that A and B cannot occur simultaneously and we compute |A| + |B|.

 

The PRODUCT rule

To determine the number of ways A followed by B can occur, multiply the number of ways A can occur by the number of ways B can occur. We assume that there is no cause and effect relationship between A and B.

Example: In how many ways can we draw a heart and then draw a diamond from an ordinary deck of 52 cards?

There are 13 ways one can draw a heart on the first card and there are 13 ways one can draw a diamond on the second card. Therefore there are 13· 13 = 169 ways one can draw a heart followed by a diamond.

 

To apply the PRODUCT rule remember that A and B are to occur consecutively and we compute |A|· |B|.

 

The INCLUSION-EXCLUSION principle

This is a refinement of the SUM rule. When we wish to compute the number of ways that A OR B can occur and it IS possible for A and B to occur simultaneously we must not count more than once the events for which A and B are both true.

Example: In how many ways can one draw a red card or an Ace from an ordinary deck of 52 cards?

There are 26 ways one can draw a red card and there are four ways one can draw an Ace. There are two ways one can draw a red card and an Ace simultaneously. Therefore the number of ways one can draw a red card or an Ace is 26 + 4 - 2 = 28.

For the INCLUSION-EXCLUSION principle use the SUM rule for A and B but remember to subtract out the events where A and B occur simultaneously.

I.e. |A È B| = |A| + |B| - |A Ç B|

Enumeration Aids

The slot method

Example: The Computer Science Club at TJ High has 10 seniors, 8 juniors, 4 sophomores and 2 freshmen. The officers of the club consist of a President, a Secretary and a Treasurer. The President must be a senior, the Treasurer must be a junior and the Secretary may be any class rank. In how many ways may we select the officers of the club?

Any one of 10 club members may fill the first slot, President. Any one of 8 club members may fill the second slot, Treasurer. Having filled the first two slots we may choose from the remaining 22 club members to fill the third slot. Therefore the total number of ways to fill the slate of officers is

10 · 8· 22 = 1760

 

Tree Diagrams

See page 239 and 240 in the text for examples of tree diagrams.

Tree diagrams are an excellent aid in determining which counting principle to apply to a problem. It is especially relevant to situations where the product rule should apply. Each node of the tree represents a decision point and the number of branches at a node represents the number of choices that may be selected from at that point of decision.