Keywords

1 Background and Overview

1.1 Solvability of the Directed s-t Connectivity Problem

Polynomial-time computation has been widely acknowledged as a natural, reasonable, theoretical model of tractable computation and all such tractable decision problems are known to form a complexity class, known as \(\mathrm {P}\). For polynomial-time computation, we are more keen to its minimal use of memory space from theoretical and practical interest. A typical example of small memory usage may be logarithmic-space computation (or log-space computation, in short), which requires \(O(\log {n})\) memory space to complete its computation on each input of size n. The complexity class \(\mathrm {L}\) is composed of all decision problems solvable in polynomial time using log space and its nondeterministic counterpart is known as \(\mathrm {NL}\). Unlike \(\mathrm {NP}\) (nondeterministic polynomial time), \(\mathrm {NL}\) is known to be closed under complementation [8, 14]. Besides the well-studied \(\mathrm {P}=\mathrm {NP}\) question, one of the most challenging open questions is the decades-old \(\mathrm {L}=\mathrm {NL}\) question, which asks whether \(\mathrm {NL}\) decision problems are all solvable using log space.

One of the most studied \(\mathrm {NL}\) problems is probably the directed s-t connectivity problem Footnote 1 (DSTCON) concerning the reachability of vertices in a directed graph.

Directed s-t Connectivity Problem (DSTCON):

  • \(\circ \) Instance: a directed graph G and two designated vertices s and t.

  • \(\circ \) Question: is there any path from s to t in G?

Decades ago, Jones [9] demonstrated that DSTCON is \(\mathrm {NL}\)-complete (under log-space many-one reductions). Even though instances are restricted to directed acyclic graphs of maximum degree at most 3 (3DSTCON), the s-t connectivity problem still remains NL-complete. Nonetheless, \(\mathrm {DSTCON}\) has since then played a key role as a typical NL-complete problem in quest of determining the exact computational complexity of \(\mathrm {NL}\).

In order to solve \(\mathrm {DSTCON}\), a straightforward exhaustive search algorithm requires simultaneously \(O(m+n)\) time and \(O(n\log {n})\) space for any directed graph of n vertices and m edges. A more sophisticated deterministic algorithm of Barnes et al. [4] solves it in polynomial time using at most \(n/2^{c\sqrt{\log {n}}}\) space for a certain constant \(c>0\). This space bound is only slightly below a linear function. For restricted graphs such as planar directed graphs, on the contrary, Asano et al. [3] gave a polynomial-time, \(\sqrt{n}\, \ell (n)\)-space algorithm for \(\mathrm {DSTCON}\), where \(\ell \) refers to a certain suitable polylogarithmic function. Moreover, Kannan et al. [10] designed an \(n^{\varepsilon }\ell (n)\)-space algorithm for so-called directed unique-path graphs, where \(\varepsilon \) is a constant in (0, 1). In particular, when directed graphs are regular, DSTCON is solvable using \(O(\log {n})\) space [12]. For single-source planar directed acyclic graphs, there is an \(O(\log {n})\)-space algorithm to determine their s-t connectivity [1]. The s-t connectivity problem for undirected graphs (USTCON) can be solved using only \(O(\log {n})\) space [11]. In contrast, if we allow super-polynomial (i.e., \(\varTheta (n^{\log {n}})\)) execution time, then there is a known deterministic algorithm solving DSTCON using \(O(\log ^2{n})\) space [13].

Despite decades of vigorous studies, it is still unknown whether \(\mathrm {DSTCON}\) or its search version can be solved in polynomial time using “significantly less” memory space than any linear function.

A search version of the \(\mathrm {DSTCON}\), denoted by \(\mathrm {Search\text{- }}\mathrm {DSTCON}\), is to find a (not necessary simple) path in a given directed graph between two specified vertices if any (otherwise, it outputs a designated symbol “\(\bot \)”). Such a path can be easily found using log space with an adaptive queries to oracles in NL. \(\mathrm {Search\text{- }}\mathrm {BFT}\), for example, is an NL search problem of constructing from a given directed graph a breadth-first tree rooted at a given starting vertex and a typical approach to solve \(\mathrm {DSTCON}\) is to construct such breadth-first trees. In a similar fashion, many NL decision problems can be turned into NL search problems and NL optimization problems (or NLO problems, in short) [15, 16].

1.2 Size Parameters and Parameterized Problems

We are more concerned with problems, which are parameterized by certain “size parameters,” where size parameters in practice play important roles in measuring the precise computational complexity of the problems. All the space-complexity bounds stated in Sect. 1.1 concern with \(\mathrm {DSTCON}\) parameterized by two particular size parameters, one of which is the total number \(m_{ver}(x)\) of vertices and the other is the number \(m_{edg}(x)\) of edges of a graph in a graph-related instance x. Generally, the choice of different size parameters tends to lead to different complexities. To certain restricted variants of \(\mathrm {DSTCON}\) and \(\mathrm {Search\text{- }}\mathrm {DSTCON}\), however, \(m_{ver}\) and \(m_{edg}\) endow the same complexity.

1.3 Sub-Linear and Hypo-Linear Space

For a further discussion and exposition, it is imperative to clarify our terminology of the “sub-linearity.” Even though slightly unusual but for our convenience, we informally use two different terms to describe a space bound below any linear function. The informal term “sub linear” indicates functions of the form \(m(x)^{\varepsilon }\ell (|x|)\) on instances x for a certain constant \(\varepsilon \in (0,1)\) and a suitable polylogarithmic function \(\ell \) [17], whereas the term “hypo linear” (or possibly “far sub-linear”) means functions upper-bounded by \(m(x)^{\varepsilon }\ell (|x|)\) on instances x for an arbitrary choice of \(\varepsilon \in (0,1)\). The multiplicative factor \(\ell \) may become redundant when m(x) is relatively large (e.g., \(m(x)\ge (\log {|x|})^c\) for any constant \(c\ge 1\)). Corresponding to the above terms, we express as \(\mathrm {PsubLIN}\) the class of all (parameterized) decision/search problems solvable in polynomial time using sub-linear space [17]. Similarly, \(\mathrm {PhypoLIN}\) is defined using hypo-linear space.

1.4 Short Reductions

The notion of reducibility has served as an effective tool in comparing the computational complexity of problems.

As noted earlier, it is unknown whether \(\mathrm {DSTCON}\) is in \(\mathrm {PsubLIN}\). To solve this open question, it is imperative to understand the structure of the class \(\mathrm {PsubLIN}\) (as well as \(\mathrm {PhypoLIN}\)). For our purpose, we will investigate the relative complexity of \(\mathrm {DSTCON}\) and its natural variants based on appropriately chosen “reducibilities,” in particular, space-bounded many-one and Turing reducibilities, which are technical tools in measuring the relative complexity of two given problems. Since we are concerned with sub-linear and hypo-linear space computations, for our study, we particularly need a quite restricted form of reducibility, which are known as “short” reducibility [17].

Polynomial-time sub-linear-space computability makes quite different effects on various NL-complete problems. Notably, even if \(\mathrm {DSTCON}\) is polynomial-time, sub-linear-space solvable, many other NL-complete problems may not be solved in polynomial time using sub-linear space. Let us recall \(3\mathrm {DSTCON}\). The problem \(\mathrm {BDSTCON}\) is to ask whether an s-t path of length at most k exists in a directed graph. These problems \(3\mathrm {DSTCON}\) and \(\mathrm {BDSTCON}\) are \(\mathrm {NL}\)-complete but they are not known to have the same complexity as \(\mathrm {DSTCON}\) does from a viewpoint of polynomial-time sub-linear-space computability.

This circumstance no longer makes a standard log-space reduction suitable for our study on \(\mathrm {PsubLIN}\). For this very reason, we intend to use short reducibility, in which an outcome of a reduction must be linear in the size parameter of each instance. This linear-size requirement is sufficient to guarantee the closure property of \(\mathrm {PsubLIN}\) under those short reductions.

Here, we consider three types of short reducibilities \(\le ^{\mathrm {sL}}_{m}\), \(\le ^{\mathrm {sL}}_{T}\), and \(\le ^{\mathrm {sSLRF}}_{T}\), whose precise definitions will be given in Sect. 3.2. These short reducibilities help us classify various NL decision, search, and optimization problems from the viewpoint of polynomial-time sub-linear-space computability.

1.5 Major Contributions

A main motivation of this work is to determine the polynomial-time sub-linear-space solvability/insolvability of \(\mathrm {DSTCON}\). We hope that this work will pave a way to determining the minimum space usage necessary for all NL-complete problems, which may lead us to an answer to the \(\mathrm {NL}\subseteq ?\mathrm {PsubLIN}\) problem or even the decades-old \(\mathrm {L}=?\mathrm {NL}\) problem. In this preliminary report, we will provide a number of results for \(\mathrm {DSTCON}\) and other graph-related problems, aiming at the better understandings of the relative complexity of \(\mathrm {DSTCON}\) and its variants parameterized by size parameters. The use of short reductions help us obtain a classification of the computational complexity of those parameterized problems. This classification result is summarized in Fig. 1, in which a lower problem is \(\le ^{\mathrm {sSLRF}}_{T}\)-reducible to an upper problem, both of which are parameterized by \(m_{ver}\). In what follows, we will give a brief explanation of the problems cited in the figure.

One of the important properties of directed graphs is acyclicity, where a graph is acyclic if there is no cycle (including self-loops) in it. We write \(\mathrm {ADSTCON}\) for the acyclic directed s-t connectivity problem, in which we determine the existence of an s-t path in each given directed acyclic graph. Technically speaking, this problem is a so-called “promise problem” because the acyclic property of a graph G is guaranteed a priori when instances (Gst) of \(\mathrm {ADSTCON}\) are given. In contrast, the problem \(\mathrm {DCYCLE}\) asks whether there is a cycle in a given directed graph.

It is useful to deal with an instance graph, which has at most one s-t path. This restriction gives rise to another problem, called the unique directed s-t connectivity problem (\(\mathrm {Unique}\mathrm {DSTCON}\)). Similarly, we consider the unique directed cycle problem (\(\mathrm {UniqueDCYCLE}\)) by requiring “at most one cycle.”

Fig. 1.
figure 1

\(\le ^{\mathrm {sSLRF}}_{T}\)-reducibility relationships among decision/search problems parameterized by \(m_{ver}\). Problems below the dotted curved line are shown to be in \(\mathrm {PsubLIN}\).

Planarity is another important property, where a graph is planar if it can be drawn on a plane in a way that no two edges intersect with each other except for their endpoints. Such a drawing is called a planar combinatorial embedding, which is a permutation of the edges adjacent to each vertex. We write \(\mathrm {Planar}\mathrm {DSTCON}\) for \(\mathrm {DSTCON}\) whose inputs are planar graphs. Similarly, we define \(\mathrm {Planar}{3}\mathrm {DSTCON}\) from \({3}\mathrm {DSTCON}\).

A directed graph \(G=(V,E)\) is said to be layered if the vertex set V is partitioned into \(L_1,L_2,\ldots ,L_k\) with \(k\in \mathbb {N}^{+}\) such that, for every \(i\in [k-1]\), all edges from \(L_i\) are directed to certain vertices in \(L_{i+1}\). We write \({3}\mathrm {LDSTCON}\) for \({3}\mathrm {DSTCON}\) limited to inputs of layered graphs.

As a special case of planar graphs, a grid graph is a graph \(G=(V,E)\) in which \(V\subseteq \mathbb {N}\times \mathbb {N}\) and all edges are of the form either \(((i,j),(i+b,j))\) or \(((i,j),(i,j+b))\) for a certain \(b\in \{\pm 1\}\). We consider the directed grid graph s-t connectivity problem (DGGSTCON). A directed grid graph is called layered if it contains only edges directed to east and south (i.e., rightward and downward edges). The layered version of \(\mathrm {DGGSTCON}\) is denoted by \(\mathrm {LDGGSTCON}\).

All the aforementioned problems are decision problems. To refer to their associated search version, we use a simple notation of \(\mathrm {Search\text{- }}{P}\) for each decision problem P. For example, a search version of \(\mathrm {DSTCON}\) is \(\mathrm {Search\text{- }}\mathrm {DSTCON}\), which is to find an s-t path in a given directed graph G.

The minimum path problem, \(\mathrm {Min\text{- }Path}\), is an optimization problem of finding a minimal s-t path in a directed graph G from each instance of the form (Gst).

The detailed explanations of the following graph-related concepts will be given in Sect. 4.2. The notation \(\mathrm {Search\text{- }}\mathrm {DST}\) denotes the problem of finding a (directed) spanning tree of any given directed graph G, rooted at a specified vertex r in G. When instance graphs to \(\mathrm {Search\text{- }}\mathrm {DST}\) are promised to be directed acyclic graphs, we write \(\mathrm {Search\text{- }}\mathrm {ADST}\) instead of \(\mathrm {Search\text{- }}\mathrm {DST}\). We denote by \(\mathrm {Search\text{- }}\mathrm {SPT}\) the problem of finding from each instance (Gr) a shortest-path tree rooted at r. \(\mathrm {Search\text{- }}\mathrm {BFT}\) is the problem of finding a breadth-first tree of a given directed graph rooted at a given vertex (with the left vertex condition).

In many application of \(\mathrm {DSTCON}\), certain features of instance graphs are often used to simplify NL-completeness proofs. One such feature is topological ordering of vertices of a given graph. Here, a topologically-ordered version of \(\mathrm {DSTCON}\) (resp., \({3}\mathrm {DSTCON}\)) is denoted by \(\mathrm {TOPDCON}\) (resp., \(\mathrm {3TOPDCON}\)). In contrast, \(\mathrm {TOPSORT}\) is a search problem whose task is to produce a topological ordering of a given directed acyclic graph starting at a given vertex.

A sophisticated algorithm of Barnes et al. [4] together with the equivalence in complexity among parameterized problems \((\mathrm {Search\text{- }}\mathrm {BFT},m_{ver})\), \((\mathrm {Search\text{- }}\mathrm {SPT},m_{ver})\), and \((\mathrm {Min\text{- }Path},m_{ver})\) (see Proposition 9(2)) leads to the following solvability result of them.

Theorem 1

\((\mathrm {Search\text{- }}\mathrm {BFT},m_{ver})\), \((\mathrm {Search\text{- }}\mathrm {SPT},m_{ver})\), and \((\mathrm {Min\text{- }Path},m_{ver})\) are solved in polynomial time using at most \(n/2^{c\sqrt{\log {n}}}\) space for an absolute constant \(c>0\).

Lately, the linear space hypothesis or LSH—a practical working hypothesis—was introduced in [17] in connection to polynomial-time sub-linear-space computability. The hypothesis LSH for \(\mathrm {2SAT}_3\) asserts that no polynomial-time sub-linear-space deterministic algorithm solves \(\mathrm {2SAT}_3\), which is the satisfiability problem restricted to 2CNF formulas, each variable of which appears at most 3 times as literals. It was shown in [17] that LSH for \(\mathrm {2SAT}_3\) implies that \(3\mathrm {DSTCON}\) does not fall into \(\mathrm {PsubLIN}\). What follows in the next theorem is a simple application of LSH for \(\mathrm {2SAT}_3\) to the computational complexity of \((\mathrm {TOPSORT},m_{ver})\). An argument similar to [17, Sect. 6] proves the insolvability of \((\mathrm {TOPSORT},m_{ver})\).

Theorem 2

Assuming LSH for \(\mathrm {2SAT}_3\), no deterministic Turing machine solves \((\mathrm {TOPSORT},m_{ver})\) in polynomial time using \(O(m_{ver}(x)^{\varepsilon /2})\) space on instances x to \(\mathrm {TOPSORT}\) for any fixed constant \(\varepsilon \in [0,1)\).

2 Basic Notions and Notation

2.1 Numbers and Graphs

Let \(\mathbb {N}\) be the set of natural numbers (i.e., nonnegative integers) and set \(\mathbb {N}^{+}=\mathbb {N}-\{0\}\). Two notations \(\mathbb {R}\) and \(\mathbb {R}^{\ge 0}\) denote respectively the set of all real numbers and that of all nonnegative real numbers. For two integers m and n with \(m\le n\), an integer interval \([m,n]_{\mathbb {Z}}\) is the set \(\{m,m+1,m+2,\ldots ,n\}\). When \(n\ge 1\), we conventionally write [n] in place of \([1,n]_{\mathbb {Z}}\).

All polynomials have nonnegative integer coefficients and all logarithms are to base 2, provided that “\(\log {0}\)” is conveniently set to be 0. A polylogarithmic (or polylog) function \(\ell \) is a function mapping \(\mathbb {N}\) to \(\mathbb {R}^{\ge 0}\) for which there exists a polynomial p satisfying \(\ell (n)=p(\log {n})\) for all \(n\in \mathbb {N}\).

A directed graph G is expressed as (VE) with a set V of vertices and a set E of edges. We explicitly express edges as pairs of vertices and this convention eliminates multi-edges. In a given graph G, a path from s to t is a series \((x_1,x_2,\ldots ,x_n)\) of vertices in G with \(n\ge 2\) such that \(x_1=s\), \(x_n=t\), and \((x_i,x_{i+1})\) is an edge in G for every index \(i\in [n-1]\). A path is called simple if no internal vertex is repeated (i.e., there is no cycle or self-loop in it). An s-t path is a path from vertex s to vertex t and is expressed as \(s\leadsto t\). The length of a path from v to u is the number of edges in the path. and the notation dis(uv) denotes the distance from u to v, which is the minimal length of any path from u to v. A directed graph G is (weakly) connected if its underlying undirected graph is connected. For each vertex \(v\in V\), let \(in(v) = \{u\in V\mid (u,v)\in E\}\) and \(out(v) = \{u\in V\mid (v,u)\in E\}\). Each vertex v has indegree |in(v)| and outdegree |out(v)|. We simply call \(|in(v)\cup out(v)|\) the degree of vertex v. A source is a vertex of indegree 0 and a sink is that of outdegree 0.

Let \(G=(V,E)\) be any directed graph. Given a subset S of V, we write \(G\setminus S\) for the graph obtained from G by removing all vertices in S and all edges incident on them. A subset S of V in G is called a planarizing set if \(G\setminus S\) is a planar graph. A subset S of V is said to be separating if \(G\setminus S\) is disconnected, and nonseparating otherwise.

2.2 Machine Models, Parameterized Problems, and Size Parameters

Our basic model of computation is a multi-tape Turing machine of the following form. Our Turing machine consists of a read-only input tape, (possibly) a write-only output tape, and a constant number of read/write work tapes. A tape head on the output tape moves only to the right if it writes a non-blank symbol, and it stays still otherwise. All other tape heads move in both directions (to the right and to the left) unless it stays still. An oracle Turing machine is further equipped with a query tape—a special output tape—on which the machine produces query strings (or query words) to transmit to the oracle for its answer. Given an oracle P, the notation \(M^P(x)\) indicates an outcome of M on input x by making queries to the oracle P.

We will study the computational complexity of problems based on a suitable choice of “size parameters” in place of a standard size parameter, which is the total length |x| of the binary representation of an input instance x. To emphasize the choice of m, we often write (Pm) in place of P (when we use the standard “length” of instances, we omit “m” and write P instead of (Pm)). A (log-space) size parameter m(x) for a problem P is formally a function mapping \(\varSigma ^*\) to \(\mathbb {N}\) such that (i) m(x) must be computed using \(O(\log |x|)\) space and (2) there exists a polynomial p satisfying \(m(x)\le p(|x|)\) for all instances x of P.

For any graph-related problem P, let \(m_{edg}(x)\) and \(m_{ver}(x)\) denote respectively the total number of edges and that of vertices of a graph given as a part of instance x of P. We say that a Turing machine M uses logarithmic space (or log space, in short) with respect to size parameter m if there exist two absolute constants \(c,d\ge 0\) such that, on each input x, each of the work tapes (not including input and output tapes) used by M on x are upper-bounded by \(c\log {m(x)}+d\).

Associated with log-space computability, \(\mathrm {L}\) and \(\mathrm {NL}\) are respectively the classes of all decision problems solvable on deterministic and nondeterministic Turing machines using log space. It is known that the additional requirement of “polynomial runtime” does not change these classes. The notation \(\mathrm {FL}\) stands for a class of polynomially-bounded functions that can be computed using space at most \(O(\log {|x|})\).

An NL search problem P parameterized by a (log-space) size parameter m(x) is a pair (Pm) with \(P=(I,SOL)\) satisfying \(I\in \mathrm {L}\) and \(I\circ SOL\in \mathrm {auxFL}\), where I consists of (admissible) instances and SOL is a function from I to a set of strings such that, for any (xy), \(y\in SOL(x)\) implies \(|y|\le m(x)\), where \(I\circ SOL\) for the set \(\{(x,y)\mid x\in I, y\in SOL(x)\}\) [15, 16]. In addition, for each fixed constant \(k>0\), the notation \((I\circ SOL)^{\exists }_{m}\) denotes the set \(\{x\in I\mid \exists y\in SOL(x)\;[|y|\le k m(x) +k \wedge (x,y)\in I\circ SOL\;]\}\). We say that a deterministic Turing machine M solves (Pm) with \(P=(I,SOL)\) if, for any instance \(x\in I\), M takes x as input and produces a solution in SOL(x) if \(SOL(x)\ne \emptyset \), and produces a designated symbol, \(\bot \), otherwise. We denote by \(\mathrm {Search\text{- }}\mathrm {NL}\) a collection of all NL search problems. For convenience, its polynomial-time counterpart is denoted by \(\mathrm {Search\text{- }}\mathrm {NP}\). It follows that \(\mathrm {Search\text{- }}\mathrm {NL}\subseteq \mathrm {Search\text{- }}\mathrm {NP}\). \(\mathrm {Search\text{- }}\mathrm {PsubLIN}\) denotes a search version of \(\mathrm {PsubLIN}\).

3 Sub-Linear/Hypo-Linear Space and Short Reductions

3.1 Sub-Linear and Hypo-Linear Space Computation

Our target is search and optimization problems parameterized by suitable size parameters m(x) for instances x. Throughout this paper, we informally use the term “sub-linear” to mean a function of the form \(m(x)^{\varepsilon }\, \ell (|x|)\) on input instances x for a certain constant \(\varepsilon \in (0,1)\) and a certain polylog function \(\ell (n)\). In contrast, “hypo linear” (or possibly “far sub linear”) refers to functions upper-bounded by the function \(m(x)^{\varepsilon }\, \ell (|x|)\) on instances x for an arbitrary choice of constant \(\varepsilon \in (0,1)\) and for a certain polylog function \(\ell (n)\).

A (parameterized) search problem (Pm) with \(P = (I,SOL)\) is said to be solvable in polynomial time using sub-linear space (resp., using hypo-linear space) if, for a certain choice of constant \(\varepsilon \in (0,1)\) (resp., for an arbitrary choice of \(\varepsilon \in (0,1)\), there exist a deterministic Turing machine \(M_{\varepsilon }\), a polynomial \(p_{\varepsilon }\), and a polylog function \(\ell _{\varepsilon }\) for which M finds a valid solution in SOL(x) in at most \(p_{\varepsilon }(|x|)\) steps using at most \(m(x)^{\varepsilon }\, \ell _{\varepsilon }(|x|)\) tape cells for all admissible instances x in I. We use \(\mathrm {PsubLIN}\) (resp., \(\mathrm {PhypoLIN}\)) to denote the collection of all decision problems (Pm) that are solvable in polynomial time using sub-linear space (resp., hypo-linear space), where the suffix “P” refers to “polynomial time.”

Moreover, we introduce the notation \(\mathrm {PTIME},\!\mathrm {SPACE}(s(n))\) to denote a class composed of all (parameterized) decision problems (Pm) solvable deterministically in polynomial time (in |x|) using space at most s(m(x)) on any instance x to P. It thus follows that \(\mathrm {L}\subseteq \mathrm {PhypoLIN}\subseteq \mathrm {PsubLIN}\subseteq \mathrm {P}\). Note that \(\mathrm {L}=\mathrm {P}\) implies \(\mathrm {L}=\mathrm {PhypoLIN}= \mathrm {PsubLIN}= \mathrm {P}\).

3.2 Short Reductions Among Decision and Search Problems

Let us first extend the existing notion of short reducibilities, which was first discussed in [17] for (parameterized) decision problems, to search problems.

We start with standard \(\mathrm {L}\)-m-reducibility. For any two (parameterized) search problems \((P_1,m_1)\) and \((P_2,m_2)\) with \(P_1=(I_1,SOL_1)\) and \(P_2=(I_2,SOL_2)\), we say that \((P_1,m_1)\) is L-m-reducible to \((P_2,m_2)\), denoted by \((P_1,m_1)\le ^{\mathrm {L}}_{m}(P_2,m_2)\), if there are two functions \((f,\Vert ),(g,\Vert )\in \mathrm {FL}\) (where \(\Vert \) refers to the bit length) and two constants \(k_1,k_2>0\) such that, for any x and y, (i) \(x\in I_1\) implies \(f(x)\in I_2\), (ii) \(x\in I_1\) and \(y\in SOL_2(f(x))\) imply \(g(x,y)\in SOL_1(x)\), and (iii) \(m_2(f(x))\le m_1(x)^{k_1}+k_1\), and (iv) \(m_1(g(x,y))\le m_2(y)^{k_2}+k_2\). As for decision problems, we simply drop Condition (iv). Notice that all functions in \(\mathrm {FL}\) are, by their definition, polynomially bounded.

To discuss the sub-linear-space solvability, however, we need to restrict the L-m-reducibility, which we call the short L-m-reducibility (or sL-m-reducibility, in short), obtained by replacing two equalities \(m_2(f(x))\le m_1(x)^{k_1}+k_1\) and \(m_1(g(x,y))\le m_2(y)^{k_2}+k_2\) in the above definition of \(\le ^{\mathrm {L}}_{m}\) with \(m_2(f(x))\le k_1 m_1(x)+k_1\) and \(m_1(g(x,y))\le k_2 m_2(y)+k_2\), respectively. To express this new reducibility, we use another notation of \(\le ^{\mathrm {sL}}_{m}\). Obviously, every \(\le ^{\mathrm {sL}}_{m}\)-reduction is an \(\le ^{\mathrm {L}}_{m}\)-reduction but the converse does not hold in general [17].

We say that \((P_1,m_1)\) is SLRF-T-reducible to \((P_2,m_2)\), denoted by \((P_1,m_1)\le ^{\mathrm {SLRF}}_{T}(P_2,m_2)\), if, for every fixed value \(\varepsilon >0\), there exist an oracle Turing machine \(M_{\varepsilon }\), a polynomial \(p_{\varepsilon }\), a polylog function \(\ell _{\varepsilon }\), and three constants \(k_1,k_2,k_3\ge 1\) such that, (1) \(M_{\varepsilon }^{P_2}(x)\) runs in at most \(p_{\varepsilon }(|x|)\) time using at most \(m_1(x)^{\varepsilon }\, \ell _{\varepsilon }(|x|)\) space for all instances x of \(P_1\), provided that its query tape is not subject to a space bound, (2) when \(M_{\varepsilon }^{P_2}(x)\) queries to \(P_2\) with query word z written on a write-only query tape, \(m_2(z)\le m_1(x)^{k_1}+k_1\) and \(|z|\le |x|^{k_3}+k_3\) hold for all instances x to \(P_1\), (3) for any oracle answer y, \(m_1(M_{\varepsilon }^{P_2}(x))\le m_2(y)^{k_2}+k_2\), and (4) in response to the same word queries at any moment, the oracle \(P_2\) always returns the same answer, which is a valid solution to \(P_2\). Any oracle answer must be written on a read-once answer tape, in which its tape head moves from the left to the right whenever it reads a non-blank symbol. After \(M_{\varepsilon }\) makes a query, in a single step, it erases its query tape, it returns its tape head back to the initial cell, and an oracle writes its answer directly onto the answer tape.

We also define short SLRF-T-reducibility (or sSLRF-T-reducibility) by replacing the above inequalities \(m_2(z)\le m_1(x)^{k_1}+k_1\) and \(m_1(M_{\varepsilon }^{P_2}(x))\le m_2(y)^{k_2}+k_2\) with \(m_2(z)\le k_1 m_1(x)+k_1\) and \(m_1(M_{\varepsilon }^{P_2}(x))\le k_2 m_2(y)+k_2\), respectively. We tend to use the notation \(\le ^{\mathrm {sSLRF}}_{T}\) to denote this new reducibility. Every \(\le ^{\mathrm {sSLRF}}_{T}\)-reduction is obviously an \(\le ^{\mathrm {SLRF}}_{T}\)-reduction. In the case where \(M_{\varepsilon }\) is limited to log-space usage, we use a new notation \(\le ^{\mathrm {sL}}_{T}\). Note that any \(\le ^{\mathrm {sSLRF}}_{T}\)-reduction is an \(\le ^{\mathrm {SLRF}}_{T}\)-reduction but the converse is not true because there is a pair of problems reducible by \(\le ^{\mathrm {SLRF}}_{T}\)-reductions but not by \(\le ^{\mathrm {sSLRF}}_{T}\)-reductions [17].

We list several fundamental properties of short reductions [17].

Lemma 3

[17]

  1. 1.

    \((P_1,m_1)\le ^{\mathrm {L}}_{m}(P_2,m_2)\) implies \((P_1,m_1)\le ^{\mathrm {L}}_{T}(P_2,m_2)\), which further implies that \((P_1,m_1)\le ^{\mathrm {SLRF}}_{T}(P_2,m_2)\). The same statement holds also for \(\le ^{\mathrm {sL}}_{m}\), \(\le ^{\mathrm {sL}}_{T}\), and \(\le ^{\mathrm {sSLRF}}_{T}\).

  2. 2.

    The reducibilities \(\le ^{\mathrm {SLRF}}_{T}\) and \(\le ^{\mathrm {sSLRF}}_{T}\) are reflexive and transitive.

  3. 3.

    \(\mathrm {PhypoLIN}\) is closed under \(\le ^{\mathrm {SLRF}}_{T}\)-reductions and \(\mathrm {PsubLIN}\) is closed under \(\le ^{\mathrm {sSLRF}}_{T}\)-reductions.

Given any reduction, say, \(\le _r\), we say that A is \(\le _{r}\) -equivalent to B, denoted by \(A\equiv _rB\), if both \(A\le _rB\) and \(B\le _rA\) hold.

4 Relative Complexity of Search-DSTCON and Variants

The short reductions given in Sect. 3.2 are quite useful in determining the relative complexity of various decision, search, and optimization problems in connection to the polynomial-time sub-linear-space solvability. Figure 1 has shown numerous reducibility relationships among those problems in terms of \(\le ^{\mathrm {sSLRF}}_{T}\)-reducibility. In what follows, we will verify each of the relationships in the figure.

4.1 Connectivity of Acyclic, Planar, and Grid Graphs

We begin with \(\mathrm {DSTCON}\), \(\mathrm {ADSTCON}\), and \(\mathrm {DCYCLE}\) and their search versions. It is important to note that a decision problem and its search version are not necessarily equivalent in complexity. For acyclic graphs, however, their associated decision and search problems are actually \(\le ^{\mathrm {sL}}_{T}\)-equivalent; namely, \((\mathrm {Search\text{- }}\mathrm {ADSTCON},m) \equiv ^{\mathrm {sL}}_{T}(\mathrm {ADSTCON},m)\) for any \(m\in \{m_{ver},m_{edg}\}\). This property is not yet observed for general graphs. For instance, we do not know whether \((\mathrm {DSTCON},m)\equiv ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {DSTCON},m)\).

The uniqueness condition makes \((\mathrm {Search\text{- }}\mathrm {Unique}\mathrm {DSTCON},m)\) and \((\mathrm {Search\text{- }}\mathrm {UniqueDCYCLE},m)\) \(\le ^{\mathrm {sL}}_{m}\)-reducible to \((\mathrm {Search\text{- }}\mathrm {DSTCON},m)\) and \((\mathrm {Search\text{- }}\mathrm {DCYCLE},m)\), respectively, for each size parameter \(m\in \{m_{ver},m_{edg}\}\). In addition, the following relationships hold.

Lemma 4

Let \(m\in \{m_{ver},m_{edg}\}\).

  1. 1.

    \((\mathrm {Search\text{- }}\mathrm {DCYCLE},m) \le ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {DSTCON},m)\).

  2. 2.

    \((\mathrm {Search\text{- }}\mathrm {UniqueDCYCLE},m) \le ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {Unique}\mathrm {DSTCON},m)\).

  3. 3.

    \((\mathrm {Search\text{- }}\mathrm {ADSTCON},m)\le ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {UniqueDCYCLE},m)\).

Proof

(1) The desired \(\le ^{\mathrm {sL}}_{T}\)-reduction works as follows. Let \(G=(V,E)\) be given as an instance to \(\mathrm {Search\text{- }}\mathrm {DCYCLE}\). Recursively, we choose one edge (st) in G. We then define another graph \(G'=(V',E')\) with \(V'=V\) and \(E'=E-\{(s,t)\}\) and make a query of the form \((G',s,t)\) to \(\mathrm {Search\text{- }}\mathrm {DSTCON}\), used as an oracle. If the s-t path exists in \(G'\), then G must have a cycle passing through s and t. Otherwise, we choose another edge in the above recursion.

(2) This is essentially the same as (1).

(3) Given \(x=(G,s,t)\) with \(G=(V,E)\) as an instance to \(\mathrm {Search\text{- }}\mathrm {ADSTCON}\), we define another graph \(G'=(V',E')\) by setting \(V'=V\) and \(E'=E\cup \{(t,s)\}\). Since G is guaranteed to be acyclic, \(G'\) has a cycle (passing through s and t) iff there is an s-t path in G. Note that such a cycle is unique if it actually exists. Since \(|V'|=|V|\) and \(|E'|=|E|+2\), it follows that \((\mathrm {Search\text{- }}\mathrm {ADSTCON},m) \le ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {UniqueDCYCLE},m)\).   \(\square \)

Concerning the planarity property, the problem \(\mathrm {Planar}\mathrm {DSTCON}\) belongs to \(\mathrm {UL}\) [5], where UL is a natural variant of NL. Note that testing whether a given graph G is planar can be done in log space because such testing is reducible to \(\mathrm {USTCON}\) [2], where \(\mathrm {USTCON}\) is known to belong to \(\mathrm {L}\) [11]. Moreover, a planar combinatorial embedding can be computed in log space [2].

At this point, we need to discuss the difference between two size parameters \(m_{ver}\) and \(m_{edg}\). In certain restricted cases, the choice of those size parameters does not affect the computational complexity of graph-related problems.

Proposition 5

  1. 1.

    \((\mathrm {Search\text{- }}\mathrm {DSTCON},m_{edg})\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {DSTCON},m_{ver})\).

  2. 2.

    \((\mathrm {Search\text{- }}{3}\mathrm {DSTCON},m_{ver})\equiv ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}{3}\mathrm {DSTCON},m_{edg})\).

  3. 3.

    \((\mathrm {Search\text{- }}\mathrm {Planar}\mathrm {DSTCON},m_{ver}) \equiv ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {Planar}\mathrm {DSTCON},m_{edg})\).

It is not known at present that the opposite direction of Proposition 5(1) holds; namely, \((\mathrm {Search\text{- }}\mathrm {DSTCON},m_{ver})\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {DSTCON},m_{edg})\).

Proof of Proposition 5. (1) Consider the following reduction function f. Given a graph \(G=(V,E)\), if either s or t is an isolated vertex, then f immediately outputs a graph consisting of \(\{s,t\}\) with no edges. Assuming otherwise, f transforms G into another graph \(G'=(V',E)\) by removing all isolated vertices from G. Since \(|E|\ge \frac{1}{2}|V'|\), it follows that \(m_{ver}(G',s,t)\le 2m_{edg}(G,s,t)\).

(2) An argument similar to (1) works for \(\mathrm {Search\text{- }}{3}\mathrm {DSTCON}\), and we then obtain \((\mathrm {Search\text{- }}{3}\mathrm {DSTCON},m_{ver})\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}{3}\mathrm {DSTCON},m_{edg})\). Conversely, let \(x=(G,s,t)\) with \(G=(V,E)\) be any instance to \(\mathrm {Search\text{- }}{3}\mathrm {DSTCON}\). Assume, without loss of generality, that s is a source, t is a sink, and no isolated vertex exists in G. Since G has maximum indegree 2 and maximum outdegree 2, it follows that \(|E|\le 4|V|\). This implies that \((\mathrm {Search\text{- }}{3}\mathrm {DSTCON},m_{edg})\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}{3}\mathrm {DSTCON},m_{ver})\).

(3) This comes from the fact that, for any planar graph \(G=(V,E)\), if \(|V|\ge 3\), then \(|E|\le 3|V|-6\) holds.   \(\square \)

The problem \(\mathrm {LDGGSTCON}\) is shown to be in \(\mathrm {UL}\cap \mathrm {co}\text{- }\mathrm {UL}\) [1] (stated as a comment after Theorem 20 in [1]). Note that Allender et al. [1] proved that \((\mathrm {DGGSTCON},m_{ver})\equiv ^{\mathrm {L}}_{m}(\mathrm {Planar}\mathrm {DSTCON},m_{ver})\), but their \(\mathrm {L}\)-m-reduction from \(\mathrm {Planar}\mathrm {DSTCON}\) to \(\mathrm {DGGSTCON}\) is not a short reduction.

Proposition 6

Let \(m\in \{m_{ver},m_{edg}\}\).

  1. 1.

    \((\mathrm {Search\text{- }}\mathrm {DGGSTCON},m) \le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {Planar}3\mathrm {DSTCON},m)\).

  2. 2.

    \((\mathrm {Search\text{- }}\mathrm {LDGGSTCON},m) \equiv ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {Planar}3\mathrm {LDSTCON},m)\).

A \((k,\ell )\) -graph is a graph in which every vertex has indegree at most k and outdegree at most \(\ell \). When instance graphs are limited to \((k,\ell )\)-graphs, we write, for example, \((k,\ell )\mathrm {DSTCON}\) in place of \(\mathrm {DSTCON}\).

Proof Sketch

In this proof, we will show only (2). We first claim that \((\mathrm {Search\text{- }}\mathrm {Planar}(2,2)\mathrm {LDSTCON},m) \equiv ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {Planar}3\mathrm {LDSTCON},m)\). Next, we claim that \((\mathrm {Search\text{- }}\mathrm {Planar}(2,2)\mathrm {LDSTCON},m) \equiv ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {LDGGSTCON},m)\). The reduction \((\mathrm {Search\text{- }}\mathrm {LDGGSTCON},m) \le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {Planar}(2,2)\mathrm {LDSTCON},m)\) is obvious. For the other direction, we use an argument of Allender et al. [1], who demonstrated that \(\mathrm {Planar}\mathrm {DSTCON}\) is \(\le ^{\mathrm {L}}_{m}\)-reducible to \(\mathrm {DGGSTCON}\). Note that their L-m-reduction is not a short reduction, and thus we need a slight modification of their reduction using the fact that our instance graphs are layered.

One way to extend the notion of planarity is to consider embedding onto orientable surfaces of genus more than 1, where the genus of a closed orientable surface is roughly the number of “handles” added to a sphere. Given a constant \(k\in \mathbb {N}^{+}\), \(\mathrm {EOS}(k)\) denotes a set of all directed/undirected graphs whose underlying undirected graphs can be embedded on orientable surfaces of genus g. For a function \(g:\mathbb {N}\rightarrow \mathbb {N}\), \(\mathrm {EOSDCON}(g)\) is \(\mathrm {DSTCON}\) whose instance graphs \(G=(V,E)\) are restricted to \(\mathrm {EOS}(g(|V|))\). In particular, \(\mathrm {EOSDCON}(0)\) coincides with \(\mathrm {Planar}\mathrm {DSTCON}\).

Theorem 7

Let \(m\in \{m_{ver},m_{edg}\}\).

  1. 1.

    \((\mathrm {Search\text{- }}\mathrm {Planar}\mathrm {DSTCON},m)\in \mathrm {PsubLIN}\).

  2. 2.

    For any constant \(\varepsilon \in (0,1)\), \((\mathrm {Search\text{- }}\mathrm {EOSDCON}(n^{\varepsilon }),m)\in \mathrm {PsubLIN}\).

  3. 3.

    \((\mathrm {Search\text{- }}\mathrm {LDGGSTCON},m) \in \mathrm {PhypoLIN}\).

Proof Sketch

(1)–(2) follow directly from [3, 6].

(3) Let \(\varepsilon \) be any constant in [0, 1). It suffices to show that \((\mathrm {Search\text{- }}\mathrm {LDGGSTCON},m_{ver})\) belongs to \(\mathrm {PTIME},\!\mathrm {SPACE}(n^{\varepsilon }\cdot polylog(n))\). Let \(x=(G,s,t)\) be any instance to \(\mathrm {Search\text{- }}\mathrm {LDGGSTCON}\). Let \(G=(V,E)\) and assume that \(V=[n]\times [n]\) for simplicity. Let \(\varepsilon \in (0,1)\). For the value \(n^{\varepsilon }\), we set \(S=\{(a,b)\in [n]\times [n]\mid a+b=n^{\varepsilon }+1\}\), \(V_{1}= \{(a,b)\in [n]\times [n]\mid a+b<n^{\varepsilon }+1\}\), and \(V_{2}= \{(a,b)\in [n]\times [n]\mid a+b>n^{\varepsilon }+1\}\). Note that \(|S|\le n^{\varepsilon }\) and \(|V_{1}|\le \sum _{i=1}^{n^{\varepsilon }-1}i = \frac{(n^{\varepsilon }-1)n^{\varepsilon }}{2}\). Pick \((a,b)\in S\). Consider a restricted grid graph with source (ab) and sink (nn). Let \(V_{a,b} = \{(i,j)\mid a\le i\le n,b\le j\le n\}\). Note that \(|V_{a,b}|= (n-a+1)(n-b+1)\). Recursively, we split this graph and then compute a path.

The optimization problem \(\mathrm {Min\text{- }Path}\) is known to be complete for \(\mathrm {NLO}\cap \mathrm {PBO}\) (i.e., a class of nondeterministic log-space optimization problems whose solutions are polynomially bounded) under approximation-preserving \(\mathrm {AC}^{ 0 }\)-reductions [15, 16] but it is not known to be complete for \(\mathrm {NLO}\). In contrast, the problem \(\mathrm {Max\text{- }Path}\) of finding the maximum simple paths of directed graphs is shown to be NPO-complete.

Given a function \(f:\mathbb {N}\rightarrow \mathbb {N}\), we further define \((\mathrm {Min\text{- }BPath}(f(n)),m)\) as a parameterized problem of finding a minimum s-t path of length at most f(m(x)) on every instance x to \(\mathrm {Min\text{- }Path}\). Here, we claim that \((\mathrm {Min\text{- }Path},m)\) can be reduced to its restricted form \((\mathrm {Min\text{- }BPath}(n^{\varepsilon }),m)\) for each constant \(\varepsilon \in (0,1)\).

Theorem 8

For any \(m\in \{m_{ver},m_{edg}\}\) and \(\varepsilon \in (0,1)\), \((\mathrm {BDSTCON},m)\equiv ^{\mathrm {sL}}_{T}(\mathrm {Min\text{- }Path},m)\equiv ^{\mathrm {sSLRF}}_{T}(\mathrm {Min\text{- }BPath}(n^{\varepsilon }),m)\).

Proof

Let \(m\in \{m_{ver},m_{edg}\}\) and \(\varepsilon \in (0,1)\). To show \((\mathrm {Min\text{- }Path},m)\le ^{\mathrm {sL}}_{T}(\mathrm {BDSTCON},m)\), we start with \(x=(G,s,t)\), obtain the minimal length, say, \(\ell \) of any s-t path by making queries to \(\mathrm {BDSTCON}\), and construct a path by setting \(v_1=s\) and by finding recursively \(v_{i+1}\) from \((v_1,v_2,\ldots ,v_i)\) so that G has a \(v_i\)-t path of length \(\ell -i+1\). The converse \((\mathrm {BDSTCON},m)\le ^{\mathrm {sL}}_{m}(\mathrm {Min\text{- }Path},m)\) is obvious.

It is easy to see that \((\mathrm {Min\text{- }BPath}(n^{\varepsilon }),m) \le ^{\mathrm {sL}}_{m}(\mathrm {Min\text{- }Path},m)\). For the converse, it suffices to show that \((\mathrm {BDSTCON},m)\le ^{\mathrm {sSLRF}}_{T}(\mathrm {Min\text{- }BPath}(n^{\varepsilon }),m)\). Let \(x=(G,s,t,k)\) with \(G=(V,E)\) be any instance to \(\mathrm {BDSTCON}\). We want to design an algorithm that determines whether the distance between s and t is at most k.

Let \(|V|=n\) and \(\tilde{n}=\lceil n^{\varepsilon } \rceil \). At stage \(i\ge 1\), compute \(D^{(i)}_{0}=\{u\in V\mid dis(s,u)=i\}\) by making queries of the form (Gsu) to \(\mathrm {Min\text{- }BPath}(n^{\varepsilon })\). If \(|D^{(i)}_{0}|>n^{1-\varepsilon }\), then move to the next stage \(i+1\). Assume otherwise. Starting with \(j=1\), recursively compute \(D^{(i)}_{j}=\{u\in V\mid \exists w\in D^{(i)}_{j-1}\,[ dis(w,u)= \tilde{n}]\,\}\). If \(|D^{(i)}_j|>n^{1-\varepsilon }\), then move to stage \(i+1\). Otherwise, increment j by one and continue until j reaches \(\lfloor (k-i)/n^{\varepsilon } \rfloor +1\). We then decide whether \(dis(w,t)\le \tilde{n}\) for a certain \(w\in D^{(i)}_{j}\). This establishes the reducibility relation \((\mathrm {BDSTCON},m)\le ^{\mathrm {sSLRF}}_{T}(\mathrm {Min\text{- }BPath}(n^{\varepsilon }),m)\).   \(\square \)

4.2 Breadth-First Search and Topological Sorting

We have discussed in Sect. 1.5 a number of search and optimization problems without giving the meaning of technical terminology used to describe these problems. First of all, we will explain such technical terminology to clarify the definitions of \(\mathrm {Search\text{- }}\mathrm {DST}\), \(\mathrm {Search\text{- }}\mathrm {ADST}\), \(\mathrm {Search\text{- }}\mathrm {SPT}\), \(\mathrm {Search\text{- }}\mathrm {BFT}\), \(\mathrm {Search\text{- }}\mathrm {TOPDCON}\), and \(\mathrm {TOPSORT}\), and we will verify the reducibility relationships, presented in Fig. 1, among these problems. See [7] for more information on the terminology.

Let us explain a general notion of spanning trees used for \(\mathrm {Search\text{- }}\mathrm {DST}\). A (directed) spanning tree for a given directed graph G from vertex r is a directed tree T rooted at r for which T is a subgraph of G and all vertices reachable in G from r are also in T.

An ordered tree is a rooted tree in which the children of each internal vertex are linearly-ordered (in the left-to-right order among those children). Here, we assume a fixed linear ordering of vertices. For two vertices, u and v, u is to the left of v in G if either (i) u and v are children of a common parent and u is smaller than v or (ii) a certain ancestor of u is to the left of a certain ancestor of v. Similarly, we can define the notion of “to the right of”.

In \(\mathrm {Search\text{- }}\mathrm {SPT}\), a shortest-path tree from vertex r in a directed graph G is a directed tree T rooted at r that contains all vertices v reachable in G from r in such a way that any path in T from r to v must be a shortest path in G. All shortest-path trees are obviously spanning trees. Hence, it follows that \((\mathrm {Search\text{- }}\mathrm {DST},m)\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {SPT},m)\).

Breadth-first trees used in \(\mathrm {Search\text{- }}\mathrm {BFT}\) are a special case of ordered, shortest-path trees. A breadth-first tree of a directed graph G from a vertex r is an ordered, shortest-path tree T of G, rooted at r, satisfying the following left vertex condition: for any vertices u and v in G, (uv) is incident to v in T iff u is to the left of every vertex w in G and (wv) is incident to v. \(\mathrm {Search\text{- }}\mathrm {BFT}\) is closely related to an NL optimization problem of finding the shortest s-t paths in given directed graphs. Concerning the complexity of \(\mathrm {Search\text{- }}\mathrm {BFT}\), we obtain \((\mathrm {Search\text{- }}\mathrm {DSTCON},m)\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {BFT},m)\) for each size parameter \(m\in \{m_{ver},m_{edg}\}\). Barnes et al. [4] demonstrated in essence that \((\mathrm {Search\text{- }}\mathrm {BFT},m_{ver})\in \mathrm {PTIME},\!\mathrm {SPACE}(n/2^{\ell \sqrt{\log {n}}})\) for a certain constant \(\ell >0\).

Known polynomial-time algorithms solving \(\mathrm {DSTCON}\) require more or less a (partial) construction of either breadth-first or depth-first trees from a given directed graph. Thus, we immediately obtain \((\mathrm {Search\text{- }}\mathrm {DSTCON},m)\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {BFT},m)\) for any size parameter \(m\in \{m_{ver},m_{edg}\}\). Therefore, it is important to investigate the space complexity of the breadth-first (and depth-first) tree search problems.

Theorem 9

For any size parameter \(m\in \{m_{ver},m_{edg}\}\), \((\mathrm {Search\text{- }}\mathrm {BFT},m) \equiv ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {SPT},m) \equiv ^{\mathrm {sL}}_{T}(\mathrm {Min\text{- }Path},m)\).

Proof

Since \((\mathrm {Search\text{- }}\mathrm {SPT},m) \le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {BFT},m)\), it suffices to show that (a) \((\mathrm {Min\text{- }Path},m) \le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {SPT},m)\) and (b) \((\mathrm {Search\text{- }}\mathrm {BFT},m) \le ^{\mathrm {sL}}_{T}(\mathrm {Min\text{- }Path},m)\).

(a) Given an instance \(x=(G,s,t)\) to \(\mathrm {Min\text{- }Path}\), we make a query of the form (Gs) to \(\mathrm {Search\text{- }}\mathrm {SPT}\), which returns a breadth-first tree rooted at s if it exists. We then output a unique s-t path in this tree. By the definition of breadth-first trees, this s-t path must be the shortest in G.

(b) Let \(x=(G,r)\) with \(G=(V,E)\) be any instance to \(\mathrm {Search\text{- }}\mathrm {BFT}\). For each vertex \(v\in V\), we make a query of the form (Grv) and calculate the minimum path length, dis(rv), between r and v from its oracle answer. Let \(L_i\) be a set of all vertices v satisfying \(dis(r,v)=i\). Note that we can enumerate all elements in \(L_i\) according to a fixed linear ordering for G. We define a new graph \(G'=(V',E')\) by setting \(V'=V\) and \((u,v)\in E'\) whenever there exists an index \(i\ge 1\) such that (i) \(u\in L_i\), \(v\in L_{i+1}\), and \((u,v)\in E\) and (ii) for any \(w\in L_i\) with \(w<u\), \((w,v)\notin E\). Clearly, \(G'\) is a breadth-first tree of G.   \(\square \)

A topological sort (topological order or topological numbering) used for the search problem \(\mathrm {TOPSORT}\) serves as a key ingredient to the development of many elementary graph algorithms. Given a directed acyclic graph \(G=(V,E)\), a topological sort of G from source s is a linear ordering of all its vertices starting at s satisfying that, for any edge \((u,v)\in E\), \(u<v\) holds, where “<” is a logarithmic-space computable linear order. We express such a linear ordering as \((v_1,v_2,\ldots ,v_n)\), where \(n=|V|\). In \(\mathrm {Search\text{- }}\mathrm {TOPDCON}\), however, we are given a directed graph \(G=(V,E)\) such that (1) all vertices of G are numbered between 0 and n and (2) for any pair \(i,j\in [n]\), if \((i,j)\in E\), then \(i<j\) holds. The task of this problem is to find a path in G from vertex 0 to vertex n.

Lemma 10

Let \(m\in \{m_{ver},m_{edg}\}\).

  1. 1.

    \((\mathrm {Search\text{- }}\mathrm {TOPDCON},m) \le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {ADSTCON},m)\).

  2. 2.

    \((\mathrm {Search\text{- }}\mathrm {LDGGSTCON},m) \le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}{3}\mathrm {TOPDCON},m)\).

Proof

We will prove only (2). Let \(x=(G,s,t)\) be any instance to \(\mathrm {Search\text{- }}\mathrm {LDGGSTCON}\) with \(G=(V,E)\). Without loss of generality, we assume that \(V=[n]\), \(s=(1,1)\), and \(t=(n,n)\). We define a linear ordering < over all vertices as follows: \((1,1)<(1,2)<(2,1)<\cdots<(1,i)<(2,i-1)<\cdots<(i,1)<\cdots <(n,n)\). Since G has only edges of the form \(((i,j),(i,j+1))\) and \(((i,j),(i+1,j))\), the above ordering satisfies that \((u,v)\in E\) implies \(u<v\). This is clearly an instance to \(\mathrm {Search\text{- }}(2,2)\mathrm {TOPDCON}\).

Next, we transform \(\mathrm {Search\text{- }}(2,2)\mathrm {TOPDCON}\) to \(\mathrm {Search\text{- }}{3}\mathrm {TOPDCON}\). For each vertex v, we can compute the degree deg(v) of v. Given each vertex v, we remove all of its outgoing edges and, instead, add an extra vertex \(v'\) and an edge set \(\{(v,v'),(v',w)\mid (v,w)\in E\}\). Finally, we define a new linear order \(<^*\) as follows: (1) if \(u,w\in V\), then \(u<^*w\) iff \(u<w\), (2) \(v<^*v'\), and (3) if \(u=v'\), then \(v'<^*w\) iff \(v<w\).   \(\square \)

Proposition 11

For every size parameter m taken from \(\{m_{ver},m_{edg}\}\), \((\mathrm {TOPSORT},m)\equiv ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {ADST},m) \le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {DST},m)\).

Proof

Let \(m\in \{m_{ver},m_{edg}\}\). It is obvious that \((\mathrm {Search\text{- }}\mathrm {ADST},m)\le ^{\mathrm {sL}}_{m}(\mathrm {Search\text{- }}\mathrm {DST},m)\). Hereafter, we want to show the \(\le ^{\mathrm {sL}}_{m}\)-equivalence between \(\mathrm {TOPSORT}\) and \(\mathrm {Search\text{- }}\mathrm {ADST}\). Let \(x=(G,s)\) with \(G=(V,E)\) be any instance to \(\mathrm {TOPSORT}\). Assume that all vertices in G are linearly ordered. Note that G is a directed acyclic graph. Let T be a depth-first tree of G from r, which is obtained by making a query (Gr) to \(\mathrm {Search\text{- }}\mathrm {ADST}\).

Let \(n=|V|\). Recursively, we define \(L_i\) for \(i\in [n]\). Initially, we set \(L_0=\{r\}\). For each index \(i\ge 1\), from T, we determine the set \(L_i\) of all vertices in T of distance i from r. We sort \(L_i\)’s according to the value i and then sort all vertices in \(L_i\) by a given linear order. Since T is a spanning tree, this process enumerates all vertices in G connected from r. This establishes \((\mathrm {TOPSORT},m)\le ^{\mathrm {sL}}_{T}(\mathrm {Search\text{- }}\mathrm {ADST},m)\).

Conversely, given an instance (Gs) to \(\mathrm {Search\text{- }}\mathrm {ADST}\), we make a query to \(\mathrm {TOPSORT}\) and obtain a topological sorting \((x_1,x_2,\ldots ,x_n)\) of G starting at s. Choose \(i=n\) and consider the set \(in(x_n)\). Choose the smallest index i for which \(x_i\) belongs to \(in(x_n)\), keep the edge \((x_i,x_n)\), and discard all the other edges \((x_j,x_n)\) with \(x_j\in in(x_n)\). Change i to \(i-1\) and repeat this process until \(i<0\). It is not difficult to show that the resulted graph is a spanning tree of G.    \(\square \)