Summary: Introduction to Probability
Nader H. Bshouty
Department of Computer Science
1.1 Simple Rules In Combinatorics
The rule of sum says that the number of ways to choose an element from one of two disjoints
sets is the sum of the cardinalities of the sets. That is, if A and B are two finite sets with no
members in common, then |A B| = |A| + |B|.
The rule of product says that the number of ways to choose an ordered pair is the number
of ways to choose the first element from A and the second element from B. That is, if A and
B are two finite sets, then |A × B| = |A| · |B|.
1.2 Simple Counting
A string over a set S is a sequence of elements of S. For example, there are 8 binary
strings of length 3: 000,001,010,011,100,101,110,111. A k-string over a set S can be viewed as
an element of the Cartesian product Sk of k-tuples; thus, there are |S|k strings of length k.