arXiv:2610.27879cs.CCOct 2026

Manuscript Offprint

arXiv:2610.27879

Space Complexity of Reachability in Simple Path Graphs

Krishnamoorthy Dinesh, Chandana Sasidharan

Abstract

One of the central questions in space complexity is whether nondeterministic logspace computations (NL) can be simulated in unambiguous logspace (UL). A stronger notion, reach unambiguity (ReachUL ⊆\subseteq UL ∩\cap coUL), requires every configuration reachable from the start to have exactly one computation path [BJLR91]. It is known that directed graph reachability is NL-complete, planar graph reachability is in UL, and undirected graph reachability is in deterministic logspace (L). In this work, we study the space complexity of reachability problem for restricted directed graph families and show the following.

  1. For reach unambiguous graphs (graphs with at most one path from start vertex to every vertex), Lange [Lan97] showed that reachability is in ReachUL. As our main result, we show that for simple path graphs (introduced in [KKR08], which contains reach unambiguous graphs), where each vertex has at most one simple path from the start, the reachability problem lies in UL ∩ coUL. The key difficulty lies in recognizing whether the input graph is a simple path graph or not.

  2. Our first result can also be equivalently stated as follows: the recognition problem for simple path graphs is in UL ∩ coUL if and only if the reachability problem restricted to simple path graphs is also in UL ∩ coUL. Inspired by this, we investigate the complexity of graph recognition versus graph reachability for other directed graph classes. Observe that for any graph class, solving reachability (for the class) also solves the recognition problem for that class. We show that for reach unambiguous graphs, solving recognition is as hard as solving reachability (making both of them ReachUL-complete).

*Department of Computer Science and Engineering, Indian Institute of Technology Palakkad, Kerala, India. Email: {kdinesh,112303001}@iitpkd.ac.in

1 Introduction

One of the central problems in space complexity asks if nondeterministic computation (captured by the class NL consisting of languages accepted by machines using logspace with potentially multiple accepting paths on any run) can be made unambiguous (captured by the class UL consisting of languages accepted by machine using logspace with at most one accepting path on any run) [RA00]. A stricter form of unambiguity, namely, reach unambiguity (captured by the class ReachUL ⊆ UL ∩ coUL) introduced in [BJLR91] requires that for every configuration reachable (which can be accepting, rejecting or aborting) from the start configuration, there is exactly one path in the configuration graph of the machine 1^{1}. Note that there are two existing definitions for ReachUL. Buntrock et al. [BJLR91] says that the configuration graph of the run of a reach unambiguous machine could have multiple accepting configurations, while Lange’s [Lan97] definition has a fixed unique accepting configuration. Both definitions yield the same class [BJLR91]. In this work, we use Lange’s definition.

Fig. 1 gives a visual representation of how the configuration graph of machines associated with each of the above complexity classes looks like.

Figure

NL

Figure

UL

Figure

ReachUL

start

L

Figure 1: The gray vertices denote the accepting configuration, solid black vertices denote reject configuration, and black outlined vertices denote abort configuration. The gray paths are accepting paths, dotted paths are rejecting and dashed paths are aborting. The path constraints are as follows: NL allows an arbitrary number of paths, UL requires at most one accepting path, ReachUL requires at most one accept, reject, and abort paths (to each vertex), L has exactly one computational path ending in either accept or reject configuration.

A natural way to get a better understanding of these classes is by studying problems complete for them (under many-one logspace reductions). While the general problem of directed graph reachability is complete for NL, we do not know of any natural complete problem for UL.

Surprisingly, for the stricter notion of reach unambiguity, Lange [Lan97] showed that reachability for a certain restricted family of graph is complete for ReachUL (under logspace reductions). Of particular interest in this work is a special family of directed graphs called reach unambiguous graphs (where there is at most one path from start vertex to every other vertex) for which the reachability problem is in ReachUL. This family of graphs is of interest as it is the only family of directed graphs for which reachability for n vertex graphs can be checked deterministically in O(log⁡2nlog⁡log⁡n)O(\frac{\log^2 n}{\log \log n}) space, beating what is achievable with Savitch's theorem (for more details, see [AL98,

1^{1}See Section 2 for a formal definition.

All23]). For connections to logspace algorithms in the quantum setting, see [AE25]). Also, showing that a problem is in ReachUL implies that it can be solved in in simultaneous polynomial time and poly-logarithmic space, which places it in the class SC 2^{2} [BJLR91, Coo79]. It is an open problem to design such algorithms solving reachability for general directed graphs [Wig92].

Kannan et al. [KKR08] considered a strict generalization of this family called simple path graphs, where there is at most one simple path from the start vertex to any other reachable vertex 2^{2}. They gave a simultaneous sub-linear space and polynomial time algorithms for solving graph reachability restricted to this class. Towards improving this result, if we could show that the reachability for simple path graphs is solvable reach unambiguously in logspace, then it gives a polynomial time and poly-logarithmic space algorithm (as ReachUL ⊆\subseteq SC 2^{2}).

Towards this, as our first contribution, we show that the reachability problem for simple path graphs (denoted SimplePath-Reach) is in UL ∩ coUL (Theorem 1). Note that all the graphs considered in this work are directed.

Theorem 1 (Main). Given a graph, checking if it is a simple path graph, is in UL ∩ coUL. In particular, this means that the reachability problem restricted to this class SimplePath-Reach ∈ UL ∩ coUL.

Observe that if a graph G with s as a start vertex is guaranteed to be a simple path graph, then there is at most one simple path to any other vertex reachable from s. Hence, such a path must also be the shortest path, which is unique. A result of Reinhardt and Allender [RA00] shows that given a graph G and two vertices s and t, if there is a logspace computable weight assignment to the edges of a graph that guarantees that the minimum weight path from s to t is unique, checking reachability from s to t in G is in UL ∩ coUL. Hence, assigning unit weights to each edge (which is indeed logspace computable), immediately shows that the reachability problem SimplePath-Reach is in UL ∩ coUL. Hence, the difficult part is in recognizing whether the given graph is indeed a simple path graph 3^{3}. In such graphs, the vertices that are not reachable from the start vertex could have arbitrary structure (see Fig. 2). This also adds to the difficulty of the recognition problem for simple path graphs.

Due to this, it is not clear if one could design a (logspace computable) weighting scheme to check if a given graph is a simple path graph (via an application of Reinhardt and Allender's result). Instead, we build on the algorithm of Lange [Lan97] for reach unambiguous graphs (which can be viewed as a depth bounded depth first search) and extend the same to simple path graphs.

Motivated by the relation between the recognition and reachability for simple path graphs, as our second contribution, we explore this relation for other graph classes also. In general, the complexity of reachability restricted to a specific family of graphs seems to give a lot of information on the power and limitations of space bounded complexity classes. A celebrated result due to Reingold [Rei08] showed that if the graphs are undirected, then the reachability problem is solvable in logspace. On the other hand, the problem stays complete for NL if the graphs are restricted to be acyclic. Interestingly, the reachability problem is solvable in UL if the graph family is planar [BTV09] (or even of higher genus [GST19]).

2^{2}This is indeed a strictly larger family, as the vertices reachable from the start vertex must form a tree in reach unambiguous graphs while a simple path graph is allowed to contain directed cycles.

3^{3}We thank the anonymous reviewers for pointing this out to us.

In this context, it is natural to ask about the complexity of the reachability problem for a special family of graphs G, called the G-Reach problem. For such a problem, it is also necessary to check if the graph belongs to the family of graphs G, called as the G-Rec problem. Note that, in general, the reachability problem for a family of graphs can be harder than the recognition problem. For instance, if G is the family of directed bipartite graphs G=(S,T,E)G = (S, T, E), where the edges may go from S to T, T to S or both, checking if the underlying undirected graph G is bipartite is in logspace [AG00], while reachability restricted to bipartite graphs is complete for NL. We ask if the same holds true for complexity classes below NL.

When G is reach unambiguous graphs, we show that the recognition problem is as hard as the reachability problem (Proposition 2), thereby exhibiting a class below NL for which the previous statement is not true. Note that, since G-Reach for reach unambiguous graphs is in ReachUL [Lan97], and as the recognition problem reduces to it, the recognition problem for reach unambiguous graphs is also solvable in ReachUL. Hence the recognition and reachability problems reduces to each other for reach unambiguous graphs.

Proposition 2. Let G be reach unambiguous graphs, let M be a reach unambiguous machine by which G-Rec is in ReachUL. Then, there exists a reach unambiguous machine which makes exactly one oracle query to L(M)L(M), solving the G-Reach problem.

Towards proving the above, note that a ReachUL algorithm with a ReachUL oracle access can be simulated in ReachUL. Such a result is known when the base machine is in deterministic logspace [BJLR91]. We state this as a proposition.

Proposition 3. ReachUL ReachUL^{ReachUL} = ReachUL

Indeed, ReachUL ⊆\subseteq ReachUL ReachUL^{ReachUL}. To see the other direction, any machine N with an oracle access to L′L' in ReachUL, where N accepts a language in ReachUL can be simulated reach unambiguously. As ReachUL = coReachUL [BJLR91], the answers to oracle queries in L′L' can be found reach unambiguously.

Our techniques and overview of proofs: We describe the main ideas that goes in proving Theorem 1. We start by describing Lange's procedure and highlight the challenges involved in solving reachability for simple path graphs.

Lange’s procedure can be viewed as a depth bounded depth first search. More precisely, the procedure proceeds in rounds (starting with d=1d = 1), where each round starts by performing a pre-order traversal of the subgraph of the original graph consisting of all the vertices that are reachable from the start vertex up to a fixed depth dd. To facilitate the pre-order traversal, the procedure takes advantage of the graph structure and uses nondeterminism to correctly identify the next vertex in the pre-order traversal. If the nondeterministic choices are correct, the accepts and rejects will be unambiguous. The non-trivial part of Lange’s algorithm is that if the nondeterministic choices are incorrect, the procedure aborts and does so unambiguously, making the overall algorithm reach unambiguous.

For each value of d, the procedure verifies that the above subgraph (vertices reachable from s at distance at most d) is indeed reach unambiguous. The run of this procedure eventually defines a DFS tree rooted at s consisting of all the vertices reachable from s. Note that this tree is never stored explicitly.

We now discuss the challenges involved in adapting Lange’s procedure to simple path graphs. Simple path graphs are those graphs for which any DFS tree starting from s does not have a forward or cross edges (See Lemma 10). It can be argued that Lange’s procedure [Lan97] detects if the input graph has a forward, back edge or cross edge and rejects in all the three cases unambiguously. In particular, this means that the procedure will reject simple path graphs.

The first challenge is to make sure that the procedure does not reject on a back edge. This requires us to unambiguously identify if an edge is a back edge or not. We achieve this using the procedures IsLeftChildBackEdge (Alg. 1) and IsRightChildBackEdge, which takes in a vertex y and height h of y in the DFS tree and checks if its left or right child forms a back edge unambiguously. However, it need not abort unambiguously. Note that Lange's algorithm [Lan97] does not need to perform such checks.

The second challenge is to identify the next vertex to visit in the traversal. Consider the case where the subgraph reachable from s is a tree with back edges. Suppose that the current vertex (being explored) has a left child which is not part of a back edge. Then, the pre-order traversal must next visit the left child. In a different case, if the current vertex is the left child of the parent and is also a leaf vertex, then the next vertex to visit in the pre-order is the right child of the parent. However, it could be that the right child is a back edge 4^{4}. Lange's procedure does not have to handle this case as ReachUL configuration graphs do not have back edges.

To understand the third challenge, let us describe how the next vertex in the pre-order traversal is found if there are no more left child or right child left to move. This is because they have already been traversed or because they are back edges or leads to a deeper depth. Consider the case when the current vertex is a leaf and is the right child of its parent. Additionally, let the parent be the left child of its grandparent. In this case, the next vertex to visit is the grandparent's right child. However, it could be that this child could form a back edge.

We handle both of these issues in the Next and PathUncle procedure (Alg. 3, Alg. 4). The rest of this paper is organized as follows.

Organization of the paper: After giving the necessary background in Section 2, we first shows that reachability in simple path graphs is in UL ∩ coUL in Section 3, which prove Theorem 1. Towards this, we introduce a few procedures such as the Main (explained in Section 3.2) that performs a depth bounded depth first search on the input graph and checks for reachability. For this traversal, Main uses the procedure Next (explained in Section 3.3) that returns the pre-order successor of a given vertex in a special subgraph induced on the input graph. Two supporting algorithms used in Next are explained in Sections 3.1 and 3.4. Finally, we conclude with a discussion on the recognition vs reachability for special family of graphs in Section 4, proving Proposition 2 from Section 1.

AI Disclosure The TikZ code for Figs. 2, 3 and 6 to 9 were generated with the help of ChatGPT-5 and Claude-4. All other parts of this manuscript did not use any form of generative AI (open or proprietary).

4^{4}Forward and cross edges are not possible by Lemma 10.

Acknowledgements We are grateful to the anonymous reviewers for their comments and suggestions and, in particular, for pointing out to us that recognizing simple path graphs also solves the reachability problem unambiguously (see Page 3). C. S. thanks the Department of Computer Science and Engineering, IIT Palakkad for the extended financial support received.