1/65
All post midterm content
Matching
A set of edges that share no vertices in common. It does not need to cover all vertices.

Perfect Matching
A matching that covers ALL vertices such that no edges in the matching share a vertex with another matching.

α’(G)
The maximum size of a matching (counts the edges).
Ex: α’(G) = 3

Independent Set
A set of vertices that share no edges in common.
Ex: {4,6}

α(G)
The maximum size of an independent set (counts the vertices).
Ex: α(G) = 4

Vertex Cover
A set of vertices X ⊆ V(G) such that every edge in E(G) has at least one endpoint in X.
Ex: X = {1, 3, 5, 7} accounts for all edges

β(G)
The minimum size of a vertex cover (counts the vertices).
Ex: β(G) = 3

Edge Cover
A set of edges Y ⊆ E(G) such that every vertex in V(G) is in at least one edge of Y.

β’(G)
The minimum size of an edge cover (counts edges).
Ex: β’(G) = 4

Gallai’s Lemma (Vertex Form)
For any graph, α(G) + β(G) = |V(G)|.
Proof:
I is independent ⇒ C is a vertex cover
Let I be an independent set of vertices. Let C = V \ I.
C is a vertex cover because every edge in E(G) has at least one vertex in C
C is a vertex cover ⇒ I is independent
Let C be a vertex cover. Let I = V \ C.
I is independent because no edge has both endpoints in I
“I is independent ⇔ C is a vertex cover” is a bijection between independent sets and vertex covers.
|C| = |V(G)| - |I|
thus, α(G) + β(G) = |V(G)|
Gallai’s Lemma (Edge Form)
For any graph without isolated vertices, α’(G) + β’(G) = |V(G)|.
Proof:
β’(G) ≤ |V(G)| - α’(G)
Let M be a a matching of max size (α’(G)). Let I = V(G) \ V(M).
I is an independent set since M is the largest matching
Let S be a set of an edge on each vertex on I. Let F = S ∪ M.
F = |I| + |E(M)|
|I| = |V(G)| - |V(M)| = |V(G)| - 2|E(M)|
|F| = |V(G)| - 2|E(M)| + |E(M)|
|F| = |V(G)| - α’(G)
F is an edge cover so, β’(G) ≤ |F| and β’(G) ≤ |V(G)| - α’(G)
β’(G) ≥ |V(G)| - α’(G)
Let F be a min. size edge cover β’(G).
Every component of F is a star with the form K(1,t). That means F is a forest of r components and |V(G)| - r edges.
Pick one edge from each component of F and form a matching M so α’(G) ≥ r
β’(G) = |E(F)| = |V(G)| - r
β’(G) ≥ |V(G)| - α’(G)
This proves that β’(G) = |V(G)| - α’(G)
Saturated/Covered Vertices
Vertices that are incident to an edge. Unsaturated/exposed refer to vertices that are incident to no edge.
Ex: Vertices a, b, c, and d are all saturated while vertex 5 is unsaturated.

Perfect Matching
Where all vertices are contained in a matching and none are left exposed. This applies for any graph.
Hall’s Condition / Marriage Theorem
For a complete matching to exist from A to B,
For all X ⊆ A: |N(X)| ≥ |X|
Ex: This graph fails the condition because subset {a, b, c} has 3 vertices but only 2 neighbors.

Hall’s Marriage Theorem (Perfect Matching Version)
For a complete matching to exist from A to B,
For all X ⊆ A and all X ⊆ B: |N(X)| ≥ |X|
(Proof in notes)
k-Regular
When every vertex of the graph has degree k.
Ex: This graph is 4-regular where all vertices have degree 4

k-Regular Bipartite Graphs
If a bipartite graph is also k-regular, it has a perfect matching. Hall’s condition holds.
Every k-regular bipartite graph has a 1-factorization in which all the edges can be split into perfect matchings.

Theorem of Systems of Distinct Representatives (SDR)
An SDR/transversal is a selection of unique elements from each set in a collection with no repeats. By applying Hall’s Theorem to a bipartite graph, we get:
Sets S1, … , Sn have an SDR iff |∪i∈X S| ≥ |X| for all X ⊆ {1, 2, … , n}
This is another way of saying “∀ X ⊆ A: |N(X)| ≥ |X|” but for collections of sets
Latin Squares and Rectangles
A Latin Square is an n x n array with n symbols s.t. every row and every column uses each symbol exactly once.
The rectangle is an m x n array with the same condition. A theorem states that a Latin rectangle can always be extended to a Latin square.

König-Ore Formula
If a graph G(A, B) is bipartite, then
𝗑(G, A) = maxS⊆A(|S| - |N(S)|) and 𝗑(G, B) = maxS⊆B(|S| - |N(S)|)
This gives us the formula for the maximize size of a matching:
α’(G) = |A| - 𝗑(G, A) = |B| - 𝗑(G, B)
This means that you can get the maximum size of a matching by taking the number of vertices in X and subtracting it by the minimum number of exposed vertices in X after creating a maximum matching.
König-Egeváry Theorem
For any bipartite graph, α’(G) = β(G):
max size matching = min size vertex cover
If the bipartite graph does not have any isolated vertices, then α(G) = β’(G):
max size independent set = min size edge cover
M-Alternating Path
A path that alternates between edges in the matching M and edges outside of M.
Ex: The red line represents a matching. The yellow path is alternating because its beginning edge (regardless of if you start at vertex 1 or b) is in the matching.

M-Augmenting Path
A path that starts and ends at exposed vertices of the matching M.
It always has an odd number of edges.
Ex: The red line represents a matching. The yellow path is augmenting because both its starting and ending vertices aren’t in matchings.

Berge’s Lemma
A matching M in a graph G is maximum iff M does not admit any augmenting paths.
This lemma can be applied to find M-augmenting paths to increase the size of a matching until it’s maximum:
start with any valid matching (or with an empty set of matches)
search for an augmenting path
flip the edges along the path so that the edges outside of the matching are now a matching and the edges inside the matching are no longer a matching
repeat until max size matching found
Ranked Matchings
Consider n people (set A) applying to n job (set B). All people rank all jobs, and vice versa.
A perfect matching is always possible, and |A| = |B|

Unstable Matching
For a matching M, an unstable pair is x A, y B where xy aren’t matched but they each prefer each other over who they’re matched to in M.
A matching is unstable if there are any unstable pairs, and stable if there aren’t.
Pairing together xy to fix one unstable matching may benefit xy but worsen the matching preferences of other xy.

Gale-Shapley Algorithm
n Applicants submit their job preference ranking after applying to n jobs. The job company ranks the applicants and labels them as “maybe” or “no” based on how strong the possible matching is. After multiple rounds of applications, the job company arrives at a matching for each job. They convert their “maybe” applicants into “yes”, resulting in a perfect and stable matching.
Facts:
once a company makes a match, they never unmatch, just trade up for a higher-ranked applicant. applicants go back and forth between match and unmatched
stable matchings are not unique; there are n! perfect matchings and 3 were stable in our example

Proper Coloring
Let G be a graph and C be a set of colors. A proper coloring of G by C is to assign a color from C to every vertex s.t all vertices adjacent to one another have distinct colors.
Ex: This graph is a proper 4-coloring.

K-colorable
When a proper coloring exists with k colors.
Ex: This graph is 6-colorable because you could use a distinct color for each vertex, making it proper.

χ(G)
The chromatic number, which is the minimum number of colors needed for a proper vertex coloring. G is k-chromatic if χ(G) = k.
Ex: The graph has a chromatic number of 3.

Clique
A subset of vertices where every single vertex is directly connected to every other vertex in the subset. This means that all vertex colorings in a clique must be distinct. Cliques also form a complete graph, Km.
Ex: The graph has two cliques outlined by pink and blue. Both are K3 subgraphs and all vertices in each clique have distinct colors

Proper Edge Coloring
A coloring for every edge in a graph so that no edges that share a vertex have the same color.
The definitions of k-colorable also transfer to edges, making k-edge-colorable if a k-edge coloring exists for k colors.
Ex: This is a proper 5 edge coloring

χ’(G)
The chromatic index, which is the minimum number of colors for a proper edge coloring to exist.
In general, we can expect χ’(G) ≥ Δ(G) since all vertices of max degree must have different colored edges.
Ex: χ’(G) for this graph is 4.

Bipartite Graphs and Coloring
Fact: a graph is bipartite iff it is 2-colorable.
Bipartitions consist of all the vertices in G belonging to either set A or set B (not both). Because of this, a coloring can be applied to all vertices in A and another coloring can be applied to all of B.
Ex: This is a grid bipartite graph where all vertices have either a black or white coloring depending on which set (A or B) they belong to.

Independent Sets and Matchings
Facts:
In a proper vertex coloring, all vertices of the same color form an independent set
In a proper edge coloring, all edges of the same color form a matching
Konig’s Edge Coloring Theorem
For any bipartite graph, χ’(G) = Δ(G)
VIzing’s Theorems
For any simple graph, χ’(G) = Δ(G) or Δ(G) + 1
For any multigraph, χ’(G) = Δ(G) + d for some 0 ≤ d ≤ μ(G), where μ(G) is the max edge multiplicity
Ex: Above is a multigraph with μ(G) = 3 and Δ(G) = 4. χ’(G) is guaranteed to be between Δ ≤ Δ + 3, meaning 4 ≤ χ’(G) ≤ 7.

Brooks’ Theorem
All connected graphs have χ(G) ≤ Δ(G), except for Kn and odd cycles.
Odd cycles have χ(G) = Δ(G) + 1
Brook’s Theorem: Lemmas
Brook’s theorem that χ(G) ≤ Δ(G) applies for the following special cases:
G has a cut vertex, v
G has a vertex cut of size 2
K-Degenerate Graphs
A graph G is k-degenerate if all subgraphs of G have a minimum degree ≤ k.
You can determine this by using this algorithm:
start at one vertex, label it as v1
delete the edges incident to v1
pick and label v2, and delete its incident edges
repeat the process until there are no more vertices and edges left
after each deletion, write down the degree of vi just before removing it

K-Degenerate Theorem
If a graph is k-degenerate, then χ(G) ≤ k + 1
Scheduling Problem
Students want to take certain classes, so they have to be scheduled in a way so that students can take all the classes they wish without overlapping conflicts. To solve this, create an interference graph:
make a vertex for each class
add an edge between 2 classes u and v if a student wants to take both of them
any proper coloring of the graph gives a schedule without anyone having a conflict, but try to find minimum colors to minimize the time slots

Planar Embedding
A drawing of a graph in the plane without edges crossing. A graph is planar if a planar embedding of it exists

Face
A region whose boundary is a closed walk in the graph. Every graph also includes the infinite face that is not bounded.
Ex: the image has 2 bounded faces (yellow and blue), and the infinite face (green)

Euler’s Theorem
Let G be a connected planar graph with V = number of vertices, E = number of edges, and F = number of faces (including the infinite face) of G. Then V - E + F = 2 is true
Face Degrees
The degree of a face is the number of edges it is bound by, but for the infinite face it’s the number of outer edges it touches.
The sum of face degrees is 2E, making it analogous to the Handshaking Lemma.
Ex: Face B is bound by 6 edges (B5 and B6 count as separate edges) and infinite face A touches 7.

Inequalities between V, E, F
Given a planar graph G, if G is simple and if V ≥ 3, then
3F ≤ 2E
E ≤ 3V - 6
F ≤ 2V - 4
If G is simple and bipartite, then
2F ≤ E
E ≤ 2V - 4
F ≤ V - 2
The slide contains more inequalities.

Homeomorphism
Graphs G and H are homeomorphic (edge equivalent) if their edges can be subdivided (by adding a vertex along it) or smoothed (vertices can be removed along it)

Kuratowski’s Theorem
G is planar iff it does not have a subgraph homeomorphic to K5 or K3,3
K5 is typically easy to spot, but K3,3 can be trickier, so the best way to find it is:
create a bipartition of any 3 vertices in set A and any 3 in set B s.t. no v is in both A and B
confirm that these 6 vertices form K3,3. Otherwise, try different sets of 3 vertices.
Dual Graphs
A dual graph H is a reconstruction of a planar graph G where the number of faces and vertices in G are swapped in H.
start with a planar embedding of G
draw a red vertex inside each face, including the infinite face
for every edge in G, draw a red edge connecting the two red vertices on the two sides of the original edge
remove the original G, leaving behind a red dual graph, H
A proper coloring of the vertices in H gives a proper coloring of the faces of G.

Degrees in a Planar Graph: Theorems
Every simple planar graph has a vertex with degree at most 5. Thus, the minimum degree ≤ 5
Every simple planar graph is 5-degenerate
Every simple planar graph is 5-colorable
Every simple graph is 4-colorable (four color theorem; controversial proof)
Flow (basic definition)
Sending a number of units from a source to a sink via a path on a simple digraph.
A flow is static if it has no time dependence, like the graph above. Units travel at a steady state.

Kirchoff’s Law
Something is only considered a flow from s (source) to t (sink) if for all vertices x except s and t, flow into x = flow out of x.
Ex: if 5 units go into vertex B, B must release these 5 units to other vertices. Only then does a flow exist from s to t with vertex B.

v(f)
The value of a flow is calculated from either s (source) or t (sink):
source’s out flow - source’s in flow
sink’s inflow - sink’s out flow
Ex: if s = A and t = E, v(f) = 5 - 0 = 5

Capacities
An upper limit on each edge’s flow, denoted by c.
Ex: c(B, D) = 15. The flow on this edge, f(B, D), is 2, which does not exceed the capacity.

Maximum Flow
Find a flow that maximizes v(f) by finding augmenting paths from source to sink. You may go backwards against the direction of an edge, but instead of it gaining the units, it loses/subtracts the units.
Ex: The graph on the left retains the original flow of the highlighted path. The graph on the right adjusts the flow so that every outflow=inflow, accounting for the reverse/backwards edges. The path travels from A - C - B - D - E even though C has no flow to B, forcing C - B to lose 2 units and have C gain those units. B - D and D - E gain 2 as a result to balance outflow-inflow.

Residual Capacity
The residual capacity of an edge is how much more it can carry.
If you take the residual capacity of all edges along a path and select the minimum ϵ, then ϵ is the maximum that we can increase the flow by without going over any capacities.
FOR EDGES BOTH WAYS:
cf(u,v) = c(u, v) - f(u, v) + f(v, u)
residual capacity = remaining forwards capacity + amount cancelable in reverse

Ford-Fulkerson Algorithm
A max flow can always be found using the following steps:
initialize f(x,y) = 0 for all vertices x,y
while an augments path from s to t with ϵ > 0 exists, increase f by ϵ along forward edges of the path and decrease f by ϵ along reverse edges
Cuts
A partition that separates all V(G) into either sets S or T where s ∈ S and t ∈ T.
In principle, with n ≥ 2 vertices, there are 2n-2 possible cuts
Capacity of a Cut
The sum of capacities of edges xy with x ∈ S and y ∈ T:
c(S, T) = Σx∈S Σy∈T c(x,y)
Note that the only edges whose capacities are being summed up are edges that cross from S to T.
Ex: edges (B, D) and (C, E) are the only edges that cross the cut from S to T, so only their capacities are added up. The capacity of the cut here is 15 + 30 = 45

v(f) Using a Cut
For any flow f and any cut (S, T):
v(f) = Σx∈S Σy∈T f(x,y) - Σw∈T Σx∈S f(w,x)
In other words, v(f) = flows that cross from S to T - flows that cross from T to S
Ex: edges (B,D) and (C,E) cross from S to T, so we add up their flow and subtract the flow of (D, C) since it crosses from T to S.

Max-Flow Min-Cut Theorem
The maximum flow value equals the minimum cut capacity. These can be tied with other max flows/min cuts, but the value should be unique (if it equals 23, all other tied flow/cuts need to also equal 23).
To find the max flow, use the Ford-Fulkerson Algorithm.
Flows with Multi-edges
You can approach them in any of the following ways:
label the flows and paths by edge
subdivide edges so that there are no multi-edges
merge edges by adding their flows and capacities into 1

Flows on Undirected Graphs
Replace each undirected edge into 2 directed edges in opposite directions
Figure out the net flow in each direction
Remove the directions on the edges, but give the flows the direction

Mutually Visible
Two points are mutually visible if the straight line segment between them is fully contained in the region.
Art Gallery Theorem
Let n ≥ 3. The interior of every n-gon (n-sided/vertex polygon) can be guarded with ≤ n/3 cameras, and there is an n-gon requiring ≤ n/3 cameras