Combinatorics
Types of selection
With rearrangement | Without rearrangement | |
---|---|---|
With repeat | nk | |
Without repeat |
See 9. Urval med återläggning
Multiplication principle
The basis for all combinatorics.
Sequence
An array of numbers.
arithmetic
geometric
Series
The "sum" of an array of numbers.
arithmetic
An arithmetic sequence changes by the same amount per term.
Let's describe some arbitrary series. Each term is made up of the "initial amount" plus the indice times the "step size".
To teach clearly, we won't use the variable i for the indice, but instead say n − 1, n − 2 and so on.
Writing it out – if there are n terms where the first term is a, the sum can be expressed:
[a] + [a + 1] + [a + 2] + ... + [a + (n-2)] + [a + (n-1)]
Note how this series does not reach a + n, and falls just short, because the very first term is at indice zero. You can of course write this differently, counting from indice one to indice n, rather than from zero to (n-1). You must change the initial amount (or "starting value").
It is common for the "step size", or increment, to be just one. If you have a different increment, you have to multiply the indice. Say the increment is d and we get the general expression (the one above was specifically for d=1 so that d disappeared):
[a] + [a + d] + [a + 2d] + ... + [a + (n-2)d] + [a + (n-1)d]
On our quest to sum this thing, we're going to place an indentical line below it, with the order reversed. Then think about what happens if you add the lines together.
S = a + a + 1d + a + 2d + ... + a + (n-1)d S = a + (n-1)d + a + (n-2)d + a + (n-3)d + ... + a 2S = 2a + (n-1)d + 2a + (n-1)d + 2a + (n-1)d + ... + 2a + (n-1)d
What just happened? The indice in the first row increases, but the indice of the second row decreases, so the summed indice stays.
You know how to factor. I hand the reins to you. Do this every time you need the summation formula, derive it.
n(a) + n (n-1) d 1/2 n(a) + n(n-1)d (n + n)(a + nd/2-d/2)
geometric
A geometric sequence increases by the same factor per term. (?)
Binomial theorem
You can expand (x + y)n as follows.
This is not the same thing as (xn + yn)! That is a sum of e.g. cubes like x3 + 1, where the exponents are "inside the parentheses", for which there is a different formula (Sum/difference of cubes).
Explanation
Binomials are expressions like (x + y)2. You memorize quadratics in high school, but how do you expand (x + y)14?
You can use Pascal's Triangle, but suppose you have (x + y)12733. Find facts about a specific term in that massive polynomial.
Uses the notion of Combination.
Pascal's Triangle
1 zeroth row -- a constant: (x + y)^0 1 1 first row --- a binomial 1 2 1 second row -- a binomial to the second degree 1 3 3 1 third row 1 4 6 4 1 fourth row
Explanation
You can write Pascal's Triangle from scratch – for each entry, add the two entries above it.
Take an example binomial of fourth degree, (x + y)4. When expanded, it produces a polynomial with coefficients from the fourth row.
We have the row, 1 4 6 4 1
. Place your x'es and y'es. The fourth-degree x-term goes to the left, the fourth-degree y goes go the right.
Once both are placed out, we end up with the completed polynomial:
Which can be viewed with redundancy, for clarity:
Combination🔗
Finding combinations of k items from n, "n choose k", is
For example,
A startling symmetry is that which is the same as the previous identity. This symmetry, that works for any numbers and you want.
Permutation
A combination lock should be called a permutation lock. The order matters, 2-7-1 isn't 2-1-7.
There are more permutations than combinations.
Factorials
Note that 10! / 8! is the same as 10 * 9. If it's not obvious why, think.
What links here
- Math