comparison docs/examples/algorithm-dinic.pseudocode @ 187:418846a2623c

Also link to exampled from the PDF properly
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 12 May 2026 21:07:42 +0200
parents docs/examples/algorithm-dinic.description@4a8c122725b0
children
comparison
equal deleted inserted replaced
186:95754197f5b3 187:418846a2623c
1 // -*- coding: utf-8; indent-tabs-mode: nil -*-
2 \ALGORITHM{Dinic's Algorithm} \WITH
3 \INPUT{A network \expr{G = ((V , E), c, s, t)}.}
4 \OUTPUT{An \expr{s–t} flow \expr{f} of maximum value.}
5 \IS
6 \TEXT{1. Set \expr{f(e) = 0} for each \expr{e ∈ E}.
7 2. Construct \expr{G_L} from \expr{G_f} of \expr{G}.
8 If \expr{\text{dist}(t) = āˆž}, stop and output \expr{f}.
9 3. Find a blocking flow \expr{f\'} in \expr{G_L}.
10 4. Augment flow \expr{f} by \expr{f\'} and go back to step 2.}
11 \END ALGORITHM