Applied edits to network flow handout
This commit is contained in:
@ -1,23 +1,23 @@
|
||||
\section{Network Flow}
|
||||
|
||||
\generic{Networks}
|
||||
Say have a network: a sequence of pipes, a set of cities and highways, an electrical circuit, server infrastructure, etc.
|
||||
Say have a network: a sequence of pipes, a set of cities and highways, an electrical circuit, etc.
|
||||
|
||||
\vspace{1ex}
|
||||
|
||||
We'll represent our network with a connected directed weighted graph. If we take a city, edges will be highways and cities will be nodes. There are a few conditions for a valid network graph:
|
||||
We can draw this network as a directed weighted graph. If we take a transporation network, for example, edges will represent highways and nodes will be cities. There are a few conditions for a valid network graph:
|
||||
|
||||
\begin{itemize}
|
||||
\item The weight of each edge represents its capacity, the number of lanes in the highway.
|
||||
\item The weight of each edge represents its capacity, e.g, the number of lanes in the highway.
|
||||
\item Edge capacities are always positive integers.\hspace{-0.5ex}\footnotemark{}
|
||||
\item Node $S$ is a \textit{source}: it produces flow.
|
||||
\item Node $T$ is a \textit{sink}: it consumes flow.
|
||||
\item All other nodes \textit{conserve} flow. In other words, the sum of flow coming in must equal the sum of flow going out.
|
||||
\item All other nodes \textit{conserve} flow. The sum of flow coming in must equal the sum of flow going out.
|
||||
\end{itemize}
|
||||
|
||||
\footnotetext{An edge with capacity zero is equivalent to an edge that does not exist; An edge with negative capacity is equivalent to an edge in the opposite direction.}
|
||||
|
||||
Here is an example of a such a graph:
|
||||
Here is an example of such a graph:
|
||||
\begin{center}
|
||||
\begin{tikzpicture}
|
||||
|
||||
@ -43,7 +43,7 @@ Here is an example of a such a graph:
|
||||
\hrule{}
|
||||
|
||||
\generic{Flow}
|
||||
In our city example, cars represent \textit{flow}. Let's send one unit of cars along the topmost highway:
|
||||
In our city example, traffic represents \textit{flow}. Let's send one unit of traffic along the topmost highway:
|
||||
|
||||
\vspace{2ex}
|
||||
|
||||
@ -89,11 +89,9 @@ In our city example, cars represent \textit{flow}. Let's send one unit of cars a
|
||||
|
||||
\vspace{1ex}
|
||||
|
||||
The \textit{magnitude} of a flow\footnotemark{} is the number of \say{flow-units} that go from $S$ to $T$. \\
|
||||
The \textit{magnitude} of a flow is the number of \say{flow-units} that go from $S$ to $T$. \\
|
||||
|
||||
We are interested in the \textit{maximum flow} through this network: what is the greatest amount of flow we can push from $S$ to $T$?
|
||||
|
||||
\footnotetext{you could also think of \say{flow} as a directed weighted graph on top of our network.}
|
||||
We are interested in the \textit{maximum flow} through this network: what is the greatest amount of flow we can get from $S$ to $T$?
|
||||
|
||||
\problem{}
|
||||
What is the magnitude of the flow above?
|
||||
@ -156,7 +154,8 @@ Find a maximal flow on the graph below. \\
|
||||
\pagebreak
|
||||
|
||||
\section{Combining Flows}
|
||||
It is fairly easy to combine two flows on a graph. All we need to do is add the flows along each edge. For example, consider the following flows:
|
||||
It is fairly easy to combine two flows on a graph. All we need to do is add the flows along each edge. \\
|
||||
Consider the following flows:
|
||||
|
||||
\vspace{2ex}
|
||||
|
||||
@ -266,11 +265,7 @@ It is fairly easy to combine two flows on a graph. All we need to do is add the
|
||||
|
||||
\vspace{1ex}
|
||||
|
||||
For example, we could not add these graphs if the magnitude of flow in the right graph above was 2.
|
||||
|
||||
\vspace{1ex}
|
||||
|
||||
This is because the capacity of the top-right edge is 2, and $2 + 1 > 2$.
|
||||
For example, we could not add these graphs if the magnitude of flow in the right graph above was 2, since the capacity of the top-right edge is 2, and $2 + 1 > 2$.
|
||||
\end{minipage}
|
||||
|
||||
\vspace{2ex}
|
||||
@ -278,7 +273,7 @@ It is fairly easy to combine two flows on a graph. All we need to do is add the
|
||||
\vspace{2ex}
|
||||
|
||||
\problem{}
|
||||
Combine the following flows and ensure that the flow along all edges remains within capacity.
|
||||
Combine the flows below, ensuring that the flow along each edge remains within capacity.
|
||||
|
||||
\vspace{2ex}
|
||||
|
||||
|
Reference in New Issue
Block a user