Lecture 7 - Notes

January 25, 2016

Binary Trees

How many nodes in a binary tree with height $h$?

and conversely,

Binomial Coefficients

Let $n \choose k$ denote the number of $k$-subsets of an $n$-set. $2$-subsets of the set ${a,b,c,d}$ are

In this case,

In general,

the function $f$ that maps ${a_0,a_1,\ldots,a_k}$ to $[n] \setminus {a_0,a_1,\ldots,a_k}$ where $[n] = {1,2,\ldots,n}$, is a bijection. For example

Claim: Pascals triangle equality, e.g.,

Proof: Classify the $k$-subsets of $[n]$ according to whether they contain $n$ or not. There are $\binom{n-1}{k-1}$ $k$-subsets that contain $n$ and $\binom{n-1}{k}$ $k$-subsets that do not contain $n$.

We can demonstrate this with pascals triangle.

0 1 2 3 4 5 6
0 1
1 1 1
2 1 2 1
3 1 3 3 1
4 1 4 6 4 1
5 1 5 10 10 5 1
6 1 6 15 20 15 6 1

Claim:

Shepherd Principal: We can prove this using the Shepherd principal. Suppose we are counting sheep and they really like each other so they have squished together into one blob. Luckily the sheep are standing on a sheet of glass so we can go underneath and count the feet. Divide by four and we have the number of sheep.

So if a set (the sheep) has been divided into equivalence classes (the feet) and each equivalence class has the same number for elements. Then the number of equivalence classes is

Proof: There are $n(n-1) \ldots (n-k+1)$ $k$-sequences in an $n$-set. Each $k$-subset corresponds to $k!$ of these. Thus,

Example

How many binary sequences are there with $s$ zeros and $t$ ones? For example, given,

then $s = 3$ and $t = 5$.

Solution

I think the answer is,

Frank Ruskey is hard to follow at best.

Binomial Queues

definition: A binomial queue are a kind of a mergeable heap.