Sets A set is a collection of objects without repeats. The size or cardinality of a set S is denoted S and is the number of elements in the set. If A and B are sets, then the set of ordered pairs each consisting of one element of A and one element of B is denoted A B. test1sum: 1
Product Rule One approach to counting is to break up the question into a series of choices. The Product Rule says A B = A B There is one ordered pair for each element of A and each element of B. test1sum: 2
Factorial The product 20 19 18... 1 is called 20 factorial, written with an exclamation point as 20!. Note that 1! = 1 and 0! = 1 by definition. test1sum: 3
Counting All Subsets Example: a set with n elements has 2 n different subsets. test1sum: 4
Counting Sequences For universe X of n elements: (a) The number of ways to choose an ordered sequence of k elements from X with replacement is n k. (b) The number of ways to choose an ordered sequence of k elements from X without replacement is n!/(n k)!. test1sum: 5
Counting Separately Another common idea is to divide up the collection into separate cases: we count the individual cases separately and then add the answers. A variation is to count the collection by counting the whole universe and then subtracting those things not in our collection. test1sum: 6
Sum Rule The Sum Rule says: if sets A and B are disjoint (meaning their intersection is empty), then A B = A + B. More generally, A B = A + B A B. test1sum: 7
Binomial Coefficients Whether the collection is ordered or unordered matters. Given a universe X of n elements, the number of ways to choose an unordered subset of X of k elements of without replacement is the binomial coefficient (n ) n! = k k! (n k)! pronounced n choose k. test1sum: 8
Symmetry Property ( ) n k = ( n ) n k test1sum: 9
Counting per Pattern A common approach is to choose the pattern, then choose the way to fill the pattern. test1sum: 10
Identical versus Distinguishable When counting balls: if they are indistinguishable, only the number of balls matters. test1sum: 11
Anagrams Anagrams are counted by T! c 1! c 2! c k! where the k different letters have counts c 1, c 2,..., c k and T is the total number of letters. test1sum: 12
Odds The odds or chance of an event is calculated by dividing the number of outcomes corresponding to the event in question by the total number of outcomes. Used in poker for example. test1sum: 13
Recurrence Formula ( ) n k = ( ) n 1 k 1 + ( ) n 1 k This is exhibited in Pascal s triangle. test1sum: 14
Combinatorial Proof A combinatorial proof of an equation is where both sides are shown to count the same thing. test1sum: 15
Sum of Binomial Coefficients ( ) n 0 + ( ) n 1 + ( ) n 2 + + ( ) n n = 2 n. That is, n k=0 ( ) n k = 2 n. test1sum: 16
Binomial Theorem The Binomial Theorem says that the coefficient of x k y n k in (x + y) n is ( n k ). That is, (x + y) n = n k=0 ( ) n x n k y k. k test1sum: 17
Functions A function has a domain and a codomain. The function maps each element in the domain to an element in the codomain; that is, given any element of the domain, the function evaluates to a specific value in the codomain. test1sum: 18
Representing Functions Can represent a function: as a rule as a table as a graph as a set of ordered pairs as a picture with arrows from domain to codomain test1sum: 19
Special Functions The range of a function is the set of elements in the codomain which really do have something mapping to them. A function is 1 1 or one-to-one if every element in the range is mapped to by a unique element in the domain. A function is onto if every element in the codomain is mapped to; that is, the codomain and range are equal. A function is a bijection if it is both one-toone and onto. test1sum: 20
Partitions A partition of a set is writing it as disjoint nonempty blocks. For example, {{1}, {3, 5}, {2, 4}} is a partition of the set X = {1, 2, 3, 4, 5}. Note that the order of the blocks does not matter, and neither does the order of the elements within a block. test1sum: 21
Relations Examples of relations include same color as, is a subset of, and is a neighbor of. To specify a relation, we can give a rule that explains when two things are related; or, we can list all the ordered pairs of related elements. If R stands for the relation, then we will write xry to mean that x is related to y in the relation R. (For example, if R was the equality relation, we would write that x = y.) test1sum: 22
Equivalence Relations An equivalence relation is reflexive if xrx for all x (that is, everything is related to itself). symmetric if xry implies yrx; and transitive if xry and yrz implies xrz. For example, has the same name as is an equivalence relation test1sum: 23
Equivalence Relations and Partitions An equivalence relation can be represented as a partition and vice versa. In an equivalence relation, the equivalence class of element x is the set of all elements related to it (note x is in its own equivalence class, by the reflexive property). These are the blocks of the partition. test1sum: 24