---
title: 'EPTHS: Efficient Polynomial Time Heuristic Scheme'
url: https://www.emergentmind.com/topics/efficient-polynomial-time-heuristic-scheme-epths
type: topic
---

# EPTHS: Efficient Polynomial Time Heuristic Scheme

Efficient Polynomial Time Heuristic Scheme (EPTHS) denotes, in the materials considered here, a family of algorithmic formulations that combine polynomial dependence on the main instance-size parameter with either heuristic correctness guarantees under a distribution or near-optimal approximation guarantees. The most explicit formalization appears in the context of algorithmic capture by infinite transformers, where an algorithm belongs to EPTHS of degree \(k\) if, for every \(\delta\in(0,1)\), there exists a randomized implementation \(A_\delta\) whose runtime is \(O(\eta(1/\delta)\,T^k)\) and whose output matches the target algorithm on a \(1-\delta\) fraction of instances under \(\mu_{X,T}\) [2603.11161]. In adjacent uses, the same label is attached to deterministic construction heuristics, linear-programming-based synthesis procedures, and efficient polynomial-time approximation schemes in scheduling, planar graph optimization, and weighted shortest paths [1608.01716].

## 1. Terminology and scope

Within the present corpus, EPTHS is not used in a single uniform sense. One line of work gives a formal complexity-theoretic definition for distributional tasks [2603.11161]. Other works use the label for polynomial-time heuristics without worst-case approximation ratios, such as the deterministic TSP construction heuristic of complexity \(O(n^2)\) [1608.01716]. A further cluster consists of classical approximation-scheme results whose native terminology is **PTAS** or **EPTAS**: a PTAS may run in time \(n^{g(1/\varepsilon)}\), whereas an EPTAS runs in time \(f(1/\varepsilon)\times \mathrm{poly}(n,m)\), so the exponent on \(n\) and \(m\) does not depend on \(\varepsilon\) [1202.4072].

| Context | Runtime form | Guarantee type |
|---|---|---|
| Distributional EPTHS | \(O(\eta(1/\delta)\,T^k)\) | Correct on a \(1-\delta\) fraction under \(\mu_{X,T}\) |
| EPTAS-style scheduling/graph optimization | \(f(1/\varepsilon)\cdot \mathrm{poly}(n)\) or \(O(n\log^3 n)\) | \((1+\varepsilon)\)-approximation |
| Deterministic TSP heuristic | \(O(n^2)\) | No formal worst-case approximation ratio |
| Quantum GZZ synthesis heuristic | \(O(n^{j+1})\) for fixed \(j\) | \(\|M\|_\infty \le T_{\mathrm{heur}} \le \|M\|_1\) |
| T-count heuristic | \(\mathrm{poly}(m,N)\) under a conjecture | T-count-optimal under the stated assumptions |

This suggests that EPTHS functions partly as a unifying editorial label for efficient algorithmic schemes that are polynomial in the main size parameter, even when the formal guarantee ranges from exact distributional correctness to empirical near-optimality or a classical \((1+\varepsilon)\)-approximation [1202.4072].

## 2. Formal definition in algorithmic capture

The 2026 transformer study gives the clearest formal definition. A distributional task is specified by a family of efficiently-samplable distributions \(\{\mu_{X,T}\}_{T\ge 1}\) on instance spaces \(X\in\mathbb{R}^{T\times d}\), together with a deterministic oracle algorithm \(A\) whose discrete outputs have minimum separation \(\Delta>0\). A transformer is said to **capture** \(A\) at error-tolerance \(\delta\) if there exist functions \(T_0(\delta)\), \(P_0(\delta)\), and \(C(\delta)\) such that, for every \(T\ge T_0\), a two-stage protocol—initial training on \(P_0\) samples from \(\mu_{X,1},\dots,\mu_{X,T_0}\) and fine-tuning on an additional \(C\log(T/T_0)\) samples from \(\mu_{X,1},\dots,\mu_{X,T}\)—yields a predictor \(\hat f\) satisfying \(\Pr_{X\sim \mu_{X,T}}[\,|\hat f(X)-A(X)|<\Delta/3\,]\ge 1-\delta\) [2603.11161].

Against that background, EPTHS of degree \(k\) is defined as follows: for every \(\delta\in(0,1)\), there exists a randomized implementation \(A_\delta\) and a function \(\eta(1/\delta)\) such that, for all \(T\), the runtime is
\[
\mathrm{Time}(A_\delta,T,\delta)=O(\eta(1/\delta)\,T^k),
\]
and
\[
\Pr_{X\sim\mu_{X,T}}[A_\delta(X)=A(X)]\ge 1-\delta.
\]
The defining feature is therefore polynomial-in-\(T\) heuristic runtime with success measured under the task distribution rather than a worst-case approximation ratio [2603.11161].

The same paper derives upper bounds on what infinite-width transformers can capture. In the decoder-only NTK “lazy” regime, if an algorithm is captured with total sample count \(P=P_0(\delta)+C(\delta)\log(T/T_0(\delta))\), then there exists an explicit Monte-Carlo inference implementation \(f_\delta^{\rm MC}\) with runtime
\[
O\!\bigl(P\,N_{\rm MC}\,T^3\bigr),\qquad N_{\rm MC}=O\bigl(P\log(1/\delta)\bigr),
\]
which implies membership in EPTHS with degree \(3+\epsilon\) for every \(\epsilon>0\). Under a finite-width approximation assumption in the mean-field “rich” regime, a single forward pass yields \(O(T^{2+\epsilon})\), placing captured algorithms in EPTHS of degree \(2+\epsilon\) [2603.11161].

A further corollary states that if a distributional task lies outside EPTHS of degree \(3+\epsilon\) in the lazy regime, or outside degree \(2+\epsilon\) under the stated rich-regime width assumptions, then no corresponding infinite-width transformer can capture it in the sense of the definition above [2603.11161].

## 3. Approximation-scheme lineage and recurring construction motifs

A substantial part of the surrounding literature concerns **efficient polynomial-time approximation schemes** rather than heuristic schemes in the strict distributional sense. In these works, the characteristic runtime is \(f(1/\varepsilon)\cdot \mathrm{poly}(n)\), and the output is a \((1+\varepsilon)\)-approximation. Typical constructions combine rounding, structural decomposition, fixed-dimension integer programming or mixed-integer programming, and dynamic programming [1404.1059].

For scheduling on uniformly related machines with objective \(\sum_{j\in J} w_j C_j\), the scheme in "Minimum total weighted completion time: Faster approximation schemes" fixes \(0<\varepsilon<1\), rounds \(p_j,w_j,s_i,r_j\) to powers of \((1+\varepsilon)\), performs release-date shifting and density-shifting, decomposes the instance into bounded sub-instances, and solves each by a configuration-MILP. By Kannan’s algorithm, the MILP is solved in time \(g(1/\varepsilon)\cdot \mathrm{poly}(n)\), and the overall runtime is
\[
2^{O((1/\varepsilon)\log(1/\varepsilon))}\cdot \mathrm{poly}(n),
\]
with final cost at most \((1+\varepsilon)\cdot \mathrm{OPT}\) [1404.1059].

In load balancing on uniformly related machines, Epstein and Levin use a non-standard shifting technique on machine-work values. The method rounds speeds and job sizes to powers of \((1+\varepsilon)\), introduces forbidden intervals in the work scale, solves bounded-ratio subproblems by configuration enumeration and fixed-dimension integer programming, and then glues local solutions with a layered DAG dynamic program. The main guarantee is an EPTAS running in time \(f(1/\varepsilon)\times \mathrm{poly}(n,m)\) for minimizing \(\sum_i C_i^p\) when \(p>1\) and maximizing it when \(0<p<1\) [1202.4072].

For planar Steiner forest, Eisenstat, Klein, and Mathieu adopt the Klein spanner–thinning–DP–lifting skeleton. The pipeline consists of prize-collecting clustering and per-tree spanners, branchwidth reduction by thinning, bounded-branchwidth dynamic programming with “simple configurations,” and lifting of contracted edges. The resulting approximation scheme runs in \(O(n\log^3 n)\) time and achieves a \((1+\varepsilon)\)-approximation [1110.1320].

In parallel multi-stage open shops with constant \(m\) and \(k\), the EPTAS uses scaling, a big-versus-small categorization based on \(\gamma\), an LP over gap assignments for small jobs, and a rounding argument that appends only \(O(m^2k^2/\gamma)\) fractionally assigned small jobs. The total additive slack is shown to be \(O(\varepsilon C^*_{\max})\), yielding a runtime of the form \(f(1/\varepsilon,m,k)\times n^{O(1)}\) [2205.14407].

Weighted shortest paths amid weighted regions exhibit the same pattern in geometric form. The algorithm discretizes the continuous-Dijkstra wavefront into bundles of rays, traces only sibling extremals, and uses bundle splitting together with critical-angle handling under Snell’s law. The runtime is
\[
O\!\bigl(n^5 \log(n/\varepsilon)\log(\mu/\sqrt{\varepsilon})\bigr),
\]
and the path cost is at most \((1+\varepsilon)\mathrm{OPT}(s,t)\) [1501.00340].

These constructions differ substantially in machinery, but the common structure is clear: a controlled loss of precision is traded for a combinatorial state space whose dependence on \(n\) remains polynomial.

## 4. Heuristic instantiations outside classical EPTAS theory

The term EPTHS is also attached to algorithms that are explicitly heuristic. In the deterministic TSP construction method, each city \(i\) receives a priority
\[
p_i=(\bar d_i)^{\alpha}(\sigma_i)^{\beta},
\]
where \(\bar d_i\) is the mean distance from city \(i\) to all others and \(\sigma_i\) is the corresponding standard deviation. When city \(i\) is connected, each candidate neighbor \(j\neq i\) is scored by
\[
q_{ij}=(d_{ij})^{\gamma}(\bar d_j)^{\delta}(\sigma_j)^{\epsilon}.
\]
The algorithm builds a Hamiltonian cycle in two passes, first ensuring every city has at least one neighbor and then enforcing degree two while preventing subtours in the second pass. Its time complexity is \(O(n^2)\). On 25 TSPLIB instances, the reported mean error is \(7.73\%\) for EPTHS versus \(25.11\%\) for Nearest Neighbor, \(17.86\%\) for Greedy, \(8.54\%\) for Clarke–Wright, and \(14.68\%\) for Christofides. On 45 random Euclidean instances with \(n=100,316,1000\), the reported mean error is \(7.61\%\), compared with \(24.69\%\), \(17.36\%\), \(10.25\%\), and \(14.95\%\) for the same baselines [1608.01716].

In multi-qubit gate synthesis, the heuristic goal is to decompose \(M\equiv A\oslash J\) as a nonnegative combination of rank-one sign matrices \(m m^T\), minimizing the total time \(T=\sum_m \lambda_m\). The restricted dictionary \(\mathcal E_n^{[j]}\) is built from partial-Hadamard constructions and has size \(O(n^{j+1})\). A restricted LP
\[
\min_{\lambda\ge 0} 1^T\lambda \quad \text{s.t.} \quad V^{[j]}\lambda=v(M)
\]
is then solved. For fixed hierarchy level \(j\), both dictionary construction and LP size are polynomial in \(n\); the heuristic always satisfies \(\|M\|_\infty \le T_{\mathrm{heur}} \le \|M\|_1\). In the reported numerical study, the slope of \(T\) versus \(n\) is linear with \(R^2>0.99\) [2307.11160].

The T-count synthesis heuristic MIN-T-SYNTH proceeds by iterative deepening on the target depth \(m\), starting from the lower bound \(m_0=\mathrm{sde}(\#U)\). The SEARCH subroutine performs breadth-first expansion over Pauli corrections, records changes in the smallest-denominator exponent and Hamming weight, and prunes candidates using a partition-and-select rule. Under the conjecture that the number of surviving candidates remains bounded by \(\mathrm{poly}(N)\) at every depth and that pruning never discards all nodes on an optimal path, both time and space become \(\mathrm{poly}(m,N)\), and the returned circuit is T-count-optimal [2006.12440].

In classical planning, EPTHS refers to operator-count heuristics defined on compliant variables. With \(M\) the net-change matrix, \(D\) the required goal displacement, and \(Q\) a diagonal action-cost matrix, the quadratic relaxation
\[
\min \tfrac12\|Qx\|_2^2 \quad \text{s.t.} \quad Mx=D,\; x\in\mathbb{R}^n
\]
has closed-form solution
\[
x^*=Q^{-2}M^T(MQ^{-2}M^T)^{-1}D.
\]
The corresponding heuristic is \(h_2(S)=\lceil 1^TQx^*\rceil\). Pre-computation costs \(O(n^{2.3})\), and per-state evaluation costs \(O(nr+m^2)\). The same framework also supports \(\ell_1\)-LP and iteratively reweighted \(\omega\)-\(\ell_1\)-LP variants [1605.07989].

A further heuristic scheduling result appears in the hybrid \(2+2\)-EA for single-machine scheduling without precedence constraints. The algorithm mixes local mutation implementing a partial Jackson-rule move with a rare global random-shuffle mutation of probability \(\rho=n^{-(|\mathcal B|+1)}\), where \(|\mathcal B|\le 1/\varepsilon\). For fixed \(\varepsilon\), the runtime bound is
\[
T=n^{|\mathcal B|+6}+n^4=O\bigl(n^{1/\varepsilon+6}\bigr),
\]
and with probability at least \(1-\exp(-\Omega(n))\), the best stored schedule satisfies \(L(Y)\le (1+\varepsilon)L^*\) [1202.1708].

## 5. Guarantees, assumptions, and common misconceptions

A central distinction is between **formal approximation schemes** and **heuristic schemes**. The EPTAS results for weighted completion time scheduling, load balancing, planar Steiner forest, open shops, and weighted shortest path all provide explicit \((1+\varepsilon)\)-type guarantees with runtimes of the form \(f(1/\varepsilon)\cdot \mathrm{poly}(n)\) or \(O(n\log^3 n)\) [1404.1059]. By contrast, the deterministic TSP EPTHS explicitly does *not* prove a worst-case approximation ratio; the paper states that empirical deviations from optimal or Held–Karp are “on the order of 5–12\%, typically \(\approx 8\%\),” and that “No formal bound is known; this remains an open question for theoretical analysis” [1608.01716].

A second misconception is that membership in EPTHS automatically implies learnability by transformers. The transformer results show only a one-way restriction: captured algorithms must lie within low-degree EPTHS. The paper also gives counterexamples to sufficiency at the empirical level. Source–Target Shortest Path on random geometric graphs has average-case BFS cost \(O(T\log T)\), hence EPTHS degree \(1+\epsilon\), and Min-Cut/Max-Flow on the same graph family has average-case time \(O(T^2)\), hence EPTHS degree \(2+\epsilon\); nevertheless, both tasks “fail to capture” in the stated two-phase protocol [2603.11161].

A third issue concerns hidden assumptions. The T-count heuristic is polynomial in \(m\) and \(N\) only under the conjecture that pruning preserves at least one optimal path and keeps the candidate frontier polynomially bounded [2006.12440]. The operator-count heuristics rely on compliance conditions: when a goal-relevant variable is compliant, the net-change equation \(Mx=D\) exactly captures necessary accumulated change, and integer solutions yield lower bounds on optimal plan length; the closed-form \(\ell_2\) heuristic is faster but can be inadmissible when fractional values are rounded up [1605.07989].

A final terminological caution is that some records do not provide enough technical detail to support reconstruction of an EPTHS. The entry for "A Polynomial Time Algorithm for 3-SAT" [0701023] states only that the article “describes a class of efficient algorithms for 3SAT and their generalizations on SAT,” while the accompanying note says that the paper’s full content was not included and therefore definitions, algorithm, proofs, and experiments are unavailable.

## 6. Significance and open directions

EPTHS is significant because it provides a compact way to discuss a broad class of algorithms that are efficient in the main size parameter yet not necessarily exact in the strongest worst-case sense. In the complexity-theoretic formulation, it supplies a language for separating true algorithmic generalization from interpolation by requiring both controllable error and logarithmic sample adaptation across problem sizes [2603.11161]. In approximation algorithms, the same family resemblance appears through repeated use of rounding, shifting, spanners, bounded-ratio decompositions, fixed-dimension integer programming, and dynamic programming [1110.1320].

Several open directions are explicit in the source materials. For transformers, the stated open problems include tighter NTK-evaluation bounds that could reduce the exponent from \(3\) to \(2\), architectures whose inductive bias matches higher-degree EPTHS, and analyses of deeper recurrent or Augmented Transformer models [2603.11161]. For the TSP heuristic, the absence of any formal worst-case approximation ratio remains unresolved [1608.01716]. For multi-qubit GZZ synthesis, the conjecture is that any GZZ gate can be executed in time \(O(n)\), while the heuristic already exhibits a similar scaling empirically [2307.11160].

Taken together, these works show that EPTHS is best understood not as a single fixed algorithmic template but as a spectrum of efficient schemes. At one end lie rigorous \((1+\varepsilon)\)-approximation frameworks; at the other lie polynomial-time heuristics whose value is supported by empirical behavior, structural bounds, or distributional correctness guarantees. This suggests that the term is most useful when accompanied by its precise guarantee model—worst-case approximation, distributional correctness, or assumption-dependent heuristic optimality—rather than treated as a standalone complexity label.

Source: https://www.emergentmind.com/topics/efficient-polynomial-time-heuristic-scheme-epths