Longest paths in Planar DAGs in Unambiguous Logspace
We show via two different algorithms that finding the length of the longest path in planar directed acyclic graph (DAG) is in unambiguous logspace UL, and also in the complement class co-UL. The result extends to toroidal DAGs as well.
š” Research Summary
The paper āLongest paths in Planar DAGs in Unambiguous Logspaceā investigates the computational complexity of the LongāPath problem when the input graph is a planar directed acyclic graph (DAG). While Reachability and Distance are known to lie in ULāÆā©āÆcoāUL for planar directed graphs, LongāPath is NPācomplete in general and its status for planar DAGs had not been settled. The authors prove that LongāPath for planar DAGs (denoted PDLP) is also in ULāÆā©āÆcoāUL, and they extend the result to DAGs that can be embedded on a torus.
The paper presents two independent algorithms that achieve this result.
AlgorithmāÆ1 ā Reduction to Distance.
The authors adapt a construction originally used for seriesāparallel graphs. For each vertex u they define the predecessor set P_u (all vertices that can reach u) and a set of āboundaryā edges E_u that cross from P_u to its complement. Because the graph is acyclic, every sātoāt path crosses each E_u exactly once. Each original edge (u,v) is replaced by a path of length
āl_uv = 2Ā·(ā_{xāV} outdeg(x))āÆāāÆ1.
Consequently, any sātoāt path Ļ of length |Ļ| in the original graph is transformed into a path of length 2Ā·|E|āÆāāÆ|Ļ| in the new graph. This transformation reverses the ordering of path lengths: the longest path in the original graph becomes the shortest path in the transformed graph, and viceāversa. The transformation can be performed in logarithmic space with oracle access to Reachability on the original graph, because computing the sets P_u and E_u only requires Reach queries. Therefore, a LongāPath instance (G,s,t,k) can be reduced to a Distance instance (Gā²,s,t,2Ā·|E|āÆāāÆk). Since Distance on planar directed graphs is already known to be in ULāÆā©āÆcoāUL (LemmaāÆ3), the reduction yields PDLP ā ULāÆā©āÆcoāUL.
AlgorithmāÆ2 ā Double Inductive Counting.
The second approach follows the ādouble countingā technique used for planar shortestāpath computation (TW07) but adapts it to longest paths. The input graph is first transformed into a singleāsource, singleāsink planar grid graph Gā² of size O(n²)āÆĆāÆO(n²) while preserving a oneātoāone correspondence between original edges and marked edges in the grid. A carefully designed weighting scheme assigns each horizontal edge weight nā“āÆ+āÆ(markĀ·nāø) and each vertical edge weight nā“āÆ+āÆ(markĀ·nāø)āÆ+āÆ(upĀ·col), where āmarkā indicates whether the edge corresponds to an original edge, āupā is +1 for upward edges and ā1 otherwise, and ācolā is the column index. This weighting guarantees that for any length ā, all sātoāt paths of length ā in the original graph map to paths whose total weight lies in the interval (āĀ·nāø, (ā+1)Ā·nāø). Moreover, within each interval the minimumāweight and maximumāweight paths are unique. Hence the weighted graph Gā³ is both mināunique and maxāunique.
Using this maxāunique property, the authors implement a nondeterministic counting procedure inspired by RA97. For each integer k they maintain:
- S_k = { vāÆ|āÆD(v)āÆā„āÆk }, where D(v) is the length of the longest vātoāt path,
- c_k = |S_k| (the number of vertices whose longestātoāt path is at least k),
- Ī£_k = Ī£_{vāS_k} D(v) (the sum of longestātoāt lengths for vertices not in S_k).
The algorithm guesses the total sum M = Ī£_{vāV} D(v) (which equals the sum of all longestātoāt distances) and iteratively updates c_k and Ī£_k using a subroutine āUpdateā. āUpdateā scans all vertices, checks whether D(v)āÆā„āÆkā1 and whether all outāneighbors have D <āÆkā1; if so, it decrements c_{kā1} and adds (kā1) to Ī£_k. The crucial subroutine āTestā nondeterministically guesses, for each vertex, either a witness path of length ā„āÆk (if D(v)āÆā„āÆk) or a witness of length <āÆk (if D(v) <āÆk). Because the graph is maxāunique, exactly one global choice of witnesses corresponds to the true longest paths, making the whole computation unambiguous. If the guessed M equals the true total T, the algorithm accepts; otherwise it rejects. The authors prove that the procedure runs in UL and its complement also runs in UL, establishing PDLP ā ULāÆā©āÆcoāUL.
Extension to Toroidal DAGs.
LemmaāÆ5 (ADR05) shows that Reachability on torusāembeddable graphs logāspace manyāone reduces to planar Reachability. Using the same reduction, the authors obtain CorollaryāÆ6, which states that Distance and LongāPath on toroidal DAGs are no harder than their planar counterparts. Consequently, the ULāÆā©āÆcoāUL upper bound also holds for toroidal DAGs.
Context and Related Work.
The paper situates its contributions among known results: Reachability is NLācomplete in general, but Lācomplete for undirected graphs (Rei05) and lies in ULāÆā©āÆcoāUL for planar directed graphs (BTV07). Distance shares the same planar upper bound (TW07). For seriesāparallel graphs, JT07 proved that Reach, Distance, and LongāPath are all Lācomplete. The present work can be viewed as a generalization of the seriesāparallel reduction (LemmaāÆ4) to arbitrary planar DAGs, albeit with a more involved construction.
Conclusion.
By providing two distinct logāspace unambiguous algorithms, the authors demonstrate that the LongāPath problem on planar DAGs (and toroidal DAGs) is no harder than Reachability or Distance on the same class of graphs. This places PDLP squarely in ULāÆā©āÆcoāUL, matching the best known bounds for related path problems and opening avenues for further exploration of longestāpath computation in restricted graph families.
Comments & Academic Discussion
Loading comments...
Leave a Comment