The rule of sum in discrete
mathematics is a way to count a set of objects into independent elements. The
rule of sum presents an idea that if one situation can occur in \(A\) ways and
another situation can occur in \(B\) ways, then there are \(A+B\) ways that one of
these types of situations may occur.

For example, a restaurant
serves fifteen entrees that contain meat, five entrees that contain fish and
three vegetarian entrees. How many dinners are there to choose from?

The rule of sum is applied
here because each entrée contains either meat or fish or is vegetarian. So we
have \(15+5+3=23.\)

The rule of sum is expressed in terms
of sets:

- The union between two sets is denoted as \(A\cup B\). The union means that a set of objects can happen in \(A\) or \(B\) ways or even in both ways.
- The intersection of sets is denoted \(A\cap B\). This is the set of objects that can happen in \(A\) and \(B\) ways.
- If the sets \(A\) and \(B\) have no similar elements, then \(A\cap B=\left\{\right\}\) or \(\emptyset\), which is known as the empty set.
- The size of a set is denoted \(\left|A\right|\) or \(\left|B\right|\) to show the amount of elements in set \(A\) or set \(B\).

To clear this up, lets look at an example.
Let set \(A\)=\(\left\{10,11,12\right\}\) and set \(B=\left\{11,12,13,14\right\}\).

\(A\cup B=\left\{10,11,12,13,14\right\}\) (Notice each element is only listed once even though each set shares common elements)

\(A\cap B=\left\{11,12\right\}\) (Notice both sets share these elements)

\(\left|A\right|=3\) and \(\left|B\right|=4\)

A more mathematical definition for the rule of sum is pictured below,

**Suggested Exam Problem:** Zack goes to a pet
shop that