Is the Ford-Fulkerson algorithm a tropical rational function?

Here is an extremely inefficient implementation of Edmonds-Karp (breadth-first search) given as a tropical rational map. (Hopefully I've understood the definition of tropical rational map correctly.)

First, observe that in the usual implementation of Edmonds-Karp, no path is used more than once, since if $p$ is a shortest path with nonzero capacity, the residual edges of $p$ can only be used in a longer path. So if we perform Ford-Fulkerson by iterating over all paths in increasing order of length, the algorithm will terminate with the maximum flow.

Let $\bar{D}$ be the graph obtained by adding, for every edge $a$, a residual edge $\bar{a}$ with target and source reversed. We denote by $\bar{A}$ the set of residual edges. If $a \in \bar{A}$ is a residual edge, we will likewise denote by $\bar{a} \in A$ the edge in the original graph corresponding to $a$. Let $\{p_i\}_{i = 1}^N$ be any fixed enumeration of the acyclic paths from $s$ to $t$ in $\bar{D}$ in increasing order of length.

We will construct our tropical rational map $\mathbb{N}^A \to \mathbb{N}^A$ in three pieces:

First, let $g: \mathbb{N}^A \to \mathbb{N}^{A \sqcup \bar{A}}$ be the augmentation map, taking $c: A \to \mathbb{N}$ to $\bar{c}: A \sqcup \bar{A} \to \mathbb{N}$, where $\bar{c}$ is equal to $c$ on $A$ and identically zero on $\bar{A}$.

For any path $p = (a_1, a_2, \ldots, a_n)$, let $f_p: \mathbb{N}^{A \sqcup \bar{A}} \to \mathbb{N}^{A \sqcup \bar{A}}$ be defined by

$$f_p(c)(a) = \begin{cases} c(a) - \min(c(a_1), \ldots, c(a_n)) \textrm{ if } a \in p,\\ c(a) + \min(c(a_1), \ldots, c(a_n)) \textrm{ if } \bar{a} \in p,\\ c(a) \textrm{ otherwise.}\end{cases}$$

Note that $f_p(c) = c$ if $c$ is zero on any edge in $p$.

Finally, let $r: \mathbb{N}^{A \sqcup \bar{A}} \to \mathbb{N}^A$ be defined by $r(c)(a) = c(\bar{a})$.

Then the composite $r \circ f_{p_N} \circ \cdots \circ f_{p_1} \circ g: \mathbb{N}^A \to \mathbb{N}^A$ is a tropical rational map sending a capacity function $c$ to a maximum-value $c$-flow.


EDIT: For completeness, let me give the full argument that if $p$ is a shortest path with nonzero flow, its residual edges can only be used in longer paths. (This is a standard argument in the analysis of the termination and complexity of Edmonds-Karp.)

Denote by $c_i$ the capacity function on $\bar{D}$ after $i$ steps of Edmonds-Karp, and for any vertex $v \in V$, denote by $\ell_i(v)$ the length of the shortest path from $s$ to $v$ in $\bar{D}$ with nonzero $c_i$-flow (i.e., every edge $a$ in the path has $c_i(a) > 0$).

The $(i + 1)$st step of Edmonds-Karp involves flowing along a shortest nonzero-$c_i$-flow path $p$. If $p$ visits vertices $s = v_0, v_1, v_2, \ldots, v_n = t$, then since $p$ is a shortest path, $\ell_i(v_k) = k$ for all $k$. In Edmonds-Karp, we modify the flow capacity by reducing capacity along the edges of $p$ and increasing capacity along the residual edges of $p$. Each residual edge goes from an vertex $v_k$ with $\ell_i(v_k) = k$ to a vertex $v_{k - 1}$ with $\ell_i(v_{k - 1}) = k - 1$.

Now suppose $q$ is a shortest nonzero-$c_{i + 1}$-flow path from $s$ to $t$. Then for each edge from $w_k$ to $w_{k + 1}$ in $q$, $\ell_i(w_{k + 1}) \leq \ell_i(w_k) + 1$, so the length of $q$ is at least $n$ (i.e., the length of $p$), and moreover, if $q$ contains any residual edges of $p$, it must be even longer, since the inequality is strict for those edges. Indeed, by induction, as long as we are flowing along paths of length $n$, we must only be using edges from $w_k$ to $w_{k + 1}$ such that $\ell_i(w_k) = k$ and $\ell_i(w_{k + 1}) = k + 1$.

What this analysis shows is that if we flow along a path $p$ of length $n$ in Edmonds-Karp, we cannot create shorter paths with nonzero flow. Moreover, any other shortest path of length $n$ will not include any residual edges of $p$, so the order in which we try to flow through paths of length $n$ does not matter.


In the comments I suggested that Hillman-Grassl may be related to a "column insertion" version of RSK. Based on a few examples (larger than $2\times 2$) I checked, I am now less sure that there is a direct connection. However, answering your question four, I think that "inverse Hillman-Grassl correspondence", as you call it, (i.e., the map from fillings of $\lambda$ with arbitrary nonnegative integers to reverse plane partitions of shape $\lambda$) can be realized as a tropical rational map.

The reason is: I think the description (which you mentioned) of Hillman-Grassl that appears as Theorem 3.3 in the paper "The Hillman-Grassl correspondence and the enumeration of reverse plane partitions " of Gansner (https://www.sciencedirect.com/science/article/pii/0097316581900418) explains exactly how to do this. Namely, I think to compute the quantity $a_k(M_l)$, in the language of that theorem, we can do the following. Let's call a modified A-chain in $M_l$ a sequence of boxes $u_1,u_2,\ldots,u_m$ in the shape of $M_l$ which does not repeat any boxes and such that $u_{i+1}$ is weakly southwest of $u_i$ for all $i=1,\ldots,m-1$. Associate to such a chain the weight which is simply the sum of the $M_l$ entries of the boxes it visits. Then $a_k(M_l)$ should be the maximum over all collections of $k$ disjoint modified A-chains of the sum of the weights of these chains. This fact, together with the Theorem 3.3, explains how to write the entries of the output reverse plane partition entries as tropical rational functions in the input entries.

EDIT:

Darij, in case you are still interested in this question- I believe this recent preprint of Garver, Patrias, and Thomas https://arxiv.org/abs/1812.08345 not only shows that the Hillman-Grassl correspondence is a PL-function, but in fact gives a "toggle" description of the map, akin to the "toggle" description of PL-RSK. In fact, they show that these two maps (Hillman-Grassl and RSK) are essentially built out of the same toggles, but correspond to two different orientations of the Type A Dynkin diagram.