You are on page 1of 27

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 el-
ement 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 2n different


subsets.

test1sum: 4
Counting Sequences

For universe X of n elements:

(a) The number of ways to choose an ordered se-


quence of k elements from X with replacement
is nk .

(b) The number of ways to choose an ordered


sequence of k elements from X without replace-
ment is n!/(n − k)!.

test1sum: 5
Counting Separately

Another common idea is to divide up the collec-


tion into separate cases: we count the individ-
ual 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 bino-
mial coefficient
 
n n!
=
k k! (n − k)!
pronounced “n choose k”.

test1sum: 8
Symmetry Property

   
n n
=
k 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 indistinguish-


able, only the number of balls matters.

test1sum: 11
Anagrams

Anagrams are counted by


T!
c1! × c2! × · · · × ck !
where the k different letters have counts c1, c2, . . . , ck
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 n−1 n−1
= +
k k−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 n n n
+ + + ··· + = 2n.
0 1 2 n

That is,
n  
n
= 2n.
X
k
k=0

test1sum: 16
Binomial Theorem

The Binomial Theorem says that the coefficient


of xk y n−k in (x + y)n is nk .


That is,
n  
n
(x + y)n = xn−k y k .
X
k
k=0

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 evalu-
ates 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 ele-


ment in the range is mapped to by a unique
element in the domain.
• A function is onto if every element in the co-
domain is mapped to; that is, the codomain
and range are equal.
• A function is a bijection if it is both one-to-
one 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 mat-


ter, 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 re-
lation 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 equiv-


alence 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
Implications

A conditional statement or implication is a


statement of the form “If p then q”, written p ⇒ q.

An implication is sometimes translated as “p is


sufficient for q” or “q is necessary for p”.

The converse of p ⇒ q is q ⇒ p.

The contrapositive of p ⇒ q is NOT q ⇒ NOT p.


The contrapositive is logically equivalent to the
original.

test1sum: 25
Direct Proof

Ideally, a direct proof is a sequence of state-


ments each of which is a hypothesis, a fact, or
deduced from previous statements.

In practice, a proof is a convincing argument


that follows logically and handles all cases.

test1sum: 26
Proof by Contradiction

In a proof by contradiction, we suppose the nega-


tion of what we are trying to prove and try to
reach a contradiction.

For example, this was used to show that 5 is
irrational.

test1sum: 27

You might also like