  We study the problem of finding flows in undirected graphs so as to minimize
the weighted $p$-norm of the flow for any $p > 1$. When $p=2$, the problem is
that of finding an electrical flow, and its dual is equivalent to solving a
Laplacian linear system. The case $p = \infty$ corresponds to finding a
min-congestion flow, which is equivalent to max-flows. A typical algorithmic
construction for such problems considers vertex potentials corresponding to the
flow conservation constraints, and has two simple types of update steps: cycle
toggling, which modifies the flow along a cycle, and cut toggling, which
modifies all potentials on one side of a cut. Both types of steps are typically
performed relative to a spanning tree $T$; then the cycle is a fundamental
cycle of $T$, and the cut is a fundamental cut of $T$. In this paper, we show
that these simple steps can be used to give a novel efficient implementation
for the $p = 2$ case and to find near-optimal $p$-norm flows in a low number of
iterations for all values of $p > 1$. Compared to known faster algorithms for
these problems, our algorithms are simpler, more combinatorial, and also expose
several underlying connections between these algorithms and dynamic graph data
structures that have not been formalized previously.
