Unordered: {1,1,3}={1,3,1}
Ordered: {1,1,3}={1,3,1}
$$
S→T
1. f(x1)=f(x2)⇒x1=x2 - 1-1/injective
2. ∀y∈T,∃x∈S,f(x)=y - onto/surjective
Suppose S,T are finite sets and f:S→T
(i) If f is 1-1 $$\Rightarrow
S is a set with weight function w:S→{0,1,2,...}
Φs(x)=σ∈S∑xw(s)
Φs(x)=k≥0∑akxk
$$
C(x)=c0+c1x+c2x2+...+k≥0∑∞ckxk
where (c0,c1,...) are rational numbers.
[xn]C(x)=cn - Coefficient of xn
A(x)=k=0∑∞akxk, B(x)=k=0∑∞bkxk
Addition: A(x)+B(x)=k=0∑∞(ak+bk)xk
Equality: A(x)=B(x)⟺ak=bk
Multiplication: A(x)B(x)=n=0∑∞(j=0∑najbn−j)xn
A(x),B(x) are fps satisfying A(x)B(x)=1
ightarrow(1−x)k1=k=0∑∞xk
ightarrow[x0]A(x)B(x)=1 - Inverse
Let A(x),B(x) be fps.
If b0=0⇒A(B(x))=j=0∑∞aj(B(x))j - Composition
(1−x)k1=n=0∑∞(k−1n+k−1)xn - Negative Binomial Theorem
Let A(x)=j=0∑∞ajxj.
A(x) has inverse ⟺ [x0]A(x)=a0=0
Let A(x),C(x) be fps.
If [x0]A(x)=0⇒ there exists fps B(x) where A(x)B(x)=C(x)
Let A(x),C(x) be fps with a0=0. Let B(x)=A(x)C(x).
ightarrow[xn]B(X)=bn=a01(cn−j=0∑n−1an−jbj)
Let A(x),B(x) be fps s.t. [x0]A(x)=0 and [x0]B(x)=0
ightarrow(A(B(x)))−1=A−1(B(x))
Let S=A∪B,A∩B=∅,w:S→{0,1,...}
ΦS(x)=ΦA(x)+ΦB(x) - Sum lemma
Let A,B be sets with weight functions:
α:A→{0,1,...}
β:B→{0,1,...}
w:A×B→{0,1,...}: w((a,b))=α(a)+β(b)
ightarrowΦA×B(x)=ΦA(x)ΦB(x) - Product Lemma
Geometric Series:
j=0∑∞xj=1−x1 -
Composition of Geometric Series:
[x0]A(x)=0⇒j=0∑∞(A(x))j=1−A(x)1
A composition of n is a tuple of positive integers
(a1,a2,...,ak) s.t. a1+a2+...+ak=n
k is the number of parts of the composition.
Let A,B be sets of binary strings.
AB is ambiguous if:
There exist a1,a2∈A and b1,b2∈B s.t.
a1b1=a2b2
A∪B is unambiguous if A∩B=∅
Expression with several concatenation/union operations is unambiguous if 1 of the concatenations or unions is.
Ak is ambiguous if there are distinct k-tuples and the concatenations are equal.
A∗ is unambiguous ⟺
1. Ak∩Aj=∅
2. Ak is unambiguous for each k≥0
Unambiguous Expressions for set of all binary strings:
1. S={0,1}∗
2. S={0}∗({1}{0}∗)∗
3. S={0}∗({1}{1}∗{0}{0}∗)∗{1}∗
Theorem 2.6.1:
A,B are sets of unambiguous binary strings.
(i) ΦAB(x)=ΦA(x)ΦB(x)
(ii) ΦA∪B(x)=ΦA(x)+ΦB(x)
(iii) ΦA∗(x)=1−ΦA(x)1
f,g are polynomials where deg(f)<deg(g) and
g(x)=(1−r1x)e1...(1−rkx)ek
where r_1, ..., r_k \in \C, e_1, .., e_k \in \Z^+
Partial Fractions Theorem:
ightarrowg(x)f(x)=(1−r1x)c1,1+...
+(1−r1x)e1c1,e1+(1−r2x)c2,1+...
+(1−rx)e2c2,e2+...+(1−rkx)ck,1+...+(1−rkx)ekck,ek
Theorem 3.1.4:
There exist polynomials P1,...,Pk s.t. deg(Pi)<ei
ightarrow[xn]g(x)f(x)=P1(n)r1n+P2(n)r2n+...+Pk(n)rkn
Theorem 3.2.1:
Let {cn}n≥0 satisfy the linear recurrence:
cn+q1cn−1+...+qkcn−k=0
Define g(x)=1+q1x+...+qkxk, C(x)=n=0∑∞cnxn
ightarrow There exists polynomial f(x) s.t. deg(f)<k
C(x)=g(x)f(x)
h(x)=qk+qk−1x+...+q1xk−1+xk for recurrence:
cn+q1cn−1+...+qkcn−k=0
Theorem:
Roots: r_1, r_2, ..., r_L \in \C
Multiplicities: e1,e2,...,eL≥1
ightarrow Then there exists polynomials P1,...,PL s.t. deg(fj)=ej−1 and cn=P1(n)r1n+...+PL(n)rLn
Complete Graphs (Kn)
1. A graph is isomorphic to itself (reflexive)
2. If G1≅G2⇒G2≅G1 (symmetric)
3. If G1≅G2and G2≅G3⇒G1≅G3 (transitive)
Every pair of vertices is an edge.
# of edges = (2n)
Graph where every vertex has degree k.
# of edges = 2nk
Graph where there exists partition of vertices (A,B) s.t. each edge
of G joins 1 vertex of B with a vertex in A.
Complete Bipartite Graphs (Km,n)
If there is a u,v-walk in G⇒ there is a u,v-path in G.
If there exists u,v-path and v,w-path ightarrow there exists u,w-path.
If every vertex in G has deg≥2⇒G has a cycle.
Length of graph's shortest cycle.
If G has no cycles ightarrow girth = ∞
- Measure of graph density
- High girth = lower average degree (usually)
Connected if there is a u,v-path for any pair of vertices u,v.
Let u∈V(G)
If u,v-path exists for each v∈V(G)⇒G is connected.
Let x⊆V(G).
Cut induced by x in G is the set of all edges in G with exactly 1 end in x.
G is disconnected ⟺
There exists a nonempty proper subset x of V(G)
s.t. the cut induced by x is ∅.
Closed walk that uses every edge of G exactly once.
- Connected unless it has isolated vertices
G is connected.
G has an Eulerian circuit ⟺ every vertex in G has even degree.
An edge e (or cut-edge) in G if G−e has more components than G.
If e=uv is a bridge in G and H is the component containing e
ightarrow H−e has exactly 2 components
(hence G−e has 1 more component than $G$)
Moreover, u and v are in different components of H−e.
(hence in G−e)
An edge e is a bridge of G ⟺ e is not in any cyce of G.
Connected graph with no cycles
# of edges = n−1 by Theorem 5.1.5
- Bipartite by Lemma 5.1.4
Graph with no cycles.
# of edges = n−k , with n vertices and k components
Every tree with ≥2 vertices has ≥2 leaves.
G is connected ⟺G has a spanning tree.
If G is connected with n vertices and n−1 edges ightarrowG is a tree.
If any of 2 the following 3 conditions hold ightarrowG is a tree:
1. G is connected
2. G has no cycles.
3. G has n−1 edges.
If T is a spanning tree of G and e is an edge in G that is not in T
ightarrow T+e has exactly 1 cycle.
Moreover, if e′ is an edge in C
ightarrow T+e−e′ is a spanning tree of G.
If T is a spanning tree of G and e is an edge in T
ightarrowT−e has 2 components (e is a bridge in T).
If e′ is an edge in the cut induced by the vertices of 1 component
ightarrow T−e+e′ is a spanning tree of G.
G is bipartite ⟺G has no odd cycles.
Given connected graph G and weight function on edges
w:E(G)→, find minimum spanning tree in G
whose total edge weight in minimized.
If 2 vertices are adjacent in G⟺The same 2 vertices are not adjacent in Gˉ.
A graph is planar ⟺ Each component is planar
A face of a planar embedding is a connected region on the plane.
2 faces are adjacent $\iff$ The faces share ≥ 1 edge in their boundaries.
Let G be a planar graph with planar embedding where F is the set of all faces.
$$\sum\limits_{f \in F} deg(f)=2
In a planar embedding, an edge e is a bridge
⟺ The 2 sides of e are in the same face
Let G be a connected planar graph.
Let n = # of vertices in G.
Let m = # of edges in G.
Let s = # of faces in a planar embedding of G.
ightarrown−m+s=2
Note: If G has C components ightarrow n−m+s=1+C
Result: All planar embeddings of a graph have the same number of faces.
A connected planar graph is platonic if it has a planar embedding
where every vertex has same degree (≥3) AND
every face has same degree (≥3)
Let G be a planar graph with n vertices and m edges.
If there is a planar embedding of G where every face has degree ≥3
ightarrowm≤d−2d(n−2)
If G contains a cycle
ightarrow In any planar embedding of G, every face boundary contains a cycle.
Let G be a planar graph with n≥3 vertices
ightarrowm≤3n−6
Let G be a bipartite planar graph with ≥ 3 vertices and m edges.
ightarrowm≤2n−4
K3,3 is not planar.
Edge subdivision of G is obtained by replacing each edge of G
with a new path of length ≥1
A graph is planar
⟺ Graph does not have an edge subdivision of K5 or K3,3 as a subgraph.
If C is a set of size k ("colours")
ightarrowf:V(G)→C s.t. f(u)=f(v) ∀uv∈E(G)
Note: A k-colouring does not need to use all k colours.
G is 2-colourable ⟺ G is bipartite
Kn (complete graph) is n-colourable, and not k-colourable for any k<n
Every planar graph has a vertex of degree ≤5
If G is planar ightarrow G/e is planar.
Dual Graph Results L7-8(G∗)
Key: Colouring faces is equivalent to colouring vertices of dual graph.
The dual graph is planar.
1. If G is connected ightarrow(G∗)∗=G
2. A vertex in G corresponds to a face in G∗ of the same degree.
3. A face in G corresponds to a vertex in G∗ of the same degree.
4. The dual of a platonic graph is platonic.
5. If we draw a closed curve on the plane ightarrow the faces are 2-colourable.
If M is any matching of G and C is any cover in G
$$\Rightarrow
If M is a matching of G and C is a cover of G where $$
Let M be a matching.
Let P be an augmenting path.
Let M′ be a new matching from P.
ightarrowM′=[M∪(E(P)∖M)] ∖(E(P)∩M)
Notes:
- P is always odd length (L8-2 for proof)
- P always starts and ends in different parts of the bipartition.
If a matching M has an augmenting path ightarrow M is not a maximum.
Minimum cover = Y∪(A∖X)
A bipartite graph G with m edges and maximum degree d
has a matching of size ≥dm
Neighbour Set (NG(D) or N(D))
Let D⊆V(G).
Neighbour set of D is set of all vertices adjacent to at least 1 vertex in D.
A bipartite graph G with bipartition (A,B) has a matching that saturates all vertices in A
$$\iff \space \forall \space D \subseteq A,
If G is a k-regular bipartite graph with k≥1
ightarrow G has a perfect matching.
The edges of a k-regular bipartite graph can be partitioned into k perfect matchings.