Herramientas para la
4.2. M´ odulos para la Navegaci´ on en ROS
An eliminable layout can be regarded as a special form of the layout of a blocking vertex. Consider the layout L(v) of a vertex v according to a linear ordering. Recall that v is called left-blocking, iff−(v) = b+(v) and f−(v), f+(v), b+(v) ≥ 1. Accordingly,
vis called right-blocking, iff+(v) = b−(v) and f−(v), f+(v), b−(v) ≥ 1. We now add a
further constraint. A vertex v has an eliminable layout, if eitherf−(v), f+(v), b+(v) ≥ 1
withf−(v) = b+(v) and b−(v) = 0, or f−(v), f+(v), b−(v) ≥ 1 with f+(v) = b−(v), and
b+(v) = 0. More descriptively, if v’s layout is eliminable, then v is either left-blocking
with additionallyb−(v) = 0, or v is right-blocking with b+(v) = 0. In pictograms, an
eliminable layout is depicted as or , respectively.
As the name suggests, we want to eliminate these layouts, i. e. , we aim at constructing a linear ordering that does not induce an eliminable layout on any vertex, and at the same time without increasing the number of backward arcs. An advantage of this
4.8 Eliminable Layouts Property 113 task over the Blocking Vertices Property is that we do not have to decide between two versions (left and right), but can eliminate both types simultaneously1:
Lemma 4.18 Eliminable Layouts Property
For every optimal linear ordering π∗ of G there is a linear ordering π∗′with
⏐ ⏐π∗′
⏐
⏐= |π∗| such that π∗′does not induce an eliminable layout on any vertex.
Proof. Let π be a linear ordering of G that respects the Nesting Property (cf.Lemma 4.3). Recall from Section 3.3that the layout L(v) of a vertex v is defined as the four-tuple (f−(v), f+(v), b−(v), b+(v)). We will make use of this notation in the proof.
Consider a vertex v with layout L(v) = (x, y, y, 0) for some x, y ≥ 1 ( ) within
π. Then, v is right-blocking and its layout is eliminable by the above definition. For
easier reference, we name the tails of v’s incoming backward arcs uiin ascending order with respect to the linear ordering, i. e. , we obtain an indexed family {ui}0≤i<y with
π(ui) ≤ π(ui+1), ∀0 ≤ i < y − 1, and (ui, v) ∈ B−(v), ∀0 ≤ i < y. In consequence of π
adhering to the Nesting Property, there is an injective mapping µhthat assigns a forward arc (v, wi) ∈ F+(v) to each backward arc (ui, v) ∈ B−(v), ∀0 ≤ i < y. Furthermore,
∀0 ≤ i < y, π(v) < π(wi) < π(ui). As b−(v) = f+(v) and the mapping µh is injective,
every arc in F+(v) is assigned to a unique backward arc.
Figure 4.15(a)shows a subsequence of a linear ordering that we will use as an example in the following. It is important to note that the figure does not show a complete linear ordering. There must be vertices to the left of v because v has incoming forward arcs and there may also be vertices between those depicted or to the right of the rightmost vertex.
Consider now the following operation: Modify π by moving v to some position at least π(uy−1), e. g. , by applying the routine Move(π, v, π(uy−1)). In the example, y = 2, so we obtain the situation depicted inFigure 4.15(b)after moving v to π(u1).
We can now observe that in the new linear ordering, let us call it π′ to distinguish it from the initial linear ordering π, all arcs in B−(v) count as forward arcs whereas all arcs
in F+(v) have become backward arcs. From now on, we indicate with subscript π or π′ which linear ordering a set or quantity refers to.
As both B−
π(v) and Fπ+(v) contain y arcs, the cardinality of the induced set of backward arcs remains unchanged in π′. The layout of v in π′is Lπ
′(v) = (x + y, 0, 0, y) ( ) and is
therefore no longer eliminable. However, also the layouts of uiand wi, ∀0 ≤ i < y, have changed, so we investigate these next.
v w0 u0 w1 u1 w00 u00
w0 u0 w1 u1 v w00 u00
(a)
(b)
Figure 4.15:Excerpt from a linear ordering that induces an eliminable layout on vertex v (a)and the linear layout resulting from moving v(b).
Let us first consider some vertex u ∈ {ui}0≤i<y. Suppose that the layout of u changed to in π′, i. e. , Lπ
′(u) = (xu, yu, yu,0) for xu, yu ≥ 1. The movement of v can only affect the classification of arcs incident to v, hence, it suffices to consider the only arc incident to both u and v, which is the former backward arc(u, v). As (u, v) ∈ B+
π(u) before and(u, v) ∈ F+
π′(u) afterwards, b+π(u) = b+π′(u) + 1 and fπ+(u) = fπ+′(u) − 1. Consequently,
the layout of u with respect to the initial linear ordering π is Lπ(u) = (xu, yu− 1, yu,1) ( ). Then, however,b−
π(u) = yu > yu− 1 = fπ+(u), a contradiction toCorollary 4.3and the assumption that π respects the Nesting Property. So π′cannot induce the eliminable layout type on any vertex u ∈ {ui}0≤i<y.
Suppose that the layout of u is in π′, i. e. , Lπ
′(u) = (yu, xu,0, yu) for any u ∈
{ui}0≤i<y and xu, yu ≥ 1. With the same argument, we obtain b+π(u) = b+π′(u) + 1
andf+
π(u) = fπ+′(u) − 1, so the layout of u with respect to the initial linear ordering π
is Lπ(u) = (yu, xu− 1, 0, yu+ 1) ( ). Then, b+π(u) = yu+ 1 > yu = fπ−(u), again a contradiction toCorollary 4.3and π respecting the Nesting Property. Consequently, π′ also cannot induce the eliminable layout on any vertex u ∈ {ui}0≤i<y.
Next, we turn our attention to some vertex w ∈ {wi}0≤i<y. Here, the only arc whose classification is affected by the movement of v is the arc(v, w). For this arc holds that (v, w) ∈ F−
4.8 Eliminable Layouts Property 115 incoming backward arc, so as layout of w with respect to π′ can be discarded. It may be the case, however, that Lπ′(w) = (xw, yw, yw,0) ( ). As(v, w) changes from
incoming forward to incoming backward with respect to w, we haveb−
π(w) = b−π′(w) − 1
andf−
π(w) = fπ−′(w) + 1. Then, the layout of w according to the initial linear ordering
π would have been Lπ(w) = (xw+ 1, yw, yw− 1, 0) ( ), which does not contradict the Nesting Property. Subsequently, the elimination of the layout at v may in turn produce this layout on vertices in {wi}0≤i<y. We therefore have to iterate the movement process in order to eliminate the layout also on these vertices until the constructed linear ordering either no longer induces an eliminable layout of type on any vertex or it violatesCorollary 4.3.
Assume that the elimination of is implemented as a sweep line algorithm that starts at the first vertex of π, i. e. , π−1(0), and processes the vertices in ascending order according to π. Whenever the Nesting Property is violated during the procedure it may be re-established, which produces a linear ordering that induces strictly fewer backward arcs. In this case, the sweep line algorithm starts anew. So if the procedure reaches the
qth vertex in π, we have as an invariant that none of the vertices v′with π(v′) < q have
layout . Observe that if the vertex at position q is moved, the vertex that formerly was at position q+ 1 takes position q afterwards, so the sweep line does not necessarily advance its position in every step. Once the sweep line reaches the vertex at the last position, the elimination process is finished.
Suppose that the procedure does not terminate. Then, the sweep line is stuck at some position q < n − 1, i. e. , the vertex at position q has layout , and each time after eliminating the layout on this vertex, there is another vertex at the same position q with layout . As this process continues forever, but there are only n vertices, there must be a vertex v that reoccurs infinitely often at position q. Consider a linear ordering π(v→q) that is obtained from π by move operations, such that v is at position q and the sweep line cannot advance beyond q. For the sake of clarity, note that π(v→q)is not unique, i. e. , there may be more than one such linear ordering. We simply pick one of them here. As already argued, v must have an eliminable layout with Lπ(v→q)(v) = (x, y, y, 0) ( ).
Let {ui}0≤i<yand {wi}0≤i<ybe defined with respect to v as at the beginning of the proof. Consider again the elimination operation, which moves v beyond all vertices that have an outgoing backward arc to v or an incoming forward arc from v. If the sweep line cannot advance to a position greater than q and if v reoccurs at q infinitely often, then all vertices {ui}0≤i<y and {wi}0≤i<y must also take position q with layout between any two reoccurrences of v at q. Let Xv = {ui}0≤i<y∪ {wi}0≤i<y.
v w0 u0 w1 u1 w00 u00
Figure 4.16: Excerpt from a linear ordering where the elimination process does not
terminate.
Next, consider a vertex v′ ∈ Xv. As we just argued, also v′occurs infinitely often at position q with eliminable layout . Let π(v′→q)be a linear ordering obtained from
π(v→q)by move operations and such that v′is at position q. Let Lπ(v′→q)(v′) = (x′, y′, y′,0)
( ). Denote again by {u′i}0≤i<y
′ and {w′i}0≤i<y′ the set of adjacent vertices of v′ in
analogy to the naming when considering v. As v′also reoccurs at position q, so must {u′i}0≤i<y′and {wi}0≤i<y′ ′ by the same argument as above.
We can describe the set X of vertices that reoccur at position q as a transitive closure of Xv, i. e. , X = {v} ∪⋃
v′∈XXv′. Figure 4.16depicts an excerpt of a linear ordering
where the sweep line is stuck at the leftmost position that is shown. In this example,
X= {v, u0, u1, w0, w1, u′0, w0}.′
Next, we want to analyze the subgraph GX of G induced by X. Consider some vertex
v∈ X. By definition, v takes position q infinitely often and with eliminable layout .
Let π(v→q)be defined as above. Then, B+
π(v→q)(v) = ∅ and {w | (v, w) ∈ F
+
π(v→q)(v)} ⊂ X. Consequently, the head of every outgoing arc of v is also in X. As for the incoming arcs of v, we find that because v has layout in π(v→q), F−
π(v→q)(v) ̸= ∅. Hence, there must be at least one vertex z with π(v→q)(z) < q. This implies that the sweep line has already passed z, so z ̸∈ X. Therefore, X must be a proper subset of V . Furthermore, there is a path z ⇝ v in G consisting of the arc (z, v) ∈ F−
π(v→q)(v), but there is no path v ⇝ z in the opposite direction: v ∈ X and the head of every outgoing arc of a vertex in X is also in X, but z ̸∈ X. However, G is strongly connected, a contradiction. Subsequently, there must be at least one vertex in X that has not a layout of type when taking position
q, at which point the sweep line can advance.
Finally, suppose that the initial linear ordering π was optimal. Recall that if during the elimination process a linear ordering is obtained that contradictsCorollary 4.3, the Nesting Property is violated and its re-establishment yields a linear ordering π′ with |π′| < |π|. If π was optimal, this would be a contradiction. Hence,Corollary 4.3holds for
4.8 Eliminable Layouts Property 117 all linear orderings throughout the elimination process and it terminates with a linear ordering π′′such that |π′′| = |π|.
For vertices with layout , the statement follows as in the case of the Blocking Vertices Property by considering the vertices of type in the reverse graph along with the reverse linear ordering. Alternatively, the layout could be eliminated analogously using a sweep line that processes the vertices in descending order according to the linear ordering π. Here, for a vertex v with eliminable layout, the vertices {ui}0≤i<y must be defined as the heads of v’s outgoing backward arcs and {wi}0≤i<y as the tails of v’s corresponding incoming forward arcs. If we again assume a sorting such that
π(ui) ≤ π(ui+1) for all 0 ≤ i < y − 1, then v must be moved to a position less than or
equal to π(u0).
Let Elim(π) the predicate that indicates whether a linear ordering π respects the Eliminable Layouts Property. ByLemma 4.18, we have:
Corollary 4.20
For every linear ordering π holds: Opt(π) ⇒ Elim(π).
From here on, we stipulate that if a linear ordering π respects the Eliminable Layouts Property, then it does not induce an eliminable layout on any vertex.