How can the max-flow and min-cut problems, if dual to one another, both have unbounded optimal value?
Here is an example of this anomaly in linear programs:

$$
\begin{align*}
&amp; \max x &amp; &amp; \min \infty y \\
s.t.\; &amp; x \leq \infty &amp; s.t.\; &amp; y \geq 1 \\
&amp; x \geq 0 &amp; &amp; y \geq 0
\end{align*}
$$

The solution to both programs is $\infty$. What goes wrong?

The duality theorem only works when all coefficients are finite. If you go through a proof of the duality theorem you'll see exactly where it fails, and this is a nice exercise.

I should also stress that $\infty$ isn't usually regarded as a legitimate number in these contexts. If we assume all coefficients are real numbers, then $\infty$ is nothing else than a type mismatch.