Generalization of the Reachability Problem on Directed Graphs

The problem of reachability on graphs with restriction is studied. Such restrictions mean that only those paths that satisfy certain conditions are valid paths on the graph. Because of this, for classical optimization problems one has to consider only a subset of feasible paths on the graph, which signiﬁcantly complicates their solution. Reachability constraints arise naturally in various applied problems, for example, in the problem of navigation in telecommunication networks with areas of strong signal attenuation or when modeling technological processes in which there is a condition for the order of actions or the compatibility of operations. General concepts of a graph with non-standard reachability and a valid path on it are introduced. It is shown that the classical graphs, as well as graphs with restrictions on passing through the selected arcs subsets are special cases of graphs with non-standard reachability. General approach to solving the shortest path problem on a graph with non-standard achiev-ability is developed. This approach consists in constructing an auxiliary graph and reducing the shortest path problem on a graph with non-standard reachability to a similar problem on an auxiliary graph. The theorem on the correspondence of the paths of the original and auxiliary graphs is proved.


Introduction
In the classical setting when forming a path on a directed graph, all its arcs are considered equal, and all paths are valid.
Suppose that there is some condition for passing through the arcs of the selected subsets, due to which some paths on the graph become not a valid. Consider a small example. Suppose that some vehicles are powered by solar energy with a small battery. Such a battery allows vehicle to go only a small section of the path without recharging. On the graph, which corresponds to some road map, there are two types of arcs: light and dark arcs. To find the shortest path for a vehicle, it is necessary to consider the impossibility of passing in a row along two dark arcs. Thus, a reachability restriction on the graph is a quite naturally phenomenon. Moreover, reachability restrictions in the general case make us consider graphs with multiple arcs. It is because two verticies can be connected by several arcs of different types (for example, light and dark arcs).

Example 1
Consider the graph G in figure 1 with condition above. We use the d symbol to mark the dark arcs, and the l symbol to mark the light arc. Assume the lengths of the dark arcs are equal to 1, and the length of the light arc is equal to 10. The length of the shortest path from vertex x to vertex z is 11, while the length of the shortest path from vertex x to vertex y is 1. Therefore, both arcs from vertex x to vertex y are necessary to solve the shortest path problems on considered graph G.
Example 1 shows that classical methods for solving the shortest path problem are not applicable for graphs with reachability constraints.
Some natural conditions for reachability on directed graphs for special optimization problems can be found in papers [1]- [10].
The introduction of some conditions was considered in the papers [11]- [17]. Quite different types of reachability restrictions were considered and approaches to the classical reachability problem are developed for each case under consideration.
This paper introduces the general concepts of a graph with non-standard reachability and a valid path on such graphs. It is shown that previously studied graphs with restrictions on passing through the arcs of the selected subsets are special cases of graphs with non-standard reachability. Moreover, classical oriented graphs are also their special cases.

Main concepts and definitions
Here are the main concepts, symbols, and statements that are necessary for further presentation [12].
Usually a graph can be written as a pair G(X, E), where X is a set of vertices and E is a set of pairs of vertices each of which are called an arc. This definition is not enough for us, since it does not allow us to consider graphs with multiple arcs.
We use following definitions of a graph and a path on it: Definition 1 A directed graph is a triple G(X, U, f ), where X is the set of vertices, U is a set, which is called a set of arcs, and f : U → X ×X is a mapping which specifies an incidence relation.
Consider the standard projection mappings p 1 , p 2 : X × X → X such that p 1 (x, y) = x and p 2 (x, y) = y. Then the vertex x = (p 1 • f )(u) is the initial vertex of the arc u, and the vertex y = (p 2 • f )(u) is its end vertex.
Definition 2 Let G(X, U, f ) be a graph. A mapping µ : Definition 3 A vertex y is said to be reachable from some vertex x if there is a path µ, the initial vertex of which is the vertex x and the end vertex is y.

Graphs with condition for the reachability
Consider graphs with different conditions for reachability of their vertices. Such conditions mean that there are paths on graph which are not valid. Graphs with condition for reachability are also called graphs with non-standard reachability [12]. Now we describe general approach to (non-standard) reachability on directed graphs. This approach will allow us to use the concept of reachability on graphs in a generalized form.
Here and everywhere below values k, m ∈ Z + are known and fixed numbers.
2. Function ϕ µ : N → [0; k] Z which is called a numeric characteristic of an arbitrary path µ.

A formal reachability restriction.
Suppose that characteristic ϕ µ of an arbitrary path µ is defined recurrently as following: where a t depends on the set U t of the collection U * which the arc µ(i) belongs to, and F : Z ×Z → [0; k] Z is some function. For example, F may be defined by following rule: F (x, y) = min{k, x + y}.
There are two types of formal reachability restrictions: strict restrictions and non-strict restrictions.
The strict restriction may be written as following: Condition (1) means that if characteristic ϕ of path µ for step m is equal to j, next arc (m + 1-th arc) of path µ must belong to set U (j) .
The strict restriction may be written as following: where [x] + is a set of all arcs for which x is an initial vertex. Condition (2) means that if characteristic ϕ of path µ for step m is equal to j and there are possibility to continue path µ by an arc of set U (j) , next arc (m+1-th arc) of path µ must belong to set U (j) .
Definition 5 A path µ on graph G is called a valid path if it sutisfy to formal restriction that specified for graph G.
Thus, by specification of two collections of subsets, numeric characteristic of an arbitrary path and a formal restriction any graph, on which not all paths are valid, can be considered in terms of graphs with non-standard reachability. Moreover, classical oriented graph is only a special case of graphs with non-standard reachability.

Example 2
Let G 1 (X, U, f ) be a graph for which m = k = 0, i.e.
In this case there is only one way to deterine the characteristics ϕ: ϕ µ (i) = 0 ∀ i > 0, ∀ µ. Then, under a formal restriction of any type, all arcs of the graph G 1 are equivalent in forming of any path, therefore all paths are valid. Thus, graph G 1 is a classical directed graph.

Example 3
Consider the graph G 2 (X, U, f ) in figure 2. For this graph (3,4) and f (u 6 ) = (4,5). We assume m = k = 1 and determine collec- Also we suppose that characteristic ϕ is determined for each path µ as following: and it is selected strict formal restriction (1).
Graph G 2 . Symbols "+" and "−" mark the arcs of the sets U 0 and U 1 respectively.
Consider three paths on the graph G 2 : Since the graph G 2 does not contain parallel arcs, all these paths can be written as vertex sequences: µ 1 : 1 → 2 → 4 → 5, µ 2 : 1 → 3 → 4 → 5, and µ 3 : 1 → 4 → 5. The path µ 1 is not a valid path since the characteristic ϕ µ1 (2) = 1, but the next arc of path µ 1 (arc u 6 ) does not belong to the set U (1) . Similarly, the path µ 3 is not a valid path. And only the path µ 2 is a valid path, since it satisfies all the conditions. Since classical algorithms for solving reachability problems require that all paths on the graph are valid, therefore they could not be applied to similar problems on graphs with nonstandard reachability.
To solve reachability problems, we propose an approach that consists in constructing an auxiliary graph of a larger size, but on which all paths are valid.
The rules for constructing an auxiliary graph G (X , U , f ): Each vertex x of the original graph G corresponds to k + 1 vertices {x (0) , . . . , x (k) } on the auxiliary graph G . Arcs of graph G are built according to the following rule: Let the arc u ∈ U be such that f (u) = (x, y), then y (F (j,ai)) . If a formal restriction of a non-strict type (2) is selected, then in addition to these arcs, additional arcs are constructed according to the rule: Theorem 1 Let G be a graph with non-standard reachability. Then a vertex y is reachable from vertex x on original graph G iff on auxiliary graph G at least one of the vertices of the set V y = {y (0) , . . . , y (k) } is reachable from the vertex x (0) .

PROOF. Sufficiency.
Statement "on auxiliary graph G at least one of the vertices of the set V y = {y (0) , . . . , y (k) } is reachable from the vertex x (0) " means that there exists at least one path µ from vertex x (0) to vertex y (j) .
Conduct the proof by method of mathematical induction on the number of arcs (p) in the path µ .
1. p = 1, i.e. path µ consists of only one arc u such that f (u ) = (x (0) , y F (0,ai) ) for some i ∈ [0; m] Z . According to the rules for constructing an auxiliary graph, arc u corresponds to arc u of original graph G such that f (u) = (x, y) and u ∈ U i ∩ U (0) . Hence, vertex y is reachable from vertex x on original graph G, since there exists path µ, which consists of only one arc u, from vertex x to vertex y.

2.
Let for any p ≤ s the statement under the proof holds. We prove that it holds for p = s + 1.
1 , y (F (q,ap)) ) and F (q, a p ) = j). Path µ 1 = µ \ {u is } contains s arcs, begins in vertex x (0) and ends in vertex y 1 = (p 1 • f )(u is ). According to the supposition of induction, path µ 1 corresponds to a valid path µ 1 from the vertex x to the vertex y 1 on the original graph G. In this case, the characteristic ϕ µ1 at the end of the path µ 1 is equal to the value q.
Arc u is corresponds to arc u ∈ U p ∩ U (q) on original graph G. Consider now path µ = µ 1 ∪ {u}. This path is a valid path, since characteristic ϕ µ , which is equal to characteristic ϕ µ1 at the end of path µ 1 , is equal to the value q and its' next arc u belongs to the set U (q) . And since (p 2 • f )(u) = y, therefore, the vertex y is reachable from the vertex x on the original graph.

Necessity.
Vertex y is reachable from vertex x on original graph G with non-standard reachability, hence, there exists valid path µ = {u 1 , . . . , u s } from x to y.
Let's construct mapping α µ : U µ → U (here U µ is a set of arcs of path µ) as following: Any arc u i of the path µ corresponds to the arc α µ (u i ) of graph G such that ( According to the rules for constructing of an auxiliary graph, the mapping α can be constructed for any valid path µ. Hence, µ = {α µ (u 1 ), . . . , α µ (u s )} is a path on the auxiliary graph G . In this case (p 1 • f )(µ ) = x (0) , (p 2 • f )(µ ) ∈ V y . Thus, on auxiliary graph G at least one of the vertices of the set V y is reachable from the vertex x (0) .
Theorem is proved.

702
Generalization of the Reachability Problem on Directed Graphs Theorem 2 Any path µ which begins in vertex x (0) on the auxiliary graph G corresponds to the valid path µ on the original graph G.

Theorem 3
The shortest path µ from vertex x (0) to set of vertices V y on the auxiliary graph G corresponds to the shortest valid path µ from vertex x to vertex y on the original graph G.
Theorems 2 and 3 are direct corollaries of theorem 1.

Example 4
Let's consider the graph G 2 (X, U, f ), which is presented in example 3. The formal rules of construction of an auxiliary graph is illustrated in figure 3. Then the auxiliary graph G 2 is shown in figure 4. On graph G 2 there is only one path µ from vertex 1 (0) to set of vertices V 5 = {5 (0) , 5 (1) }. This path can be written as following sequence of vertices: µ : 1 (0) → 3 (1) → 4 (0) → 5 (1) . Path µ corresponds to valid path µ 2 : 1 → 3 → 4 → 5 and there are no paths on G 2 that are corresponds to paths µ 1 and mu 3 on original graph G 2 . And, as it was shown, paths µ 1 and µ 3 are not valid paths on original graph G 2 .

Special cases of graph with nonstandard reachability
In this section we consider some special cases of reachability restrictions on digraphs, which were introduced earlier in papers [11], [14] and [18]. These quite different restrictions were presented as collections of rules for forming the set of valid paths. We show that all such collections can be formalized by the definition 4.

Graphs with mixed reachability
The condition of mixed reachability [11] of order s can be written as folowing: The arc set U of graph G is a union of two disjoint sets U l and U d . A path µ is a valid path on graph G if it doesn't contain subpath of lenght k, all arcs of which belong to U d .
Note that graphs of examples 1 and 3 are graphs with mixed reachability of order 2.

Graphs with valve reachability
The condition of mixed reachability [14] of order s can be written as folowing: The arc set U of graph G is a union of m + 1 disjoint sets U v 0 , . . . , U v m . A path µ is a valid path on graph G if for each its arc µ(i) (i > 0) the following condition holds: In other words, the arcs of the set U v s become admissible for passing along them only after passing along any arc of the set U v s−1 .
According to the definition 4, graph G with mixed reachability of order s can be written as following: 0. Assume parameter k = m; 2. Function ϕ µ is deterined as ϕ µ (0) = 0 and ϕ µ (i) = F (ϕ µ (i − 1), a t ) ∀i > 0, where a t = min{t, k − 1} and F (x, y) = max{x, y + 1} 3. Select strict formal reachability restriction (1). The construction of an auxiliary graph, according to the rules specified in the section 3, is shown in figure 6.
x (1) x (k−1) x (k) x (0) x (1) x (k−1) x (k) x (0) x (1) x (k−1) x (k) It is clear that such construction of an auxiliary graph coincides with the construction of an auxiliary graph which was considered in paper [14].

Graphs with magnetic reachability
The condition of magnetic reachability [18] of order s can be written as folowing: The arc set U of graph G is a union of two disjoint sets U neut and U mag , neutral and magnetic arcs respectively. Each magnetic arc increases magnetic value of whole path. A path µ is a valid path on graph G if following condition holds: if magnetic value is equal at least to k and there is at least one arc to continue the path µ which belongs to U mag , then next arc of the path µ must belong to set U mag .
3. Select nonstrict formal reachability restriction (2). The construction of an auxiliary graph, according to the rules specified in the section 3, is shown in figure 7. Here the arc u k , such that f (u k ) = (x (k) , y (k) ), must be constructed only if on the original graph G there are no arcs from vertex x that belong to set U 1 .

Conclusions
This paper introduces the general concepts of a graph with non-standard reachability and a valid path on it. The classical graphs, as well as graphs with restrictions on passing through the selected arcs subsets, are special cases of graphs with nonstandard reachability.
Thus, it was developed generalization of concept of a digraph as a graph with non-standard (generalized) reachability. According to such generalization, the approach to solving the shortest path problem on a graph with non-standard reachability is developed. This approach consists in constructing an auxiliary graph and reducing the shortest path problem on a graph with non-standard reachability to a similar problem on an auxiliary graph. Hence, we get a new method to study new graph models such as models with restrictions.