2.2.1. Basic Definitions
Let us consider the formulation and solution of the problem for constructing the routes in a plane graph that satisfy the condition that the interior faces of any their initial parts do not intersect with the edges of the remaining part. Formally, such routes are defined as an ordered sequence of
-chains (ordered enclosing chains) of the graph
and form a class of
-paths. The definitions, proofs and notations of the theory of routes with ordered enclosing (
-routes) are introduced in [
19]. Let us give these definitions to avoid the loss of generality.
Definition 1. Chain in plane graph G has ordered enclosing (is an -chain), if for any its initial part , the condition holds.
Theorem 2 ([
19])
. Let be a plane Euler graph. For any vertex incident to outer (infinite) face of graph G there exists Euler -cycle . The proof of this theorem gives the recursive algorithm of
-cycle constructing. This algorithm has computing complexity
. However, there exists non-recursive approach with computing complexity
[
28].
Let’s generalize Definition 1 up to the notion of -route plane graphs (it is possible non-Eulerian and disconnected).
Definition 2. The ordered sequence of edge-disjoint -chainscovering graph G and such thatis a route with ordered enclosing (-route). Definition 3. Let a route consisting of a minimal (in cardinality) ordered sequence of edge-disjoint -chains in a plane graph G be called an Euler route with ordered enclosing (Euler -route), and -chains forming it be the Euler -cover.
Theorem 3 ([
27])
. Let G connected plane graph, be the set of its odd vertices, then the cardinality N of Euler -cover of G satisfies the inequalityholds. The upper and lower bounds are reachable. The cover capacity is significantly influenced by the presence of bridges in the graph. In their absence, the lower bound is reached, in the case of the existence of vertices of odd degree incident to the outer face; or, if there are no such vertices, the cardinality of the cover is one higher than the lower bound.
The construction of the -route of the graph G solves the considered cutting problem in the absence of restrictions on self-intersections and the placement of starting (i.e., pierce) points for all chains.
2.2.2. Algorithms Constructing -Chains for Connected Graph G
Algorithms for constructing
-routes in plane Eulerian graphs are known [
28]. The possibility of constructing an
route in an arbitrary plane graph demonstrates Theorem 4 [
24].
Theorem 4. Let be plane connected graph without bridges on S. There exists the set of edges so that graph be Euler, and there exists Euler cycle in graph , such that , , for any its initial part , the condition holds.
We use the concept of the edge e rank while considering the algorithms of -routes constructing.
Definition 4. The rank of edge be the value of function recursively defined as following:
let be the set of edges bounding outer face of graph , then ;
let be the set of edges of rank 1 for graph then .
Definition 5 ([
28]).
Let rank of face be a value of function :where be a set of edges incident to outer face . Definition 6 ([
28])
. Let rank of vertex be a value of function : where is a set of edges incident to vertex . We developed the following polynomial time algorithms for constructing -routes for plane graphs:
Euler
-cycle in plane Euler graph (algorithm
OE-CYCLE, computing complexity
[
29]);
connected
-route of Chinese postman for any plane connected graph; removing re-traversed edges will result in a
-route; this route is not optimal either in terms of the number of covering chains or the length of idle passes (algorithm
CPP_OE, computing complexity
[
30]);
a route in plane connected graph without bridges being the
-cover optimal by the number of chains, the length of idle passes may not be optimal (algorithm
OECover, computing complexity
[
19]);
-route in plane connected graph without bridges with additional edges, connecting the odd vertices (algorithm
M-COVER with computing complexity
); this algorithm appended by algorithm of finding the shortest matching between odd vertices allows to obtain
-cover with minimal summary length of additional edges (computing complexity
) [
19].
In this paper, we describe in details those of them that are not published in open access for the convenience of the reader.
Algorithm 1
OECover covers the plane graph
G by an ordered sequence of
-chains. The graph
G is encoded by the list of edges, and for each edge
e the functions considered in Theorem 1 are defined.
Algorithm 1 Algorithm OECover |
- Require:
be a plane graph; be the set of odd vertices; - Ensure:
, , ; - 1:
Initiate(); ▷ Assign the initial values of all used variables - 2:
Order(); ▷ Define the ranks of edges, and form the ordered lists for vertices - 3:
SortOdd(); ▷ Sorting of odd vertices by decreasing of their rank - 4:
ifthen ▷ Define the starting value of a chain - 5:
; - 6:
else; - 7:
end if - 8:
while () do - 9:
; ▷ Form a chain from the defined vertex - 10:
; ▷ Exclude the starting vertex of current chain from the list - 11:
if ( then) ▷ Check the possibility to construct one more chain - 12:
break; - 13:
end if - 14:
; - 15:
end while
|
In the body of the procedure Initiate, the initial values of all used variables are assigned, and the first edge belonging to the boundary of the outer face is defined.
Procedure Order Algorithm 2 functional purpose of the Order procedure is in:
- (1)
defining the value for each edge (note that the rank of any edge of a plane graph can be determined in time using this procedure);
- (2)
forming the list of incident edges for each vertex (the edges are ordered in descending order of the value).
Algorithm 2 Procedure Order |
- 1:
procedure Order - 2:
while do - 3:
while () and () do - 4:
M1: ▷ Forming the queue of -marked edges - 5:
; ▷ Define the rank of an edge - 6:
; - 7:
if then - 8:
REPLACE(); - 9:
end if - 10:
; ; ; - 11:
end while - 12:
; ; ; ; - 13:
M2: ▷ Placing the -marked edges to the lists of the corresponding vertices - 14:
; ; ; - 15:
if then - 16:
▷ Form queue of -marked edges of all unmarked edges bounding - 17:
if then - 18:
; - 19:
else - 20:
; - 21:
end if - 22:
end if - 23:
if then ▷ Pushing of edge to stacks of vertices and - 24:
if then - 25:
; - 26:
else - 27:
; - 28:
end if - 29:
; ; - 30:
end if - 31:
end while - 32:
end procedure
|
After executing the Initiate and Order procedures, the odd vertices are ordered in ascending order of their rank using the SortOdd procedure. The rank of the vertex v is the value of the function . Then, the loop do…while is executed using the FormChain procedure (see Algorithm 3). This cycle constructs a sequence of simple paths between pairs of odd vertices. If none of the odd vertices is adjacent to the outer face, then it is necessary to construct a chain, where the first of the constructed paths starts at vertex of even degree , adjacent outer face, and ends at an odd vertex. All the chains of the cover are connecting the odd vertices, and the last one starts at odd vertex, and ends at vertex .
The aim of
FormChain procedure is to obtain the
-chain starting in a given vertex
w and ending in some odd vertex
,
. As a result of the procedure, a simple chain will be obtained
, for which
and for
and
vertices
if
vertex
and if
vertex
,
moreover, for any initial part
,
and for any vertex
the inequality
holds.
Algorithm 3 Procedure FormChain |
- 1:
procedureFormChain(In: w starting vertex of a chain; Out: v ending vertex of a chain) - 2:
; ; - 3:
do - 4:
; - 5:
; - 6:
if then ▷ Find the edge of maximal rank, a bridge if possible - 7:
; - 8:
else - 9:
; - 10:
end if - 11:
if then - 12:
REPLACE(e); ▷ Change the indexes of functions for edge e from k to , - 13:
end if - 14:
; ▷ Delete edge e and delete faces divided by edge e - 15:
; - 16:
; - 17:
while (); - 18:
return v; - 19:
end procedure
|
Theorem 5. Let be a plane connected bridgeless graph on S, and be the set of odd vertices. For any matching M on set in graph , there exists Euler cycle , , for any initial part , of which, the condition holds.
The proof of Theorem 5 is constructive and consists in proving the efficiency of the algorithm
M-Cover (see Algorithm 4) for constructing a cover for any matching on the set of odd vertices [
19].
Algorithm 4 Algorithm M-Cover |
- Require:
plane connected graph G, functions , , ; vertex incident to outer face; matching M on set of odd vertices ; boolean function on set of odd vertices ; - Ensure:
almost ordered set C of -chains of graph G, being the -cover of graph G; - 1:
Order (G); ▷ Define for all - 2:
; ▷ Constructing - 3:
while
do - 4:
FormChain(); - 5:
if then - 6:
; ▷ Vertex u is a pair for vertex v in matching M - 7:
▷ Delete vertices from - 8:
; ▷ Finish constructing the current chain - 9:
end if - 10:
end while - 11:
End of algorithm
|
The main difference of this algorithm from
-Cover is that for each vertex
the next one
is fixed. It is the vertex to which the transition is made. Algorithm
M-Cover can finish constructing the current chain both at the first visit to the vertex
, and at the moment when the vertex becomes dead-end (i.e.,
). To determine at what moment to finish the constructing of the chain, the values of
are used, where
. Here ⪰ is partial ordering on
induced by tree
of shortest paths to vertex
:
To construct the optimal cover (i.e., cover with a minimal length of additional edges) it is enough to take the shortest matching on set of odd vertices
as
M. This task is realized by the following Algorithm 5.
Algorithm 5 OptimalCover |
- Require:
plane graph G represented by the list of edges with defined functions , , , - Ensure:
cover of graph G by -chains , - 1:
Define the shortest matching M on set - 2:
Run algorithm M-Cover for graph G and matching M - 3:
Stop
|
Obviously, Algorithm 5 allows us to construct the optimal -cover, and its computing complexity is not greater than (but by using special data structures and algorithms, it is possible to run this algorithm by the time not exceeding ). This estimation is defined by the computing complexity of Step 1.