extend shortcuts

Make shortcuts for $G[i-1, j]$, $G[i, j-1]$, and $G[i, j]$ where necessary

![(a) Each sink has up to four sets of shortcuts. (b-d) Removing a dead path (dashed) extends at most one set of shortcuts.[]{data-label="fig:fourshortcutsets"}](discreteFourShortcutSetsAtSink)

When a dead path is removed from the tree, adjacent faces merge and a sink may change. Hence, shortcuts have to be extended to point toward the new sink. Fig. \[fig:fourshortcutsets\] illustrates the incoming shortcuts at a sink and the effect of removing a dead path on the incoming shortcuts. Note that the algorithm does not need to remove dead paths that end in the highest row or rightmost column.

Finally, $G[i-1, j]$, $G[i, j-1]$, and $G[i, j]$ receive shortcuts where necessary. $G[i-1, j]$ or $G[i, j-1]$ needs a shortcut only if its parent is $G[i-1, j-1]$. $G[i, j]$ needs two shortcuts if $G[i-1,j-1]$ is its parent, only one shortcut otherwise.

#### Correctness

To prove correctness of Algorithm \[alg:finddiscrete\], we require a stronger version of local correctness. A path $\pi$ is *strongly locally correct* if for all paths $\pi'$ with the same endpoints $\max_{1 < t \leq k} \pi(t) \leq \max_{1 < t' \leq k'} \pi'(t')$ holds. Note that the first node is 