Skip to content

Commit 49fb8c9

Browse files
Final notes commit before exam
1 parent 7e9f632 commit 49fb8c9

9 files changed

Lines changed: 10 additions & 10 deletions

OMSCS/Courses/GA/Office Hours/2026-03-15 - TA Office Hours - Exam 2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This OH covers the following strategies, outlined below. It also covers the foll
88
- [[4.3 - Squares]]
99
- [[5.9 - Properties of Weighted Undirected Graphs]]
1010
- [[7.22 - Fast Max-Flow Recomputation]]
11-
- [[7.24 - Direct Bipartite Matching (TODO)]]
11+
- [[7.24 - Direct Bipartite Matching]]
1212

1313
## Graph Strategies
1414
- Check for connectivity with BFS or DFS

OMSCS/Courses/GA/Practice Problems/3.11 - Linear-Time Cycle Detection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags:
99
> Design a linear-time algorithm which, given an undirected graph G and a particular edge e in it, determines whether G has a cycle containing e.
1010
1111
## Exploration
12-
We know that since this is an undirected graph, given an edge $e=(u,v)$, there will be no $e'=(v,u)$. Therefore, any cycle involving $e$ must also include some vertex $w$ before returning to $v$ or $u$. If we
12+
We know that since this is an undirected graph, given an edge $e=(u,v)$, there will be no $e'=(v,u)$. Therefore, any cycle involving $e$ must also include some vertex $w$ before returning to $v$ or $u$. If we ...
1313

1414
## Algorithm
1515
Given an edge $e=(u,v)$, remove $e$ from $G$. Run BFS from $u$. If $dist[v] \ne \infty$, then $G$ contains (contained?) a cycle containing edge $e$.

OMSCS/Courses/GA/Practice Problems/3.16 - CS Curriculum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ We use the TopoSort algorithm to generate an array of the vertices of $G$ in top
292292

293293
We initialize an array of length $n$, naming this array $ST$. This array holds the minimum **semester** during which a given course can be **taken**. Each course $v$ starts with $ST[v]=1$.
294294

295-
For each course $v$ in V in $TO$, we check the outgoing edges to each course $u$ which explicitly requires $v$ as a prerequisite. We update $TO[u]$ to the max of $TO[u]$ and $TO[v]+1$.
295+
For each course $u$ in V in $TO$, we check the outgoing edges to each course $v$ which explicitly requires $u$ as a prerequisite. We update $ST[v]$ to the max of $ST[v]$ and $ST[u]+1$.
296296

297297
Now, we have the semesters that each course was taken packaged within $ST$. To find the minimum number of semesters required to complete this CS program, we take the maximum semester number found in $ST$.
298298

OMSCS/Courses/GA/Practice Problems/3.7 - Bipartite Graphs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Run DFS on the graph, producing the pre-order and post-order numbers. Iterate ov
3636

3737
From [[04.1 - Graphs - SCCs]], we know that an edge $e=(u,v)$ is a "back edge" if the postorder number of v ($post[v]$) is higher than the postorder number of u ($post[u] < post[v]$). Using this property, we can iterate over the edges in $G$ and check whether it's a back edge or not.
3838

39-
Next, we need to check and see if that backedge forms a cycle of odd length. This occurs when the difference between
39+
Next, we need to check and see if that backedge forms a cycle of odd length. This occurs when the difference between ...
4040

4141
If no such edge is found then the graph is bipartite.
4242

OMSCS/Courses/GA/Practice Problems/4.20 - Network of Roads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags:
99

1010
## Exploration
1111
- We can't use MSTs for this problem, since the question has to do with total driving distance.
12-
- The problem doesn't clarify whether
12+
- The problem doesn't clarify whether the graph is directed or undirected
1313
- Running Dijkstra's from $s$ would set a good baseline.
1414
- We don't want to run Dijkstra's on all copies of the graph containing some new $e' \in E'$. That would be too expensive.
1515
- We could add all $E'$ to G, making $G'=(V,E \cup E')$. We could run Dijkstra on this new graph and check the shortest path from $s$ to $t$. However, that could result in a shortest path which uses more than one edge from $E'$.

OMSCS/Courses/GA/Practice Problems/5.5 - MST Modifications.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ tags:
44
- Algorithms
55
- Practice
66
---
7-
87
# 5.5 - MST Modifications
98
![[Pasted image 20260316161327.png]]
109

OMSCS/Courses/GA/Practice Problems/5.9 - Properties of Weighted Undirected Graphs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This homework results in the following properties of MSTs.
2020
- Let $e$ be any edge of minimum weight in $G$. Then $e$ must be part of some MST.
2121
- If the lightest edge in a graph is unique, then it must be part of every MST.
2222
- If $e$ is part of some MST of $G$, then it must be a lightest edge across some cut of $G$.
23-
- Kruskal's algorithm works correctly when there are negative edges.
23+
- Kruskal's/Prim's algorithms work correctly when there are negative edges.
2424
- **Unhelpful Information**
2525
- Even if a graph $G$ has more than $|V|-1$ edges, and there is a unique heaviest edge $e$ in $E$, then $e$ may still be part of an MST.
2626
- Even if $G$ has a cycle with a unique lightest edge $e$, then $e$ might not be part of any MSTs.

OMSCS/Courses/GA/Practice Problems/7.24 - Direct Bipartite Matching (TODO).md renamed to OMSCS/Courses/GA/Practice Problems/7.24 - Direct Bipartite Matching.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tags:
44
- Algorithms
55
- Practice
66
---
7-
# 7.24 - Direct Bipartite Matching (TODO)
7+
# 7.24 - Direct Bipartite Matching
88
![[Pasted image 20260317232024.png]]
99
![[Pasted image 20260317232036.png]]
1010

@@ -38,7 +38,7 @@ D <--> F
3838

3939

4040
## 7.24a - Alternating Path
41-
All must start on $D$ and end on $G$ or $I$. These are the only non-covered vertices. None of these vertices can appear on the middle of the path since they're not covered, and therefore you can't arrive on an edge in $M$ and leave on an edge in $E-M$.
41+
All must start on $D$ and end on $G$ or $I$. These are the only non-covered vertices. None of these vertices can appear on the middle of the path since they're not covered, and therefore you can't arrive nor leave on an edge in $M$.
4242

4343
Here's all distinct alternating paths.
4444

@@ -180,3 +180,4 @@ H ==> C
180180
C --> I
181181
F ==> D
182182
```
183+

OMSCS/Courses/GA/Practice Problems/Suggested MST and Max Flow Problems.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ tags:
3434
- **7.22** – In a particular network $G=(V,E)$ whose edges have integer capacities cece​...
3535
- [[7.22 - Fast Max-Flow Recomputation]]
3636
- **7.24**_Direct bipartite matching._
37-
- [[7.24 - Direct Bipartite Matching (TODO)]]
37+
- [[7.24 - Direct Bipartite Matching]]

0 commit comments

Comments
 (0)