betaFeedback

WorksComputer Science

Sublinear-Time and Semi-Streaming Algorithms for Path Cover and TSP

Abstract

We give improved sublinear-time and semi-streaming approximation algorithms for maximum path cover, (1,2)(1,2)-TSP, and Max-TSP. For each fixed \eps>0, our distance-query algorithm estimates the optimum cost of an nn-vertex (1,2)(1,2)-TSP instance from above within factor 2-\cstar+\eps=1.413184\ldots+\eps, with high probability, in n^{2-Ω_\eps(1)} time, where \cstar=2(\sec1-\tan1). This improves the 3/2+\eps factor of direct matching estimation in this subquadratic regime~\cite{BhattacharyaKissSaranurak2023} and of the faster near-linear estimator~\cite{BehnezhadEtAl2024}. A single random vertex order defines an implicit bipartite graph whose matchings project to path covers. An alternating-permutation analysis shows that its expected maximum matching size is at least \cstar times the optimum path-cover size. On long paths, even the best of polynomially many uniform orders retains only a \cstar+o(1) fraction with high probability. In semi-streaming, we construct deterministic (5/7-\eps)-approximate unweighted path covers and (9/7+\eps+5/(7n))-approximate (1,2)(1,2)-TSP tours, improving the respective 2/3-\eps and 4/3+\eps+1/n guarantees in~\cite{AlipourFarokhnejadMoemke2025}. For nonnegative weights, we obtain 2/3-\eps for path cover and Max-TSP, improving the earlier asymptotic 7/12-\eps Max-TSP bound. These algorithms use \poly(1/\eps) passes independent of nn and O(n\log(n/\eps)\poly(1/\eps)) words. We compute two approximate matchings separated by edge deletion. A cycle-compensation lemma accounts for the weight removed when breaking their cycles. For unweighted graphs, a third approximate matching on a simple auxiliary graph with at most 2n2n vertices chooses component connections; a Tutte–Berge count proves the stronger bound.

2012 ACM Subject Classification Theory of computation →\to Streaming, sublinear and near linear time algorithms; Theory of computation →\to Approximation algorithms analysis

Keywords and phrases traveling salesman problem, path cover, matching, sublinear-time algorithms, semi-streaming algorithms, random vertex orders

Introduction

Let G=(V,E)G = (V, E) be a simple undirected graph on nn vertices. A path cover, also called a linear forest, is a collection of vertex-disjoint paths covering all vertices, with isolated vertices allowed. The maximum path cover (MPC) problem maximizes the number of selected edges; write ρ(G)\rho(G) for its optimum. In weighted MPC, each edge has a nonnegative weight, and the objective is to maximize the total selected weight, with optimum ρw(G)\rho_w(G). The problem is NP-hard even in the unweighted case [2].

Path covers also link MPC to the traveling salesman problem (TSP). In (1, 2)-TSP, one minimizes Hamiltonian-cycle cost in a complete graph with edge costs one or two. Let G1=(V,E1)G_1 = (V, E_1) be the graph formed by the cost-one edges, and let OPT12\mathrm{OPT}_{12} be the minimum tour cost of the (1, 2)-TSP instance. A cover with pp edges of G1G_1 gives a tour of cost at most 2n−p2n - p. Thus a large cover gives a short tour, while a lower estimate of its size gives an upper estimate of tour cost [6, 2]. In Max-TSP, one maximizes tour weight in a complete nonnegatively weighted graph; completing a weighted cover cannot decrease its weight.

In this paper, we study approximation algorithms for these problems in two settings: the semi-streaming model and sublinear-time computation, which restrict memory and running time, respectively.

The semi-streaming model. Edges are scanned sequentially in a fixed arbitrary order, possibly in several passes, using O(npolylog⁡n)O(n\operatorname{polylog} n) bits of memory [13]. Here polylog⁡n\operatorname{polylog} n is a fixed polynomial in log⁡n\log n. Our algorithms receive edges with their costs or weights and return explicit path covers or Hamiltonian tours. For fixed accuracy ε\varepsilon, they use O(nlog⁡n)O(n\log n) words. If each edge weight is encoded with O(polylog⁡n)O(\operatorname{polylog} n) bits, each word also uses O(polylog⁡n)O(\operatorname{polylog} n) bits, giving O(npolylog⁡n)O(n\operatorname{polylog} n) bits overall.

Sublinear-time computation. A sublinear-time algorithm accesses selected input entries through queries and uses time smaller than the input size, counting both queries and computation. Here adjacency queries test edges of an unweighted graph, and distance queries return costs in a (1, 2)-TSP instance. We seek time sublinear in the Θ(n2)\Theta(n^2) matrix entries, not necessarily in nn. The outputs are lower estimates of MPC size or upper estimates of optimum tour cost, not explicit solutions.

Notation and path-cover conversion

We assume n≥3n \ge3; MPC instances on one or two vertices are handled directly. Write m=∣E∣m = |E| and uvuv for an edge joining uu and vv. We identify Q⊆EQ \subseteq E with its spanning subgraph (V,Q)(V, Q) and write deg⁡Q(v)\deg_Q(v) for the degree of vv. For nonnegative edge weights w:E→R≥0w : E \to\mathbb{R}_{\ge0}, put w(Q)=∑e∈Qw(e)w(Q) = \sum_{e\in Q} w(e).

A matching is a set of pairwise vertex-disjoint edges; ν(G)\nu(G) and νw(G)\nu_w(G) denote its maximum size and weight. Alternating along each path partitions a path cover into two matchings. For S⊆ES \subseteq E, let G−S=(V,E∖S)G - S = (V, E \setminus S); for U⊆VU \subseteq V, let G−UG - U be the induced graph obtained by deleting the vertices in UU.

We write OPTMaxTSP\mathrm{OPT}_{\mathrm{MaxTSP}} for the maximum tour weight in Max-TSP. A path-preserving completion is a Hamiltonian cycle containing every edge of a specified path cover.

Accuracy and resources. A maximization ratio α\alpha guarantees value at least α\alpha times optimum; a minimization factor λ\lambda guarantees cost at most λ\lambda times optimum. An error-δ\delta matching call has ratio 1−δ1-\delta, where 0≤δ<10 \le\delta< 1; an exact call has δ=0\delta= 0. Ties may be broken arbitrarily. Ratio infima exclude inputs with zero optimum.

In n2−Ωε(1)n^{2-\Omega_\varepsilon(1)}, the positive exponent gap and hidden constants may depend on fixed ε>0\varepsilon> 0; no polynomial dependence on 1/ε1/\varepsilon is required. With high probability means probability at least 1−n−a01-n^{-a_0} for a fixed confidence exponent a0>0a_0>0. Logarithms are natural. We use poly for an unspecified polynomial and O~\widetilde{O} to suppress polylogarithmic factors in nn; a subscript allows dependence on the indicated fixed parameters.

Lemma 1. For the cost-one graph G1G_1 of a (1,2)(1,2)-metric, the standard conversion inequalities [6] are

2n−ρ(G1)−1≤OPT⁡12≤2n−ρ(G1),OPT⁡12≥n.(1)2n-\rho(G_1)-1\leq\operatorname{OPT}_{12}\leq2n-\rho(G_1),\qquad\operatorname{OPT}_{12}\geq n. \tag*{(1)}

If 0≤s≤ρ(G1)0\leq s\leq\rho(G_1) and s≥γρ(G1)−ηns\geq\gamma\rho(G_1)-\eta n, with 0≤γ≤10\leq\gamma\leq1 and η≥0\eta\geq0, then T^=2n−s\widehat{T}=2n-s satisfies

OPT⁡12≤T^≤(2−γ+η)OPT⁡12+γ.(2)\operatorname{OPT}_{12}\leq\widehat{T}\leq(2-\gamma+\eta)\operatorname{OPT}_{12}+\gamma. \tag*{(2)}

When ss is the size of an explicit cover, completing it gives a tour of cost at most T^\widehat{T}.

Proof. For (2), s≤ρ(G1)s\leq\rho(G_1) and (1) give T^≥2n−ρ(G1)≥OPT⁡12\widehat{T}\geq2n-\rho(G_1)\geq\operatorname{OPT}_{12}. Since ρ(G1)≥2n−OPT⁡12−1\rho(G_1)\geq2n-\operatorname{OPT}_{12}-1 and n≤OPT⁡12n\leq\operatorname{OPT}_{12},

T^≤γOPT⁡12+(2−2γ+η)n+γ≤(2−γ+η)OPT⁡12+γ.\widehat{T}\leq\gamma\operatorname{OPT}_{12}+(2-2\gamma+\eta)n+\gamma\leq(2-\gamma+\eta)\operatorname{OPT}_{12}+\gamma.

If ss is the size of an explicit cover, joining its n−sn-s paths costs at most s+2(n−s)=T^s+2(n-s)=\widehat{T}.

Our results

Sublinear-time value estimation. For every fixed ε>0\varepsilon>0, we obtain, with high probability, an upper estimate of (1,2)(1,2)-TSP cost within factor 2−c⋆+ε=1.413184…+ε2-c_{\star}+\varepsilon=1.413184\ldots+\varepsilon, where c⋆=2(sec⁡1−tan⁡1)c_{\star}=2(\sec1-\tan1), in n2−Ωε(1)n^{2-\Omega_{\varepsilon}(1)} time and queries. Table 1 compares our approximation factor and running time with the known bounds. Our factor is smaller than 3/2+ε3/2+\varepsilon, while our time bound is larger than that of the near-linear estimator.

Method and sourceFactorTime / pair-query bound
Estimator [9]13/8+ε13/8+\varepsilonO~(n3/2)\widetilde{O}(n^{3/2})
Estimator [6]3/2+ε3/2+\varepsilonO~ε(n)\widetilde{O}_{\varepsilon}(n)
Direct matching estimate [8]3/2+ε3/2+\varepsilonn2−Ωε(1)n^{2-\Omega_{\varepsilon}(1)}
This paper1.413184…+ε1.413184\ldots+\varepsilonn2−Ωε(1)n^{2-\Omega_{\varepsilon}(1)}

Table 1. Approximation factors and running times for sublinear-time (1,2)(1,2)-TSP cost estimation, for fixed accuracy.

Our estimator uses a single uniform vertex order to orient the edges, then splits each vertex into incoming and outgoing copies. Matchings in the resulting implicit bipartite graph project to path covers; each query requires at most one original query. Since ν(G)≤ρ(G)≤2ν(G)\nu(G)\leq\rho(G)\leq2\nu(G), direct additive matching estimation retains coefficient 1/21/2. Our representation raises the expected coefficient to c⋆=0.586815986…c_{\star}=0.586815986\ldots. An alternating-run analysis using André’s identity [27] proves this bound. Concentration makes one order sufficient for large nn; Algorithm 1 combines it with additive matching-value estimation [8]. On long paths, even the best of polynomially many uniform vertex orders gives a maximum matching of size at most (c⋆+o(1))(c_{\star}+o(1)) times the path length, with high probability.

Semi-streaming constructions. For 0<ε<1/30<\varepsilon<1/3, we obtain deterministic (5/7−ε)(5/7-\varepsilon)-approximations for unweighted MPC and (9/7+ε+5/(7n))(9/7+\varepsilon+5/(7n))-approximations for (1,2)(1,2)-TSP. For nonnegative weights, we obtain (2/3−ε)(2/3-\varepsilon)-approximations for weighted MPC and Max-TSP. All these algorithms use poly⁡(1/ε)\operatorname{poly}(1/\varepsilon) passes independent of nn and O(nlog⁡(n/ε)poly⁡(1/ε))O(n\log(n/\varepsilon)\operatorname{poly}(1/\varepsilon)) words. Table 2 shows the improved guarantees within the same pass regime [2].

Our idea is to delete the edges of a first matching rather than contract them as in [2]. Algorithm 2 computes a matching AA in GG and a matching BB in G−AG-A, keeping all vertices. A cycle-compensation lemma relates the weight lost when opening cycles of A∪BA\cup B to the residual matching optimum, yielding the weighted bound for approximate calls. For unweighted MPC, Algorithm 3 chooses component connections with a third matching before opening cycles. A Tutte–Berge count bounds the missed path-cover edges. A simple auxiliary graph on at most 2n2n vertices implements this optimization without storing all component adjacencies, and its matching guarantee transfers to the entire output forest.

ProblemComparison and sourceThis paper
Unweighted MPC2/3−ε2/3-\varepsilon [2]5/7−ε5/7-\varepsilon
(1, 2)-TSP4/3+ε+1/n4/3+\varepsilon+1/n [2]9/7+ε+5/(7n)9/7+\varepsilon+5/(7n)
Max-TSP(7/12−3/(4n))(1−ε)(7/12-3/(4n))(1-\varepsilon) [2]2/3−ε2/3-\varepsilon
Weighted MPC1/2−ε1/2-\varepsilon via matching [17]2/3−ε2/3-\varepsilon

Table 2. Semi-streaming constructions in poly⁡(1/ε)\operatorname{poly}(1/\varepsilon) passes independent of nn.

We also answer the iteration question in [2] for exact matching calls. Three unstructured residual matchings have retained-edge path-cover infimum 2/32/3; our structured third call avoids this obstruction. Appendix D gives stronger unweighted guarantees with log nn-dependent passes and subquadratic postprocessing when a starting 2-matching is supplied explicitly.

Further related work. Matching pairs and successive selection are classical [9, 12]. The offline weighted factor 2/32/3 is also known through a degree-two relaxation followed by cycle breaking [21]. Offline unweighted guarantees include 3/43/4 through triangle-free 2-matching and 6/76/7 [22, 7], but these do not imply our access bounds. TSP under both streaming and distance-query access is also studied in [10].

The time budget is essential to the sublinear comparison. Beating 3/23/2 in n1+o(1)n^{1+o(1)} time would settle a near-linear bipartite-matching promise problem [6]; our larger time budget does not resolve it. Some fixed (1+ε0)(1+\varepsilon_0) TSP approximation requires Ω(n2)\Omega(n^2) queries [9]. For additive matching estimation, every exponent gap ζ>0\zeta>0 admits an accuracy requiring Ω(n2−ζ)\Omega(n^{2-\zeta}) queries in the adjacency-list [5] and pair-query [4] models.

Organization of the paper. § 2 gives sublinear-time path-cover and TSP estimates. § 3 and § 4 analyze the weighted and unweighted constructions; § 5 gives their semi-streaming implementations. § 6 presents algorithmic limits and open questions. Appendix § 7 proves the residual-matching obstruction, and Appendix § 8 gives a short proof of the unweighted two-round guarantee and proves the contraction limits. Appendix § 9 collects the conditional weighted comparison, compatible attachments, the one-call alternative, and hardness. Appendix § 10 gives the general component bound, stronger input-size-dependent pass guarantees, and estimation with a supplied 2-matching. Appendix § 11 gives the lower-pass greedy algorithm and its upper family. Appendix § 12 derives an explicit subquadratic exponent.

Sublinear-time path-cover and TSP estimation

We estimate path-cover size from adjacency-matrix (pair) queries, using a bipartite graph determined by a randomly sampled vertex order.

Random-order bipartite representation

References

  1. [1]Kook Jin Ahn and Sudipto Guha. Near linear time approximation schemes for uncapacitated and capacitated b-matching problems in nonbipartite graphs. arXiv:1307.4355v4, 2018. Full version of SODA 2014, pp. 239–258. URL: https://arxiv.org/abs/1307.4355v4.
  2. [2]Sharareh Alipour, Ermiya Farokhnejad, and Tobias Mö​nke. Improved approximation algorithms for (1, 2)-TSP and Max-TSP using path covers in the semi-streaming model. In STACS 2025, volume 327 of LIPIcs, pages 9:1–9:17, 2025. doi:10.4230/LIPIcs.STACS.2025.9.
  3. [3]Sephe​r Assadi. A simple (1 − ε)-approximation semi-streaming algorithm for maximum (weighted) matching. TheoretiCS, 4:16:1–16:25, 2025.
  4. [4]Amir Azarmehr, Soheil Behnezhad, Mohammad Roghani, and Aviad Rubinstein. Tight pair query lower bounds for matching and earth mover’s distance. In FOCS 2025, pages 2666–2693, 2025. Full version: arXiv:2510.16351v1. URL: https://arxiv.org/abs/2510.16351v1, doi:10.109/FOCS63196.2025.00138.
  5. [5]Soheil Behnezhad, Mohammad Roghani, and Aviad Rubinstein. Approximating maximum matching requires almost quadratic time. arXiv:2406.08595v1, 2024. STOC 2024. URL: https://arxiv.org/abs/2406.08595v1.
  6. [6]Soheil Behnezhad, Mohammad Roghani, Aviad Rubinstein, and Amin Saberi. Sublinear algorithms for TSP via path covers. In ICALP 2024, volume 297 of LIPIcs, pages 19:1–19:16, 2024. Full version: arXiv:2301.05350v2. URL: https://arxiv.org/abs/2301.05350v2, doi:10.4230/LIPIcs.ICALP.2024.19.
  7. [7]Piotr Berman and Marek Karpinski. 8/7-approximation algorithm for (1, 2)-TSP. In SODA 2006, pages 641–648, 2006. doi:10.1145/1109557.1109627.DOI
  8. [8]Sayan Bhattacharya, Peter Kiss, and Thatchaphol Saranurak. Dynamic (1 + ε)-approximate matching size in truly sublinear update time. In FOCS 2023, pages 1563–1588, 2023. Full version: arXiv:2302.05030v3 (2024). URL: https://arxiv.org/abs/2302.05030v3.
  9. [9]Yu Chen, Sampath Kannan, and Sanjeev Khanna. Sublinear algorithms and lower bounds for metric TSP cost estimation. In ICALP 2020, volume 168 of LIPIcs, pages 30:1–30:19, 2020. doi:10.4230/LIPIcs.ICALP.2020.30.DOI
  10. [10]Yu Chen, Sanjeev Khanna, and Zihan Tan. Sublinear algorithms and lower bounds for estimating MST and TSP cost in general metrics. In ICALP 2023, volume 261 of LIPIcs, pages 37:1–37:16, 2023. doi:10.4230/LIPIcs.ICALP.2023.37.DOI
  11. [11]Jack Edmonds. Maximum matching and a polyhedron with 0, 1-vertices. J. Res. Natl. Bur. Stand. B, 69B:125–130, 1965.
  12. [12]Uriel Feige, Eran Ofek, and Udi Wieder. Approximating maximum edge coloring in multigraphs. In APPROX 2002, volume 2462 of LNCS, pages 108–121, 2002. doi:10.1007/3-540-45753-4_11.DOI
  13. [13]Joan Feigenbaum, Sampath Kannan, Andrew McGregor, Siddharth Suri, and Jian Zhang. On graph problems in a semi-streaming model. Theoretical Computer Science, 348(2–3):207–216, 2005.
  14. [14]Manuela Fischer, Slobodan Mitrović, and Jara Uitto. Deterministic (1 + ε)-approximate maximum matching with poly(1/ε) passes in the semi-streaming model and beyond. In STOC 2022, pages 248–260, 2022. doi:10.1145/3519935.3520039.DOI
  15. [15]Marshall L. Fisher, George L. Nemhauser, and Laurence A. Wolsey. An analysis of approximations for finding a maximum weight Hamiltonian circuit. Operations Research, 27(4):799–809, 1979. doi:10.1287/opre.27.4.799.DOI
  16. [16]Manoj Gupta and Richard Peng. Fully dynamic (1 + ε)-approximate matchings. In FOCS 2013, pages 548–557, 2013.arxiv.org/abs/1304.0378
  17. [17]Shang-En Huang and Hsin-Hao Su. (1 − ε)-approximate maximum weighted matching in distributed, parallel, and semi-streaming settings. arXiv:2212.14425v2, 2023. URL: https://arxiv.org/abs/2212.14425v2.
  18. [18]Taisuke Izumi, Naoki Kitamura, and Yutaro Yamaguchi. Forgetting alternation and blossoms: A new framework for fast matching augmentation and its applications to sequential/distributed/streaming computation. arXiv:2511.08210v1, 2025. Preprint. URL: https://arxiv.org/abs/2511.08210v1.
  19. [19]Colin McDiarmid. On the method of bounded differences. In J. Siemons, editor, Surveys in Combinatorics, 1989, volume 141 of London Mathematical Society Lecture Note Series, pages 148–188. Cambridge University Press, 1989. doi:10.1017/CBO9781107359949.008.DOI
  20. [20]Slobodan Mitrović, Anish Mukherjee, Piotr Sankowski, and Wen-Horng Sheu. Faster semi-streaming matchings via alternating trees. In ICALP 2025, volume 334 of LIPIcs, pages 119:1–119:19, 2025. doi:10.4230/LIPIcs.ICALP.2025.119.DOI
  21. [21]Shlomo Moran, Ian Newman, and Yaron Wolfstahl. Approximation algorithms for covering a graph by vertex-disjoint paths of maximum total weight. Networks, 20(1):55–64, 1990. doi:10.1002/net.3230200106.DOI
  22. [22]Katarzyna Paluch. Triangle-free 2-matchings. arXiv:2311.13590v9, 2025. URL: https://arxiv.org/abs/2311.13590v9.
  23. [23]Christos H. Papadimitriou and Mihalis Yannakakis. The traveling salesman problem with distances one and two. Mathematics of Operations Research, 18(1):1–11, 1993. doi:10.1287/moor.18.1.1.DOI
  24. [24]Zishen Qu and Douglas B. West. Another proof of the generalized Tutte–Berge formula for f-bounded subgraphs. arXiv:2307.01324v1, 2023. URL: https://arxiv.org/abs/2307.01324v1.
  25. [25]Richard Rado. A theorem on independence relations. The Quarterly Journal of Mathematics, os-13(1):83–89, 1942. doi:10.1093/qmath/os-13.1.83.DOI
  26. [26]Alexander Schrijver. Combinatorial Optimization: Polyhedra and Efficiency. Springer, 2003.
  27. [27]Richard P. Stanley. A survey of alternating permutations. arXiv:0912.4240v1, 2009. URL: https://arxiv.org/abs/0912.4240v1.

Paper details

vlnc:W_t6hv2b5a
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents