We first explain how to assign weights to the nodes in an edge-weighted graph or to the edges in a node-weighted graph:
As the graphs now have node and edge weights, we distinguish the n-flowing edges defined by only considering the node weights and the e-flowing edges defined by only considering the edge weights. The inclusion { n-flowing edges of G(ν, nil)} ⊂ { e-flowing edges of G(nil, δenν)} becomes an identity in the case where ν = εneδenν = φnν, a closing on the node weights ν. This condition is met for a node-weighted graph without isolated regional minima (IRM). Isolated regional minima may be suppressed by editing the graph and connecting each IRM with itself by a loop edge. We obtain an edited node-weighted graph ↻ G(ν, nil) in which the node weights verify ν = εneδenν = φnν. If we set η = δenν, we have ν = εneδenν = εneη.
Similarly, the inclusion {e-flowing edges of G(nil, η)} ⊂ {n-flowing edges of G(εneη, nil)} becomes an equality if η = δenεneη = γeη, an opening on the edge weights η. An edge-weighted graph may contain edges which are not the lowest edge of one of their extremities. Such edges do not exist in a node-weighted graph. If we suppress such edges in G(nil, η), we obtain the pruned graph ↓ G(nil, η), in which the function η verifies η = δenεneη = γeη. If we set ν = εneη, we have η = δenεneη = δenν.
The augmented graph ↻ G(ν, δenν) and the pruned graph ↓ G(εneη, η) are called flowing graphs since their node weights ν and edge weights η verify ν = εneη and η = δenν. Their flowing edges, regional minima and catchment zones are identical whether we consider the node weights alone or the edge weights alone. In a flowing path, each node is followed by an edge of the same altitude.
This chapter illustrates these relationships by modeling node- and edge-weighted graph as a network of tanks interconnected by pipes. The level of water in the tanks represents the node weights and the altitude of the pipes represents the edge weights.
Node- and edge-weighted graphs share several common but also distinguishing features associated with the flowing edges. We call the flowing edges of a node-weighted graph as n-flowing edges. In edge-weighted graphs, we speak of e-flowing edges. If the context is clear and there is no ambiguity, we simply use the word flowing edges.
This chapter aims to establish an equivalence between node- and edge-weighted graphs. We aim to associate each node (respectively edge) weighted graph with an edge (respectively node) weighted graph such that the regional minima and catchment zones of both graphs are identical.
The edge epq is an n-flowing edge of its extremity p, iff νp ≥ νq. Thus, a node only having neighbors with a higher weight is not the origin of a flowing edge, it is an isolated regional minimum.
On the contrary, for each edge epq, we have either νp ≥ νq or νq ≥ νp. Hence, each edge is a flowing edge of one of its extremity (or of both if νp = νq).
DEFINITION 5.1.– A graph in which each edge is the flowing edge of one of its extremities is called the e-flowing graph.
PROPOSITION 5.1.– A node-weighted graph G(ν, nil) is an e-flowing graph.
As each edge epq of a node-weighted graph is the flowing edge of one of its extremities, it may be assigned the weight of this extremity. This weight may be expressed by a unique expression, νp ν νq, covering all cases. Indeed, the edge epq may be the flowing edge of p, q or both p and q:
{epq n-flowing edge of p} ⇔ {νp ≥ νq} ⇔ {νp = νp ∨ νq} or
{epq n-flowing edge of q} ⇔ {νq ≥ νp} ⇔ {νq = νp ∨ νq} or
{epq n-flowing edge of p and q} ⇔ {νq = νp} ⇔ {νp = νq = νp ∨ νq}
Thus, whether epq is a flowing edge of p, q or of both its extremities, we may assign to epq a weight ηpq = νp ∨ νq, symmetrical in p and in q.
The edge epq is an e-flowing edge of its extremity p, iff epq is one of the edges adjacent to p with the smallest weight. If the graph is connected, it has no isolated nodes, and each node is the origin of one or several e-flowing edges.
On the contrary, edges which may exist that are not the e-flowing edge of one of their extremities.
DEFINITION 5.2.– A graph in which each node is the origin of a flowing edge is called the n-flowing graph.
Since each edge in a connected edge-weighted graph is the origin of at least one flowing edge, we have the following proposition:
PROPOSITION 5.2.– A connected edge-weighted graph is an n-flowing graph.
As each node p is the origin of an e-flowing edge epq, it seems natural to assign to p the weight of this e-flowing edge: νp = ηpq. Let us compute this weight ηpq.
{epq e-flowing edge of p} ⇔ {ηpq ≤ ηps for each neighboring node s of p} ⇔
As each node p in an edge-weighted graph is the origin of an e-flowing edge, it is assigned the weight of this edge. This weight is symmetrical with respect to all neighbors of p.
The major structural difference between node- and edge-weighted graphs is linked with their flowing edges:
We will show the equivalence between the two types of graphs if we are able to construct graphs which are at the same time e-flowing and n-flowing graphs.
DEFINITION 5.3.– A flowing graph is a graph which is at the same time an e-flowing and an n-flowing graph.
In a flowing graph, each edge is the flowing edge of one of its extremities and each node is the origin of a flowing edge, establishing a kind of coupling between nodes and flowing edges.
We have defined the following operators, which are able to assign weights to the nodes of edge-weighted graphs or to the edges of node-weighted graphs:
Both operators form an adjunction between the node and the edge weights. We call it the flowing adjunction.
THEOREM 5.1.– The pair of operators (δen, εne) forms an adjunction: .
PROOF.– Consider, for the same graph, an arbitrary function on the nodes and an arbitrary function
on the edges. Then:
□
As recalled in the primer on adjunction, if the couple (δen, εne) forms an adjunction, then [SER 88]:
The flowing adjunction has already been used for studying watershed and waterfall algorithms in [MEY 09]. These operators belong to a larger family of operators between nodes, edges and faces of planar graphs (which are used to construct micro-viscous leveling and filters [MEY 07a] and binary filters [COU 09b]).
In a node-weighted graph G(ν, nil), each edge is the n-flowing edge of one of its extremities and gets its weight, producing the edge-weighted graph G(nil, δenν). We now examine the relations of the flowing edges of G(ν, nil) and G(nil, δenν).
If epq is a flowing edge of p, we have ηpq = νp ∨ νq = νp ≤ νp ∨ νs = ηps for each neighboring node s of p. Thus, epq is one of the adjacent edges of p with the smallest weight, i.e. an e-flowing edge of p in G(nil, δenν).
The inverse is not true. Take an isolated regional minimum m in G(ν, nil). All its neighboring nodes have a higher weight. If s is one of the neighbors of m with the lowest weight, then ηms = νm ∨ νs ≤ νm ∨ νt = ηmt for each neighboring node t of p, showing that ems is an e-flowing edge of m in G(nil, δenν), but not in G(ν, nil).
We have thus established the following inclusion: {n-flowing edges of G(ν, nil)} ⊂ { e-flowing edges of G(nil, δenν)}. Note that this inclusion is strict in the presence of isolated regional minima.
In an edge-weighted graph G(nil, η), each node is the origin of an e-flowing edge and gets the weight of this edge, producing a node-weighted graph G(εneη, nil). If epq is an e-flowing edge of p, we have νp = (εneη)p = ηpq ≥ (εneη)q = νq, showing that the edge epq is also an n-flowing edge of p in the graph G(εneη, nil).
The inverse is not true. As G(εneη, nil) is an e-flowing graph, each of its edges is a flowing edge. The graph G(nil, η), on the contrary, may have edges which are not the lowest edge of one of their extremities. Such edges are nevertheless flowing edges in G(εneη, nil).
We have thus established the following inclusion: {e-flowing edges of G(nil, η} ⊂ { n-flowing edges of G(εneη, nil)}. This inclusion is strict if the graph G(nil, η) possesses edges which are not flowing edges, i.e. edges which are not the lowest neighboring edge of one of their extremities.
We have established the following inclusion rules for the flowing edges of node-or edge-weighted graphs:
By chaining both relations, we obtain new inclusions.
We chain the inclusions 1 and 2: {n-flowing edges of G(ν, nil)} ⊂ {e-flowing edges of G(nil, δenν)} ⊂ {n-flowing edges of G(εneδenν, nil)}. A sufficient condition for the extremal terms to be identical is ν = εneδenν = φnν. In this case, the n-flowing edges of G(ν, nil) and the e-flowing edges of G(nil, δenν) are identical. As any node-weighted graph, the graph G(ν, nil) is an e-flowing graph, and as any edge-weighted graph, the graph G(nil, δenν) is an n-flowing graph. As they have the same flowing edges, both are an n-flowing graph and an e-flowing graph, i.e. a flowing graph.
COROLLARY 5.1.– A sufficient condition for a node-weighted graph G(ν, nil) to be a flowing graph is ν = φnν.
If we define η = δenν, we have ν = φnν = εneδenν = εneη.
LEMMA 5.1.– If ν = φnν, the adjunction (εne, δen) produces a perfect coupling between the node and edge weights: η = δenν and ν = εneη.
We chain the inclusions 2 and 1:
1) {e-flowing edges of G(nil, η)} ⊂ { n-flowing edges of G(εneη, nil)} ⊂ {e-flowing edges of G(nil, δenεneη)}. A sufficient condition for the extremal terms to be identical is η = δenεneη = γeη. In this case, the e-flowing edges of G(nil, η) and the n-flowing edges of G(εneη, nil) are identical. As any edge-weighted graph, the graph G(nil, η) is an n-flowing graph, and as any node-weighted graph, the graph G(εneη, nil) is an e-flowing graph. As they have the same flowing edges, they are both an n-flowing graph and an e-flowing graph, i.e. a flowing graph.
COROLLARY 5.2.– A sufficient condition for an edge-weighted graph G(nil, η) to be a flowing graph is η = γeη.
If we define ν = εneη, we have η = δenεneη = δenν.
LEMMA 5.2.– If η = γeη, the adjunction (εne, δen) produces a perfect coupling between the node and edge weights: η = δenν and ν = εneη.
We have thus established sufficient conditions for a node- or edge-weighted graph to be a flowing graph. Here, we show that these conditions are also necessary.
A node-weighted graph may have isolated regional minima. Such nodes have no lower neighbors and are thus not the origin of a flowing edge. This is expressed by the following equivalences:
Each isolated regional minimum p is thus characterized by the fact that the closing φn is extensive, verifying: (φnν)p > νp.
When negated, the preceding statements are also equivalent. Since the closing φn is extensive, verifying φnν ≥ ν, the negation of {(φnν) > νp} is {(φnν)p = νp}.
Negating the extremal terms of the preceding series of equivalences yields: {p is not an isolated regional minimum node} ⇔ {(φnν)p = νp}.
From this equivalence, we deduce a characterization of n-flowing graphs, i.e. graphs in which each node is the origin of a flowing edge or, in other terms, a graph without isolated regional minima.
{G(ν, nil) is an n-flowing graph} ⇔ {∀p : p is the origin of a flowing edge} ⇔ {∀p : p is not an isolated regional minimum} ⇔ {∀p : (φnν)p = νp} ⇔ {φnν = ν}
As G(ν, nil) is always an e-flowing graph, we have the following theorem.
THEOREM 5.2.– A node-weighted graph G(ν, nil) is a flowing graph if and only if φnν = ν
If we set η = δenν, we have ν = εneη, since ν = φnν = εneδenν = εneη. We have a perfect coupling between the node weights ν and the derived edge weights η = δenν in the graph G(ν, η).
The graphs G(ν, nil) and G(nil, η) = G(nil, δenν) then have the same flowing edges, and consequently also the same regional minima and catchment zones.
An edge-weighted graph is an n-flowing graph. However, each edge is not a flowing edge of one of its extremities. Let us characterize such edges.
{epq is not the lowest edge of one of its extremities}
When negated, the preceding statements are also equivalent. Since the opening γeη is anti-extensive, verifying γeη ≤ η, the negation of γeη ≤ η is expressed by γeη = η. Negating the extremal terms of the preceding series of equivalences yields another equivalence:
From this equivalence, we deduce a characterization of e-flowing graphs, i.e. graphs in which each edge is the lowest edge of one of its extremities:.
As G(nil, η) is always an n-flowing graph, we have the following theorem.
THEOREM 5.3.– An edge-weighted graph G(nil, η) is a flowing graph if and only if γeη = η
If we set ν = εneη, we have η = δenν, since η = γeη = δenεneη. We again have a perfect coupling between the edge weights η and the node weights ν = εneη in the graph G(ν, η).
Since η = δenν, as established before, the graphs G(nil, η) and G(εneη, nil) = G(ν, nil) then have the same flowing edges, and consequently also the same regional minima and catchment zones.
We have thus established that a graph G(ν, η) is a flowing graph if and only if the node and edge weights are coupled: ν = εneη and η = δenν. In this case, ν = εneη = εneδenν = φnν and η = δenν = δenεneη = γeη.
According to the preceding theorems, G(ν, nil) is a flowing graph as ν = φnν. Similarly, G(nil, η) is a flowing graph as η = γeη. Both graphs G(ν, nil) and G(nil, η) have the same flowing edges, regional minima and catchment zones.
It is easy to transform a node- or edge-weighted graph into a flowing graph, by simply editing the graph structure, without touching the weights of the nodes or edges.
A node-weighted graph is an e-flowing graph. However, it is not an n-flowing graph, as the nodes which are isolated regional minima are not the origin of a flowing edge.
If we add to each isolated regional minimum a loop edge connecting it with itself, we obtain a graph in which each node is the origin of a flowing edge. The augmented graph called ↻ G(ν, nil) is thus an n-flowing graph.
Adding these loop edges does not change the trajectories of a drop of water outside the regional minima. As soon as a drop of water reaches an isolated regional minimum m, it is trapped by this minimum but may circulate along the loop edge m with itself. This does not change the catchment zones of the graph.
Being an n-flowing graph and an e-flowing graph, the graph ↻ G(ν, nil) is a flowing graph.
THEOREM 5.4.– For any node-weighted graph G(ν, nil), the graph ↻ G(ν, nil) obtained by adding a self loop connecting each isolated regional minimum with itself is a flowing graph.
Being a flowing graph, ↻ G(ν, nil) verifies ν = φnν.
COROLLARY 5.3.– Regardless of the node-weighted graph G(ν, nil), the function ν verifies ν = φnν in ↻ G(ν, nil).
We remark that this result is obtained, not by filtering the function ν, but by modifying the structure of the graph.
An edge-weighted graph is an n-flowing graph. However, each edge is not a flowing edge of one of its extremities. Such an edge is never crossed by a drop of water circulating from node to node. It may be suppressed from the graph without changing the trajectories of a drop of water circulating in the graph. In the resulting graph ↓ G(nil, η), each edge is a flowing edge of one of its extremities: the graph ↓ G(nil, η) is then also an e-flowing graph.
Being an n-flowing graph and an e-flowing graph, the graph ↓ G(nil, η) is a flowing graph.
THEOREM 5.5.– For any edge-weighted graph G(nil, η), the graph ↓ G(nil, η) obtained by suppressing its non-flowing edges is a flowing graph.
Being a flowing graph, ↓ G(nil, η) verifies η = γeη.
COROLLARY 5.4.– Regardless of the edge-weighted graph G(nil, η), the function η verifies η = γeη in ↓ G(nil, η).
We remark that this result is again obtained, not by filtering the function ν, but here also by modifying the structure of the graph.
We will now illustrate the results obtained so far, by examining in more detail the invariance domains of the closing φn for node-weighted graphs and of the opening γe for edge-weighted graphs.
Consider in a graph G(ν, nil) a node p with a weight λ. For each neighboring node s of p : (δenν)ps = νp ∨ νs ≥ λ. Two possibilities exist for p:
From these properties, we derive the following lemma:
LEMMA 5.3.– The graph G(ν, nil) is invariant by the φn if and only if it has no isolated regional minima.
If we add an edge linking p with itself, we create a loop edge, which gets a weight λ by the dilation δen. And the subsequent erosion εne assigns to p its initial weight λ.
COROLLARY 5.5.– Adding to each isolated regional minimum a loop edge transforms the graph G(ν, nil) into the graph ↻ G(ν, nil). Both graphs have the same regional minima and catchment zones.
PROOF.– Adding self-loop edges to the regional minima does not change the flowing paths outside the minima and the regional minima remain regional minima with the same nodes. Hence, the new graph ↻G(ν, nil) has the same catchment zones as the initial graph.
□
It follows that regardless of the initial node-weighted graph G(ν, nil), the function ν is closed by φn in ↻ G(ν, nil) : ν = φnν = εneδenν. If we define η = δenν, we obtain ν = εneδenν = εneη. Hence, the proposition:
PROPOSITION 5.3.– If G(ν, nil) is an arbitrary node-weighted graph, the graph ↻ G(ν, δenν) obtained by adding a self loop connecting each isolated node with itself is a flowing graph.
Figure 5.1 shows how to transform a node-weighted graph G(ν, nil) into a flowing graph. The initial graph in Figure 5.1(a) is node-weighted with node weights ν. Its regional minima have been detected and each of them assigned a specific color.
In Figure 5.1(b), edge weights η are obtained by the dilation δne : η = δenν. The regional minima of this edge-weighted graph have been highlighted in red. They do not correspond to the regional minima detected in the node-weighted graph. The cyan and blue regional minimum in the node-weighted graph have been merged. The yellow one has disappeared. All of these discrepancies concern isolated regional minima in G(ν, nil). On the contrary, the violet regional minimum which contains two nodes also appears as a regional minimum in the edge-weighted graph G(nil, δenν).
Eroding these edge weights produces new node weights ν′ = εneδenν = φnν in Figure 5.1(c). The function ν′ is the result of the closing φn applied to the function ν. The weights of isolated regional minima have been increased compared to the initial graph G(ν, nil); each of them has taken the weight of its lowest neighbor.
In Figure 5.1(d), loop edges have been added to the initial graph, linking each isolated regional minimum with itself producing the graph ↻ G(ν, nil). The dilatation η = δenν assigns to these loop edges the weight of their extremity, i.e. a regional minimum, as shown in Figure 5.1(e). The final erosion εneδenν restores the initial weights to all nodes, as shown in Figure 5.1(f), illustrating the fact that the function ν is closed by the closing φn in the graph ↻ G(ν, nil). The flowing edges, flowing paths, regional minima and catchment zones are identical in G(ν, nil), ↻ G(ν, nil) and ↻ G(nil, εenν).
Consider a graph G(nil, η). Two possibilities exist for an edge epq with a weight ηpq = λ: * epq is not a flowing edge, i.e. it is not the lowest neighboring edge of one of its extremities: it has lower neighboring edges at each extremity. Hence, (εneη)p < λ and (εneη)q < λ; hence, (γeη)pq = (δenεneη)pq = (εneη)p ∨ (εneη)q < λ. Each non-flowing edge is lowered by the opening γe. * the edge epq is a flowing edge and is the lowest edge of one of its the extremities, say p. Then, λ = (εneη)p = ηpq ≥ (εneη)q; hence, (δenεneη)pq = (εneη)p ∨ (εneη)q = λ . Each flowing edge is invariant by the opening γe.
From these properties, we derive the following lemma.
LEMMA 5.4.– The graph G(nil, η) is invariant by the opening γe if and only if all its edges are flowing edges.
Figure 5.1. a) The initial graph is node-weighted. The ordinary nodes are green; each regional minimum is highlighted by a different color. b) The edge weights are obtained by dilating the node weights in A: η = δenν. The edges in red are the regional minima edges. Their extremities do not correspond to the regional minima of the node-weighted graph A. c) The node weights are obtained by eroding the edge weights in B: ν′ = εneη = εneδenν = φnν. All nodes retrieve their initial weight, except the isolated regional minima nodes. The new regional minima are not the same as in A. d) A loop edge has been added to each isolated regional minimum edge. e) The edge weights are obtained by dilating the node weights in D: η′ = δenν. The loop edges linking the isolated regional minima with themselves also get weights. The edges in red are the regional minima edges and now do correspond to the regional minima of the node-weighted graph A. f) the node weights are obtained by eroding the edge weights in E: ν” = εneη′ = εneδenν = φnν. All nodes retrieve their initial weight, including the isolated regional minima. The new regional minima are the same as the initial ones and are the extremities of the edge-based regional minima (in red). The resulting graph is a flowing graph. For a color version of the figures in this chapter, see www.iste.co.uk/meyer/topographical1.zip
The operator εneη assigns to each node the weight of its adjacent flowing edges. Hence, suppressing the non-flowing edges in the graph G(nil, η) does not modify the erosion εneη, i.e. the weight of the nodes.
LEMMA 5.5.– Suppressing all edges of the graph G(nil, η) whose weight is lowered by the opening γe produces a graph where each edge is a flowing edge with a weight invariant by γe. Both graphs have the same regional minima and catchment zones.
PROOF.– As shown above, the non-flowing edges are lowered by the opening γe, whereas the flowing edges are not. Hence, suppressing the edges lowered by γe leaves only the flowing edges. As a drop of water never follows a non-flowing edge, the flowing paths are not modified if such edges are cut. The regional minima are not modified either, as their inside edges are all flowing edges. Hence, the new graph ↓ G(nil, η) has the same catchment zones as the initial graph.
□
Hence:
PROPOSITION 5.4.– The graph ↓ G(nil, η) obtained by suppressing the non-flowing edges in an arbitrary graph G(nil, η) is a flowing graph. Its edge weights are invariant by γe : γeη = η.
Setting ν = δenν yields η = γeη = δenεneη = δenν, establishing the perfect coupling between node and edge weights in the graph ↓ G(εneη, η), characterizing flowing graphs. The flowing edges, flowing paths, regional minima and catchment zones are identical in G(nil, η), ↓ G(nil, η) and ↓ G(εneη, nil).
Figure 5.2 shows how to transform an edge-weighted graph G(nil, η) into a flowing graph. The initial graph in Figure 5.2(a) is edge-weighted with edge weights η. Its node weights ν are obtained by the erosion εne : ν = εneη in Figure 5.2(b). Dilating these node weights produces new edge weights η′ = δenεneη = γeη in Figure 5.2(c). The function η′ is the result of the opening γe applied to the function η. The weights of the edges which have been lowered are indicated in pink color. Such edges are not the lowest edge of one of their extremities. These edges have been suppressed in Figure 5.2(d), producing the flowing graph ↓ G(nil, η). This graph contains all edges of the initial graph which are the lowest edge of one of their extremities. Hence, the node weights still verify the relation ν = εneη in Figure 5.2(f). The graphs ↓ G(nil, η) in Figure 5.2(d) and ↓ G(εne, nil) in Figure 5.2(e) have the same flowing edges, regional minima and catchment zones. The node weights and edge weights of the graph ↓ G(εneη, η) are represented in Figure 5.2(f). The inside edges of the regional minima are identical with those in the initial graph G(nil, η) in Figure 5.2(a). The extremities of these edges have been labeled, each regional minimum holding a different label.
Figure 5.2. a) The initial graph is edge-weighted. The node weights are obtained by the erosion εne: ν = εneη. b) The new edge weights are obtained by dilating the node weights in A: η′ = δenεneη = γeη. Thus, η′ is obtained by the opening η applied to the edge weights of A. c) All edges of the initial graph A whose weight has been lowered by the opening γe, i.e. γeη < η are suppressed. The resulting graph is a flowing graph
Linking each isolated regional minimum with itself creates the flowing graph ↻ G(ν, nil). In this new graph, the unchanged node weights verify ν = φnν. The graph ↻ G(nil, δenν) is then also a flowing graph with the same flowing edges. If we set η = δenν, the node- and edge-weighted graph ↻ G(ν, η) is also a flowing graph.
Suppressing each edge which is not the lowest edge for one of its extremities, i.e. edges for which η > γeη produces the flowing graph ↓ G(nil, η). In this new graph, the unchanged edge weights verify η = γeη. The graph ↓ G(εneη, nil) is then also a flowing graph with the same flowing edges. If we set ν = εneη, the node- and edge-weighted graph ↓ G(ν, η) is also a flowing graph.
As for any adjunction (δenεne), the erosion εneη is closed by the closing φn : φnεneη = εneδenεneη . Hence, G(εneη, nil) is a flowing graph with the same flowing edges as the graph G(nil, δenεneη) = G(nil, γeη). If we set ν = εneη, the node- and edge-weighted graph ↓ G(ν, η) is also a flowing graph.
If η is not open by γe, the graphs G(nil, η) and G(nil, γeη) have distinct weights and distinct flowing paths. An edge which is not the lowest edge of one of its extremities is not a flowing edge in G(nil, η), but it is in G(nil, γeη).
As for any adjunction (δenεne), the dilation δenν is open by the opening γe : γeδenν = δenεneδenν. Hence, G(nil, δenν) is a flowing graph with the same flowing edges as the graph G(εneδenν, nil) = G(φnν, nil). If we set η = δenν, the node- and edge-weighted graph ↻ G(ν, η) is also a flowing graph.
If ν is not closed by φn, the graphs G(ν, nil) and G(φnν, nil) have distinct weights and distinct flowing paths. An isolated regional minimum node in G(ν, nil) is not the origin of a flowing edge in G(ν, nil), but it is in G(φnν, nil).
We now give a physical interpretation to the results of the last section. We represent a node- and edge-weighted graph G(ν, η) as a network of tanks linked by pipes.
We consider the nodes as vertical tanks of infinite height and depth. The weight νi represents the level of water in the tank i, which is equal to – ∞ if no water is present. Two neighboring tanks i and j are linked by a pipe at an altitude ηij equal to the weight of the edge. Thus, an edge-weighted graph may be represented as a tank network, in which the interrelations between nodes and edges will be modeled as an hydrostatic equilibrium of water in the tank network.
For arbitrary weights of nodes and edges, the distribution of water does not follow the laws of hydrostatics. To represent a physically possible distribution of water, edge and node weights have to be coupled [MEY 13a, MEY 13b]: the level νi in the tank i cannot be higher than the level νj, unless ηij ≥ νi. If two neighboring nodes and the pipe linking them verify this simple condition, the water distribution in our network is at equilibrium.
DEFINITION 5.4.– The distribution ν of water in the tanks of the graph G is a flooding of this graph, i.e. it is a stable distribution of fluid if it verifies the criterion hydrostat 1: for any couple of neighboring nodes (p, q): (νp > νq ⇒ ηpq ≥ νp)
Figure 5.3 presents several configurations compatible with the laws of hydrostatics and others which are not.
Figure 5.3. A tank and pipe network, in which the tanks (a, b…, f) verify the laws of hydrostatics, whereas the tanks (g, h) and (i, j) do not: – a and b form a regional minimum with τa = τb = λ; ηab < λ; ηbc > λ; – b and c have unequal levels but are separated by a higher pipe; – d and e form a full lake, reaching the level of its lowest exhaust pipe ηcd; – e and f have the same level; however, they do not form a lake, as they are linked by a pipe which is higher
The following equivalences yield other useful criteria for recognizing flood distributions on tank networks:
On the contrary, (νp > νq ⇒ ηpq ≥ νp) ⇔ (ηpq < νp ⇒ νp ≥ νq).
If follows from the second implication: ηpq < νp ⇒ νp ≤ νp ⇒ ηpq < νp ≤ νq ⇒ νq ≤ νp. Putting everything together, we obtain ηpq < νp ⇒ νp = νq, showing that if the level νp in the tank p is higher than the pipe ηpq, then νp = νq, which is indeed the case for a hydrostatic equilibrium.
Consider a tank network representing a node- and edge-weighted graph G(ν, η). We suppose that its filling is at hydrostatic equilibrium, its node and edge weights verifying the criterion hydrostat 1. This equilibrium may be unstable:
Given a node-weighted graph G(ν, nil), we associate with each node q a tank in which the water takes the altitude νq. If p and q are neighboring nodes in the graph, we set the pipe linking both tanks at the lowest possible level such that no water flows through the pipe. For two tanks p and q with water levels νp and νq, this pipe has to be set at a level ηpq = νp ∨ νq = (δenν)pq. The distribution of water in the resulting tank network follows the laws of hydrostatics: as ηpq = νp ∨ νq, we have νp ≤ νq ∨ ηpq and νq ≤ νp ∨ ηpq, showing that the criterion hydrostat 2 is satisfied.
The resulting filling is “edge unstable”: if ηpq = νp ∨ νq and νp ≥ νq, lowering the level of ηpq would allow some water to enter into the pipe epq.
It is, however, not a “node unstable” filling. If m is an isolated regional minimum of the graph, each adjacent pipe will be placed at the level of a neighboring tank of m, i.e. at a higher level than νm. It is then possible to add a drop of water into the pipe m without provoking an overflow.
This is shown in Figure 5.4. Figure 5.4(1) represents the tanks corresponding to the graph G(ν, nil) (two neighboring nodes in the graph are represented as two neighboring tanks in the figure). Each tank is filled at a level equal to its node weight. In Figure 5.4(2), the neighboring tanks are linked by a pipe, placed at a level ηpq = νp ∨ νq for two neighboring tanks p and q. This tank network represents the graph G(ν, δenν).
Figure 5.4. The graph G(ν, δenν) is edge unstable but not necessarily node unstable: 1) Each tank represents a node of the graph G(ν, nil), filled to the level ν. 2) Pipes link the tanks corresponding to neighboring nodes in the graph G(ν, δenν); the pipe epq is placed at the level (δenν)pq. The resulting network is edge unstable, as lowering the edge level of a pipe produces an overflow through this pipe. 3) The tank network representing G(ν, δenν) is not node unstable, as it is possible to add a drop of water into the tank c, representing an isolated regional minimum, without provoking an overflow through an adjacent pipe
Figure 5.4(3) shows what happens if we add a drop of water in any of the tanks. Adding a drop of water in the tank a provokes an overflow from a to b through the pipe eab which links them. The pipe f belongs to a non-isolated regional minimum containing two nodes f and g. Adding a drop of water in the tank f provokes an overflow from f to g through the pipe efg which links them. The node C is an isolated regional minimum, as all its neighboring nodes have higher weights. The graph is not “node unstable” as adding a drop of water in such an isolated regional minimum does not produce an overflow, since there is no pipe in the network at this level, but slightly increases the level of the water in the tank c. However, the resulting node- and edge-weighted graph is edge unstable, as lowering any edge would provoke an overflow through this edge from one of its extremities.
Consider now an edge-weighted graph G(nil, η). If p and q are neighboring nodes in the graph, then their associated tanks are linked by a pipe at level ηpq. We then fill the tanks as much as possible, again without creating any flow through the pipes. Obviously, if the level of water in a tank is higher than the level of one of its adjacent pipes, water will flow through this pipe. Therefore, the highest level νp of water in a tank p has to be equal to the level of the lowest adjacent pipe: . Adding a drop of water in the tank p would then provoke an overflow through this lowest adjacent pipe. The distribution of water in the resulting tank network then follows the laws of hydrostatics. Indeed, if p and q are two neighboring nodes
and
, then νp ≤ νq ∨ ηpq and νq ≤ νp ∨ ηpq, showing that the criterion hydrostat 2 is satisfied. The resulting tank network represents the graph G(εneη, η). It is “node unstable”.
However, it is not an “edge unstable” filling as shown by the counter example in Figure 5.5.
Figure 5.5(1) represents a tank network modeling an edge-weighted graph G(nil, η). Initially, the tanks are empty; the tanks corresponding to neighboring nodes are linked by a pipe set at an altitude equal to the weight of this edge. The nodes (f, g) and (b, c) form two regional minima. We verify that no isolated regional minima do exist in an edge-weighted graph. In Figure 5.5(2), each tank has been filled up to its lowest adjacent pipe. Figure 5.5(3) shows what happens if we add a drop of water in the tanks. Adding a drop of water in the tank c provokes a flow through the pipe linking c with the node b within the same regional minimum. Adding a drop of water in the tank e provokes a flow through the lowest adjacent edge towards the tank f. Similarly, adding a drop of water in the tank d would provoke a flow through the pipe linking d and c. The same happens for all tanks, as each of them has an adjacent pipe at the level of its filling, and adding a drop of water to the tank provokes an overflow through only this pipe. Therefore, the graph is “node unstable”.
Figure 5.5. The graph G(εneη, η) is node unstable but not necessarily edge unstable: 1) A network of tanks and pipes representing the graph G(nil, η); the pipe linking neighboring nodes p and q is placed at the level ηpq. 2) The tanks are filled up to their lowest adjacent pipe. Thus, adding a drop of water into a tank provokes an overflow through this lowest adjacent pipe. The tank network is node unstable. 3) However, the tank network representing G(εneη, η) is not edge unstable, as there are pipes which are not traversed by an overflow if we add a drop of water in one of the adjacent tanks. This is the case for the pipe ede
In contrast, the pipe linking d and e is not the lowest pipe of its extremities and is never crossed by a flood if we add a drop of water in the network. Lowering the level of this edge also does not allow some water to pass through it. Hence, this graph is not “edge unstable”.
We first construct the tank and pipe network associated with a node-weighted graph G(ν, nil). The associated tank network is represented in Figure 5.6(1). We then produce the edge unstable filling G(ν, δenν) in Figure 5.6(2).
Forgetting the node weights, we obtain the edge-weighted graph G(nil, δenν) represented in Figure 5.6(4). The node unstable filling of this graph G(εneδenν, δenν) = G(φnν, δenν) is represented by the tank network in Figure 5.6(5). Adding a drop of water in the tank c in Figure 5.6(3) does not provoke an overflow into a neighboring pipe, whereas the same operation performed in Figure 5.6(5) produces an overflow through the pipe linking the tanks b and c.
In Figure 5.6(6), we compare the tank fillings of G(ν, nil) and of G(φnν, nil), showing that the isolated regional minimum node c has been filled up to the level of its lower neighboring node.
If ν is not closed by the closing φn, we have φnν > ν on all isolated regional minima. The succession of operations ν → δenν → εneδenν, transforming the node weights into edge weights and then back from the edge weights to the node weights is not equal to identity.
Figure 5.6. We represent a node-weighted graph G(ν, nil) by the tanks in image 1, connected by pipes at level δenν in image 2. The resulting graph G(ν, δenν) is not node unstable as shown in image 3: a drop of water is added into the tank c, representing an isolated regional minimum, without provoking an overflow. Image 4 represents the graph G(nil, δenν); each tank is filled up to the level εneδenν = φnν in image 5. Comparing the fillings of the tanks in images 1 and 5 shows that the level of the isolated regional minimum c has been filled up to its lowest adjacent node. Image 6 shows the initial level of water in pipe c in red and the final level in blue
We now transform the node-weighted graph G(ν, nil) into the graph ↻ G(ν, nil) by adding a loop edge linking each isolated regional minimum with itself.
The graph G(ν, nil) is represented in Figure 5.7(1) and ↻ G(ν, δenν) in Figure 5.7(2). A loop edge has been added to the isolated regional minimum of node c. Adding a drop of water in the corresponding tank allows water to enter into this pipe. The resulting tank network is also node unstable, as adding a drop of water in any of the tanks allows some water to enter into an adjacent pipe.
Forgetting the node weights, we obtain the edge-weighted graph ↻ G(nil, δenν) represented in Figure 5.7(4). The node unstable filling of this graph ↻ G(εneδenν, δenν) = ↻ G(φnν, δenν) is represented by the tank network in Figure 5.7(5). In Figure 5.7(6), we verify that the tank fillings of G(ν, nil) and ↻ G(φnν, nil) are identical. This is due to the fact that whatever the function ν in G(ν, nil), this function is closed by the closing φn in the graph ↻ G(ν, nil).
In the graph ↻ G(ν, nil), the succession of operations ν → δenν → εneδenν, transforming the node weights into edge weights and then back from the edge weights to the node weights is equal to identity, showing that the edge weights may be derived from the node weights and the node weights from the edge weights. If we set η = δenν, we have ν = εneη. The resulting graph is a flowing graph.
Figure 5.7. We represent a node-weighted graph G(ν, nil) by the tanks in image 1. The tanks are connected by pipes at level δenν in image 2; a pipe links the regional minimum tank c with itself, at the level νc. The resulting graph ↻ G(ν, δenν) is now node unstable as shown in image 3: a drop of water added into the tank c provokes an overflow through the pipe. Image 4 represents the graph ↻ G(nil, δenν); each tank is filled up to the level εneδenν = φnν in image 5. Comparing the fillings of the tanks in images 1 and 6 is now identical, as the graph ↻ G(ν, δenν) is a flowing graph.
We first construct the tank and pipe network associated with an edge-weighted graph G(nil, η). The associated tank network is represented in Figure 5.8(1). We then produce the node unstable filling G(εneη, η) in Figure 5.8(2).
Forgetting the edge weights, we obtain the node-weighted graph G(εneη, nil) represented in Figure 5.8(4). The edge unstable filling of this graph G(εneη, δneεneη) = G(εneη, γeη) is represented by the tank network in Figure 5.8(5). In Figure 5.8(6), we compare the levels of the pipes in G(nil, η) and G(nil, γeη), showing that the edge ecd has been lowered. This edge is not the lowest edge of any of its extremities in G(nil, η).
If η is not open by the opening γe, we have γeη < η on all edges which are not flowing edges. The succession of operations η → εneη → δneεneη, transforming the edge weights into node weights and then back from the node weights to the edge weights is not equal to identity.
Figure 5.8. We represent an edge-weighted graph G(nil, η) by the tank network in image 1. The tanks are filled at level εneη in image 2. The resulting graph (εneη, η) is now node unstable but not edge unstable, as there are pipes which are not traversed by an overflow if we add a drop of water in one of the adjacent tanks. This is the case for the pipe ede. Image 4 represents the graph G(εneη, nil). The tanks are linked by pipes at the level δenεneη = γeν in image 5. Comparing the levels of the pipes in images 1 and 6 shows that the pipe ede has been lowered, as the corresponding edge was not the lowest edge of one of its extremities
We now transform the edge-weighted graph G(nil, η) into the graph ↓ G(nil, η) by cutting all edges which are not the lowest edge of one of their extremities; in our case, the edge ede is cut. The graph G(nil, η) is represented in Figure 5.9(1) and ↓ G(nil, η) in Figure 5.9(2). The node unstable filling of the tanks produces Figure 5.9(3), representing the graph ↓ G(εneη, η).
Forgetting the edge weights, we obtain the node-weighted graph ↓ G(εneη, nil) represented in Figure 5.9(4). The edge unstable filling of this graph ↓ G(εneη, δenεneη) =↓ G(εneη, γeη) is represented by the tank network in Figure 5.9(5). In Figure 5.9(6), we verify that the edge weights of ↓ G(nil, η) and ↓ G(nil, γeη) are identical. This is due to the fact that whatever the function η in G(nil, η), this function is open by the opening γe in the graph ↓ G(nil, η).
In the graph ↓ G(nil, η), the succession of operations η → εneη → δenεneη, transforming the edge weights into node weights and then back from the node weights to the edge weights is equal to identity, showing that the node weights may be derived from the edge weights and the edge weights from the node weights. If we set ν = εneη, we have η = δenν. The resulting graph ↓ G(ν, η) is a flowing graph.
Figure 5.9. We represent an edge-weighted graph G(nil, η) by the tank network in image 1. The pipe ede which is not the lowest pipe of one of its extremities is cut, producing the tank network associated with the graph ↓ G(nil, η) in image 2. In image 3, each tank is filled up to the level of its lowest adjacent edge, producing the graph ↓ G(εneη, η). Forgettting the pipes, we obtain the node-weighted graph ↓ G(εneη, nil) in image 4. The tanks are linked by pipes at the level δenεneη = γeη in image 5 representing the graph ↓ G(εneη, δenεneη). Forgetting the node weights in image 6, we obtain the graph ↓ G(nil, δenεneη) whose pipes are at the same levels as the pipes in image 2 representing the graph ↓ G(nil, η)