Counting
Fundamental Counting
- Sum Rule
- or = +
- Product Rule
- and =
- with replacement =
- without replacement =
- and =
Lists
An ordered arrangement of the elements of some set S
- S =
- all possible lists are: anp, apn, nap, npa, pna, pan
Permutations
A list containing the elements of a set
A permutation
: - a mapping from a set to a specific list
Number of full permutations of a set S =
- |S| = number of elements of S (cardinality)
Permutations of size
- a partial list of size 3 from a set with 5 elements =
Circle Permutations (starting positions don't matter)
possible permutations with n different starting positions =
Permutations where k of the n elements are indistinguishable
total permutations, number of possible orderings of the k elements =
Combinations
Combinations with sets of distinct elements
- i.e. how many subsets of size n can we make from S
If we have k groups
number of elements in the th group ( ) - when
, we get the binomial coefficient - both sides represent the same (Bijection)
Division Rule
- if B is a finite set and
maps precisely k items of A to every item of B then A has k times as many items as B
Multisets
- a sequence of non-negative integers with k-different element types
all different types of elements n = total elements in the multiset - number of n-element multisets of k types