MATH154 Chap. 5-8

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/65

flashcard set

Earn XP

Description and Tags

All post midterm content

66 Terms

1
New cards

Matching

A set of edges that share no vertices in common. It does not need to cover all vertices.

<p>A set of edges that share no vertices in common. It does not need to cover all vertices.</p>
2
New cards

Perfect Matching

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

<p>A matching that covers ALL vertices such that no edges in the matching share a vertex with another matching.</p>
3
New cards

α’(G)

The maximum size of a matching (counts the edges).

Ex: α’(G) = 3

<p>The maximum size of a matching (counts the edges).</p><p>Ex: α’(G) = 3</p>
4
New cards

Independent Set

A set of vertices that share no edges in common.

Ex: {4,6}

<p>A set of vertices that share no edges in common.</p><p>Ex: {4,6}</p>
5
New cards

α(G)

The maximum size of an independent set (counts the vertices).

Ex: α(G) = 4

<p>The maximum size of an independent set (counts the vertices).</p><p>Ex: α(G) = 4</p>
6
New cards

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

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

β(G)

The minimum size of a vertex cover (counts the vertices).

Ex: β(G) = 3

<p>The minimum size of a vertex cover (counts the vertices).</p><p>Ex: β(G) = 3</p>
8
New cards

Edge Cover

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

<p>A set of edges Y ⊆ E(G) such that every vertex in V(G) is in at least one edge of Y.</p>
9
New cards

β’(G)

The minimum size of an edge cover (counts edges).

Ex: β’(G) = 4

<p>The minimum size of an edge cover (counts edges).</p><p>Ex: β’(G) = 4</p>
10
New cards

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)|


11
New cards

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)


12
New cards

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.

<p>Vertices that are incident to an edge. Unsaturated/exposed refer to vertices that are incident to no edge.</p><p>Ex: Vertices a, b, c, and d are all saturated while vertex 5 is unsaturated.</p>
13
New cards

Perfect Matching

Where all vertices are contained in a matching and none are left exposed. This applies for any graph.

14
New cards

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.

<p>For a complete matching to exist from A to B,</p><p>For all X ⊆ A: |N(X)| ≥ |X|</p><p></p><p>Ex: This graph fails the condition because subset {a, b, c} has 3 vertices but only 2 neighbors.</p>
15
New cards

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)

16
New cards

k-Regular

When every vertex of the graph has degree k.

Ex: This graph is 4-regular where all vertices have degree 4

<p>When every vertex of the graph has degree k.</p><p>Ex: This graph is 4-regular where all vertices have degree 4</p>
17
New cards

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.

<p>If a bipartite graph is also k-regular, it has a perfect matching. Hall’s condition holds. </p><p>Every k-regular bipartite graph has a 1-factorization in which all the edges can be split into perfect matchings. </p>
18
New cards

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

19
New cards

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.

<p>A Latin Square is an n x n array with n symbols s.t. every row and every column uses each symbol exactly once.</p><p>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.</p>
20
New cards

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.


21
New cards

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


22
New cards

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.

<p>A path that alternates between edges in the matching M and edges outside of M.</p><p></p><p>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. </p>
23
New cards

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.

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

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


25
New cards

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|

<p>Consider n people (set A) applying to n job (set B). All people rank all jobs, and vice versa.</p><p>A perfect matching is always possible, and |A| = |B|</p>
26
New cards

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.

<p>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.</p><p>A matching is unstable if there are any unstable pairs, and stable if there aren’t.</p><p>Pairing together xy to fix one unstable matching may benefit xy but worsen the matching preferences of other xy.</p>
27
New cards

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


<p>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.</p><p></p><p>Facts:</p><ul><li><p>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</p></li><li><p>stable matchings are not unique; there are n! perfect matchings and 3 were stable in our example</p></li></ul><p></p>
28
New cards

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.

<p>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.</p><p><br>Ex: This graph is a proper 4-coloring.</p>
29
New cards

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.

<p>When a proper coloring exists with k colors.</p><p></p><p>Ex: This graph is 6-colorable because you could use a distinct color for each vertex, making it proper. </p>
30
New cards

χ(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.

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

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

<p>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, K<sub>m</sub>.</p><p></p><p>Ex: The graph has two cliques outlined by pink and blue. Both are K<sub>3</sub> subgraphs and all vertices in each clique have distinct colors</p>
32
New cards

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

<p>A coloring for every edge in a graph so that no edges that share a vertex have the same color.</p><p>The definitions of k-colorable also transfer to edges, making k-edge-colorable if a k-edge coloring exists for k colors. </p><p></p><p>Ex: This is a proper 5 edge coloring </p>
33
New cards

χ’(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.

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

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.

<p>Fact: a graph is bipartite iff it is 2-colorable.</p><p>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. </p><p></p><p>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.</p>
35
New cards

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


36
New cards

Konig’s Edge Coloring Theorem

For any bipartite graph, χ’(G) = Δ(G)

37
New cards

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.

<ul><li><p>For any simple graph, χ’(G) = Δ(G) or Δ(G) + 1</p></li><li><p>For any multigraph, χ’(G) = Δ(G) + d for some 0 ≤ d ≤ μ(G), where μ(G) is the max edge multiplicity</p></li></ul><p></p><p>Ex: Above is a multigraph with μ(G) = 3 and Δ(G) = 4. χ’(G) is guaranteed to be between Δ ≤ Δ + 3, meaning 4 ≤ χ’(G) ≤ 7.</p>
38
New cards

Brooks’ Theorem

All connected graphs have χ(G) ≤ Δ(G), except for Kn and odd cycles.

Odd cycles have χ(G) = Δ(G) + 1

39
New cards

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


40
New cards

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


<p>A graph G is k-degenerate if all subgraphs of G have a minimum degree ≤ k.</p><p></p><p>You can determine this by using this algorithm:</p><ul><li><p>start at one vertex, label it as v<sub>1</sub></p></li><li><p>delete the edges incident to v<sub>1</sub></p></li><li><p>pick and label v<sub>2</sub>, and delete its incident edges</p></li><li><p>repeat the process until there are no more vertices and edges left</p></li><li><p>after each deletion, write down the degree of v<sub>i</sub> just before removing it</p></li></ul><p></p>
41
New cards

K-Degenerate Theorem

If a graph is k-degenerate, then χ(G) ≤ k + 1

42
New cards

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


<p>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:</p><ul><li><p>make a vertex for each class</p></li><li><p>add an edge between 2 classes u and v if a student wants to take both of them</p></li><li><p>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</p></li></ul><p></p>
43
New cards

Planar Embedding

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

<p>A drawing of a graph in the plane without edges crossing. A graph is planar if a planar embedding of it exists</p>
44
New cards

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)

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

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

46
New cards

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.

<p>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.</p><p>The sum of face degrees is 2E, making it analogous to the Handshaking Lemma.</p><p></p><p>Ex: Face B is bound by 6 edges (B5 and B6 count as separate edges) and infinite face A touches 7.</p>
47
New cards

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.

<p>Given a planar graph G, if G is simple and if V <strong>≥ </strong>3, then</p><ul><li><p>3F ≤ 2E</p></li><li><p>E ≤ 3V - 6</p></li><li><p>F ≤ 2V - 4</p></li></ul><p></p><p>If G is simple and bipartite, then</p><ul><li><p>2F ≤ E</p></li><li><p>E ≤ 2V - 4</p></li><li><p>F ≤ V - 2</p></li></ul><p></p><p>The slide contains more inequalities.</p>
48
New cards

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)

<p>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)</p>
49
New cards

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.


50
New cards

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.


<p>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.</p><ul><li><p>start with a planar embedding of G</p></li><li><p>draw a red vertex inside each face, including the infinite face</p></li><li><p>for every edge in G, draw a red edge connecting the two red vertices on the two sides of the original edge</p></li><li><p>remove the original G, leaving behind a red dual graph, H</p></li></ul><p></p><p>A proper coloring of the vertices in H gives a proper coloring of the faces of G.</p><p></p>
51
New cards

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)


52
New cards

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.

<p>Sending a number of units from a source to a sink via a path on a simple digraph. </p><p>A flow is static if it has no time dependence, like the graph above. Units travel at a steady state.</p>
53
New cards

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.

<p>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.</p><p></p><p>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.</p>
54
New cards

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

<p>The value of a flow is calculated from either s (source) or t (sink):</p><ul><li><p>source’s out flow - source’s in flow</p></li><li><p>sink’s inflow - sink’s out flow</p></li></ul><p></p><p>Ex: if s = A and t = E, v(f) = 5 - 0 = 5</p>
55
New cards

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.

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

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.

<p>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. </p><p></p><p>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. </p>
57
New cards

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

<p>The residual capacity of an edge is how much more it can carry. </p><p>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. </p><p></p><p>FOR EDGES BOTH WAYS:</p><p>c<sub>f</sub>(u,v) = c(u, v) - f(u, v) + f(v, u)</p><p>residual capacity = remaining forwards capacity + amount cancelable in reverse</p>
58
New cards

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


59
New cards

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

60
New cards

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

<p>The sum of capacities of edges xy with x ∈ S and y ∈ T:</p><p>c(S, T) = Σ<sub>x∈S</sub> Σ<sub>y∈T</sub> c(x,y)</p><p>Note that the only edges whose capacities are being summed up are edges that cross from S to T.</p><p></p><p>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</p>
61
New cards

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.

<p>For any flow f and any cut (S, T):</p><p>v(f) = Σ<sub>x∈S</sub> Σ<sub>y∈T</sub> f(x,y) - Σ<sub>w∈T</sub> Σ<sub>x∈S</sub> f(w,x)</p><p>In other words, v(f) = flows that cross from S to T - flows that cross from T to S</p><p></p><p>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. </p>
62
New cards

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.

63
New cards

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


<p>You can approach them in any of the following ways:</p><ul><li><p>label the flows and paths by edge</p></li><li><p>subdivide edges so that there are no multi-edges</p></li><li><p>merge edges by adding their flows and capacities into 1</p></li></ul><p></p>
64
New cards

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


<ul><li><p>Replace each undirected edge into 2 directed edges in opposite directions</p></li><li><p>Figure out the net flow in each direction </p></li><li><p>Remove the directions on the edges, but give the flows the direction</p></li></ul><p></p>
65
New cards

Mutually Visible

Two points are mutually visible if the straight line segment between them is fully contained in the region.

66
New cards

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