Basic Mathematics
Basic Mathematics
Anupam Gupta
Danny Sleator
Graphs II
Lecture 19, October 26, 2010
Recap
Cayleys Formula
The number of labeled
trees on n nodes is nn-2
A graph is planar if
it can be drawn in
the plane without
crossing edges
KuratowskisTheorem
A graph G is planar if and only if
K3,3 and K5 are not minors of G.
The 5-color theorem and the 4-color theorem
Eulers Formula
If G is a connected planar graph
with n vertices, e edges and f
faces, then n e + f = 2
Spanning Trees
A spanning tree of a graph G is a tree that
touches every node of G and uses only
edges from G
( )
if i=j
-1
if (i,j) E
otherwise
2
3
1
4
5
L=
3
-1
0
2
0
-1
-1 0 -1
-1 2 -1
0 0 -1
-1 0 -1
-1
3 -1
0 0 -1
Proof:
Beyond the scope of this course
2
3
L=
4
5
2
0
-1
0
3
0
-1
2 -1
0 -1
-1
0
-1 2
= 11
3
-1
0
2
0
-1
2
-1 0 -1
-1 2 -1
0 0 -1
-1 0 -1
-1
3 -1
0 0 -1
1
-01
0..
.
0
n
...
-1
n
...
=n
n-2
Cayleys
Formula!
5
9
7
8
6
11
Kruskals Algorithm
A simple
algorithm for
finding a
minimum
spanning tree
5
9
10
6
7
Bipartite Graph
A graph is bipartite if the nodes can be
partitioned into two sets V1 and V2 such
that all edges go only between V1 and V2
(no edges go from V1 to V1 or from V2 to V2)
Dancing Partners
A group of 100 boys and girls attend a
dance. Every boy knows 5 girls, and
every girl knows 5 boys. Can they be
matched into dance partners so that each
pair knows each other?
Dancing Partners
Perfect Matchings
A matching is a set of edges, no two of
which share a vertex. The matching is
perfect if it includes every vertex.
Regular Bipartite Matching Theorem: If
every node in a bipartite graph has the
same degree d 1, then the graph has a
perfect matching.
Note: if degrees are the same then |A| = |B|,
where A is the set of nodes on the left
and B is the set of nodes on the right
A Matter of Degree
Claim: If degrees are the same then |A| = |B|
Proof:
If there are m boys, there are md edges
If there are n girls, there are nd edges
The Regular Bipartite Matching Theorem
follows from a stronger theorem, which we
now come to. (Remind me to return to the
proof of the RBMT later.)
A
Proof by
Contradiction:
k>
n-k<
B
k
n-k
Example
Suppose that a standard
deck of cards is dealt into
13 piles of 4 cards each
Then it is possible to
select a card from each
pile so that the 13 chosen
cards contain exactly one
card of each rank
Generalized Marriage:
Halls Theorem
Let S = {S1, S2, Sn} be a set of finite
subsets that satisfies: For any subset T of
{1,2,,n} let U = the union of St for t in T,
we have: |U| |T|. I.E. any k subsets contain
at least k elements
Then we can choose an element xi from
each Si so that {x1, x2, } are all distinct
- Definition
- Using MST to get an
approximate solution
The Marriage Theorem