\documentclass{article}
\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
\usepackage{fancyheadings,enumerate,xspace,graphicx}
\pagestyle{fancy}
\usepackage{amssymb}

% macros useful for handouts and homeworks.
\newcommand{\setcourse}[1]{\newcommand{\course}{#1\xspace}}
\newcommand{\setsem}[1]{\newcommand{\sem}{#1\xspace}}
\newcommand{\setyear}[1]{\newcommand{\myyear}{#1\xspace}}
\newcommand{\sethwnum}[1]{\newcommand{\hwnum}{#1\xspace}}

\newcommand{\solution}[1]{\textbf{Solution:} #1}

\setcourse{CS 4104}
\setsem{Fall}
\setyear{2021}
\sethwnum{6}

\newcommand{\cut}[1]{\ensuremath{\mathnormal{}{cut}(#1)}}
\newcommand{\calg}{\ensuremath{{\cal G}}\xspace}
\newcommand{\calo}{\ensuremath{{\cal O}}\xspace}
\newcommand{\reals}{\ensuremath{\mathbb{R}}}

\chead{\course (\sem \myyear): Homework \hwnum}


\begin{document}
\title{\vspace{-0.5in}\textbf{Homework \hwnum}}
\author{\course (\sem \myyear)}

\date{Assigned on November 9, \myyear. \\Submit PDF solutions on Canvas by the
  \\  11:59pm on November 18, \myyear.}
\maketitle

\input{instructions} 

\noindent \textbf{Additional notes.}
\begin{itemize}
\item For some of the problems in this homework, you will reduce the given problem to one of the flow-related problems we solved in class. Make sure you describe the reduction completely. For example, if you reduce a problem to the maximum network flow problem itself, specify clearly how will convert an input to the original problem into a flow network (nodes, source and sink, edges, directions, and edge  capacities). Do not forget to the prove the correctness of your solution in both directions, as we did in class (lest you transmogrify Calvin-sized Hobbes into a dinosaur).
  
\item For some of the problems in this homework, you do not have to reduce the problem ``all the way'' to computing the maximum flow in a network. A reduction to maximum bipartite matching or to minimum cut  may suffice. You can then use the polynomial time algorithms we have developed for these problems to solve the original problem. In other  words, you do not have to also describe how to reduce maximum bipartite match matching or minimum cut to the maximum flow problem.
\end{itemize}


\begin{description}

\item[Problem 1] (15 points) Suppose you have a potential solution to a maximum-flow problem, i.e., you have a flow network $G=(V,E)$ (with $s$ and $t$ and edge capacities, defined, of course) and an assignment $f: E \rightarrow \reals^+$ that satisfies the capacity and conservation conditions. Develop an efficient algorithm to determine if $f$ is indeed a maximum flow. 
  
  % \solution{ 

  % }
  
\item[Problem 2] (25 points) Given a flow network $G$, suppose $f$ is an $s$-$t$ flow with positive value, i.e., $\nu(f) > 0$. Consider the subgraph $G'$ of $G$ that only consists of edges that carry positive flow, i.e., an edge $e$ is in $G'$ if and only if $f(e) > 0$. Prove that there must be a simple $s$-$t$ path in $G'$. \emph{Note:} $G'$ is not the residual graph.
  
  % \solution{ 

  % }
  
  

  
\item[Problem 3] (30 points) You are given a flow network $G = (V, E, c, d)$. Here the function $c: E \rightarrow \mathbb{Z}^+$ specifies the positive capacity for each edge. In addition, the function $d: V \rightarrow \mathbb{Z}$ is a function that specifies the maximum incoming flow for each node, i.e., for every node $v$, the total value of the flow coming into $v$ cannot be larger than $d(v)$; note that $d(v)$ may be zero for some nodes. Given a source $s$ and a sink $t$, develop an algorithm to compute the maximum flow in this network. You may assume that $d(s) = 0$ and $d(t)$ is unbounded.
  
  % \solution{ 
  
  % }
  
  
\item[Problem 4] (30 points) Solve exercise 6 in Chapter 7 (pages 416--417) of your textbook.
  
  % \solution{
  
  % }
  
  

\end{description}

\end{document}


%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
