Manuscript Offprint
arXiv:2610.05385On the Computational Complexity of Problems: Formalizing Sensitivity to Uncertainty and Parametric Complexity Classes
Abstract
Is the classical question the right one for understanding the complexity of real-world computation? Traditional worst-case analysis characterizes complexity solely as a function of input size . Yet tasks whose cost is exponential in general often run in polynomial or even linear time once specific structural constraints or partial inputs are known. For instance, the Partition Problem is solvable in linear time, a constant-time core step following linear-time verification, when its inputs satisfy a simple structural property, although no polynomial-time algorithm is known for it in general; Integer Factorization, by contrast, resists structural knowledge: no checkable property of the input is known to improve on the sub-exponential number-field-sieve bound. Classical worst-case analysis cannot explain this difference, because it collapses a whole spectrum of difficulty into a single pessimistic bound. This paper formally develops a comprehensive parametric and uncertainty-aware framework for computational complexity. We introduce the notion of Sensitivity to Uncertainty (SU) and formalize the cost variation under a given input property ; we define the uncertainty-vanishing metric and prove a fundamental Uncertainty Reduction Theorem bridging cost variation and input uncertainty; and we introduce the parametric classes and as a more practical, instance-level foundation, focused on certifiable structure, rather than distributional typicality, that resolves the gap between theoretical complexity and real-world tractability. We further show how the same uncertainty analysis supports practice: it enables deterministic Service-Level Agreements via Design-by-Contract (where the service-level guarantee explicitly accounts for the property-dependent verification cost) informs tool-use and reasoning splits in agentic AI, and provides an explanation of when quantum computers achieve exponential speedup.
Keywords: Computational Complexity, Sensitivity to Uncertainty, Partition Problem, Parametric Complexity Classes, Information Entropy, Kolmogorov Complexity.
1 Introduction
The central question in theoretical computer science is the P vs. NP problem, which asks whether every problem whose solution can be quickly verified can also be quickly solved [18]. While this question is of immense theoretical importance and represents one of the seven Millennium Prize Problems, its classical formulation possesses distinct practical limitations. In the real world, the fact that a problem belongs to the NP-complete class often discourages practitioners and software engineers from developing applications that rely on solving it. However, this pessimistic worst-case characterization is frequently a poor representation of practical difficulty. Many computationally hard tasks exhibit highly tractable behavior in practice because real-world problem instances are rarely random, unstructured, or worst-case; instead, they satisfy specific structural properties, symmetries, or constraints that drastically reduce computational complexity.
To address this gap, this paper elaborates on the usefulness of the P vs. NP question and proposes an alternative, more refined method for measuring and analyzing computational complexity. By focusing on the sensitivity of computational tasks to input uncertainty, we categorize problems into parametric complexity classes and where K denotes a property). We show that when extra knowledge (which lessens uncertainty) is available and exploited, the computational complexity of solving hard problems can be dramatically reduced, often collapsing from exponential to polynomial or even linear time (a constant-time core step following verification). Consequently, the practical impact of answering the classical question is reduced, as instance-specific tractability is governed by structural knowledge rather than worst-case limits.
Essentially, the introduced parametric classes and can be seen as a more practical, instance-level foundation that resolves the gap between theoretical complexity and real-world tractability. At this point one might ask how this relates to average-case complexity [11,31], which measures the expected cost over a distribution of inputs. The two analyses formalize different questions: average-case complexity asks whether the typical instance is easy; the present framework asks whether there is a checkable structural property such that every instance satisfying is easy. The former is about typicality, the latter about certifiability, and neither subsumes the other: average-case ease does not yield a guard that certifies the current instance, while the fact that a problem is polynomial if the input satisfies property (i.e. if ) subsumes average-case tractability for every distribution concentrated on . The precise relation is analyzed later (in §8).
The remainder of this paper is organized as follows. Section 2 describes the role of uncertainty and unknownness in computational complexity through a simple game-theoretic example, drawing a parallel to the classic Two Envelopes Paradox. Section 3 formally introduces the notion of Sensitivity to Uncertainty (SU) and defines Not Sensitive to Uncertainty (NSU) problems, and it uses a case study of the Partition Problem, demonstrating how various levels of structural knowledge collapse its complexity. Section 4 describes a formal method for measuring sensitivity to uncertainty, introducing the metric and linking it to Kolmogorov complexity. Section 5 states and proves the fundamental Uncertainty Reduction Theorem. Section 6 introduces the parametric complexity classes and along with the Uncertainty Sensitivity Index (USI). Section 7 describes various NP problems according to their sensitivity to uncertainty. Section 8 discusses originality and value and discusses additional problems (satisfiability, vertex cover and TSP). Section 9 discusses applications in software engineering, Agentic AI, as well as in quantum computing. Finally, Section 10 concludes the paper.
“Tonia, in each of my hands I have a monetary coin. The value of one hand is double the value of the other. Which hand do you select?”
Tonia selects Yannis's left hand. Yannis opens his palm and Tonia sees that there is exactly 1 Euro in that hand. Yannis then poses the following subsequent question:
“Would you like to take this Euro, or would you like to take whatever my right hand has?”
Tonia performs an initial probabilistic reflection: if the left hand contains 1 Euro (let this be ), the right hand must contain either 0.5 Euro () or 2 Euros (). Assuming an equal probability of 0.5 for each scenario, she computes her expected gain if she switches to the right hand, as Expected Gain = Euros. This expected value is strictly greater than 1 Euro, suggesting that she should change hands. However, on second thought, Tonia realizes this reasoning is fallacious: there is no rational reason to select one hand and then switch to the other in a symmetric state, as she could repeat this switching reasoning infinitely. This is a manifestation of the classic Two Envelopes Paradox [12].
Her initial reflection was wrong because it mixed up the notion of structural uncertainty or unknownness with probability. The values in Yannis's hands are already fixed and certain; they are not random variables drawn from a known probability distribution. The actual sample space is either or . The uncertainty lies in which sample space Yannis chose, which is a structural unknown, not a probability distribution.
An analogous phenomenon occurs when we pose the classical question. By posing this question, we mix up the notion of structural uncertainty (regarding the exact structure of the input, which forces us to compute best, average, and worst-case complexity) with the notion of a problem and problem length. The notions of best, average, and worst-case complexity rely on our uncertainty about the input, whereas the definition of the problem and the input length are certain and well-defined. By isolating and parameterizing this structural uncertainty, we can analyze algorithms more realistically, moving beyond pessimistic worst-case bounds.
3 Computational Tasks and Sensitivity to Uncertainty
We shall now formalize how the cost of solving a problem varies under the same problem size. We shall define the Sensitivity to Uncertainty (SU) as a measure of how much the computational cost of carrying out a task varies across different instances of the same size.
Let be a computational problem, and let be the set of all valid input instances of size . Let denote the number of steps (or computational resources) required by an optimal algorithm to solve on instance . Specifically, the cost is defined as the minimum (infimum) execution time, over all correct uniform algorithms for , on the specific instance , i.e.
Cost(P, x) = inf{T_A(x) : A is a uniform algorithm solving P on all inputs of all sizes}. (1)
This is the standard per-instance (instance-optimal) reading: it is not the running time of any single algorithm that is best on all inputs, but the time of the best uniform algorithm evaluated on this particular input. Without such a definition, no meaningful maximum or variation can be stated, since a fixed algorithm can be made arbitrarily slow on selected inputs by inserting gratuitous steps.
Definition 1. We formally define the unrestricted cost variation as the difference between the worst-case and best-case cost for instances of size n:
A few important clarifications follow:
• On Min. Given the definition of cost (1), the minimum over instances is at least (up to a constant factor): an algorithm should at least read the input. Hence , and the whole content of the variation resides in the maximum term.
• On Max. As the uniformity constraint in the 1 requires, a single algorithm must decide all inputs of all sizes without being re-described for each instance. A lookup table indexed by would answer each query in unit time. This is not admissible in the standard model for two reasons. First, the lookup table has size (for binary inputs), so its construction requires exponential preprocessing and exponential space; such a table is not a uniform algorithm for the problem, but a non-uniform family indexed by . Second, in the uniform model an algorithm must be a single device deciding all inputs of all sizes; table lookup can therefore only cover a finite set of instances, whose size is absorbed by the term and does not affect asymptotics. Consequently the maximum in Def. 1 is genuinely the worst-case time of a uniform algorithm, and it cannot be trivialized by memorization, meaning that remains the classical worst-case complexity of (e.g. for SUM, for a hard problem).
• On Min and Max. The algorithm minimizing the worst case need not be the one minimizing the best case; the two extrema may be realized by different procedures. This causes no difficulty for our definitions, since is a statement about the extremal instances of a single optimal procedure, the standard convention in complexity theory, rather than about two different algorithms.
Using this definition, we can categorize problems into two fundamental classes based on their sensitivity:
Definition 2 (Not Sensitive to Uncertainty - NSU). A computational problem P is Not Sensitive to Uncertainty (NSU) if for every positive integer n. In other words, the cost of solving P is entirely determined by the input size n and is invariant to the input's values or structure within the unrestricted class .
To grasp the idea, let's start from a trivial task.
Lemma 1. The problem of summing n integers (SUM) is Not Sensitive to Uncertainty (NSU).
Proof. To sum integers, any deterministic algorithm must read all integers from the input tape and perform exactly addition operations. The total computational cost is Cost(SUM, for some hardware-specific constant , regardless of the actual values of the integers. Thus, we have: This implies that: for all . Therefore, the SUM problem is NSU.
Conversely, many hard problems are highly sensitive to uncertainty. Their worst-case complexity is exponential (under our current understanding), while their best-case complexity (on highly structured inputs) can be linear or even constant. This variation represents a spectrum of difficulty that classical theory fails to capture.
3.1 Case Study: The Partition Problem
The Partition Problem is a classic NP-complete problem [37] stated as follows:
Problem 1 (Partition Problem). We have a finite multiset (bag) of positive integers . Is there any subset such that:
In the general case (where we have no extra knowledge about the input), solving the partition problem is NP-complete. It requires time via exhaustive search, or time via dynamic programming, where . Note that the dynamic programming solution is pseudo-polynomial, meaning it becomes extremely expensive when the integers are large. In general, although there are several algorithms for the partition problem with time complexity less than , e.g. [26,27,42], all these are exponential, and for reasons of simplicity (and without loss of generality), hereafter we will assume that the time complexity of the Partition problem is in .
However, if we possess extra knowledge about the input, expressed as a property or condition K that the input satisfies, the computational cost can collapse. Below we analyze five specific cases based on different levels of prior knowledge, demonstrating how a “KNOWING” clause (K-clause) reduces complexity:
-
Case 1: Two Integers . If we know a priori that the multiset contains exactly two integers, the problem can be solved with a single comparison operator: check if . If true, return True; else return False. Therefore Cost = . The cost to verify the K-clause itself requires scanning the list once to verify its size, which takes time.
-
Case 2: Same Integers for all . If we know that all elements in the multiset are identical, we only need to check if the number of elements is even: . If true, we can partition them into two groups of equal size; else, an equal partition is impossible. Therefore, Cost = . Again, the verification of the K-clause (that all elements are equal to some ) requires time to scan and compare elements.
-
Case 3: Arithmetic Sequence for all . If we know that the elements are the first consecutive integers , we can determine if a partition exists in constant time. The sum of the first integers is . A partition is possible if and only if is even, which occurs if and only if: or . Thus, we can solve the problem with a simple modulo operation, i.e. Cost = . Verifying the K-clause (that is indeed ) requires sorting which takes time, or by just scanning the array which takes time.
-
Case 4: Equal Elements modulo 3 ( and ). If we know that all elements are identical ( ) and their total count is a multiple of 3, then for some integer . The sum of elements is . A partition into two equal halves requires each half to sum to . Since , this would require selecting elements. If is odd, is not an integer, meaning we would need to split a physical element, which is impossible. Thus, if is odd (i.e., is an odd multiple of 3), we can immediately return False in constant time, therefore Cost = .
-
Case 5: No Knowledge . This corresponds to the general case where we have no prior structural knowledge. The worst-case complexity remains exponential, i.e. .
In summary, the availability of structural knowledge allows us to solve specific instances of an NP-complete problem in constant time , which is entirely independent of n. Crucially, verifying whether the input satisfies the property K (the cost of the K-clause verification) typically takes time. Therefore, if the K-clause is verified, the total cost of solving the instance is , bypassing the exponential worst-case bottleneck. For all five properties above, the verification cost is a single linear scan, , so the total cost is . This is not a universal law, however: other structural predicates may be costlier to verify. For instance, the Monge property of a distance matrix, requires checking cell inequalities even though the resulting solver runs in (the Monge-TSP instance class is revisited later in the paper).
4 Measuring Sensitivity to Uncertainty
To formalize how extra knowledge reduces complexity, we define the cost variation given a property K. Let K denote a property satisfied by the problem instance.
Definition 3. We write to denote the variation of cost for solving P for a problem instance of size n if we know a priori that the input satisfies property K:
We denote the absence of knowledge by , so that is the unrestricted cost variation defined in Section 3. For the Partition problem, we can express the variation of cost under different properties as:
•
•
•
•
With the per-instance definition (1), the maximum in is the worst-case complexity of over the class :
Note that for this is precisely the classical worst-case complexity, so the framework subsumes the standard analysis as the special case . The novelty is the dependence of this maximum on : as structural knowledge increases, collapses from the exponential worst case (Partition: ) to polynomial or linear time. The maximum is thus the primary measure of resistance of a problem to structural knowledge: a problem with small for a simple is knowledge-vulnerable (easy), while one whose maximum stays high for every (e.g. Integer Factorization) is knowledge-resistant . This is exactly the axis that the classical, -free analysis cannot see, and it is the content of the maximum term.
4.1 Characterizing Input Uncertainty: The Metric
We introduce a metric to quantify the amount of unknown information remaining in the input once property is known. Let the input be represented on a Turing machine tape of size . We define as the minimum number of cells we need to read in order to completely understand the contents of the entire tape (i.e., to eliminate all uncertainty and reconstruct the input instance ), i.e.:
Let us evaluate for the Partition cases analyzed previously:
• . We only need to read 2 cells to know the full input.
-
. We only need to read 1 cell to know the value ; all other cells are known to be equal to .
-
. We need to read 0 cells because the input is completely determined by the arithmetic sequence property.
• . In the absence of knowledge, we must read all n cells to understand the input.
In particular, for Integer Factorization there is no efficiently checkable property K that yields a net certified collapse, because the properties that isolate easy instances are themselves as costly to verify as solving the instance.
Note that the definition of is existential: it asserts the existence of a determining set Q of minimum cardinality, but it does not guarantee that an algorithm can locate such a set efficiently. In general, discovering which cells form a determining set is itself a computational problem with a non-trivial cost, which we formalize as the find cost.
Definition 4 (Find cost). For a property and an input size , the find cost is the minimum, over all correct procedures , of the worst-case time (over instances of size ) that needs to output a determining set , i.e. a set of minimum cardinality such that , together with the cell values , uniquely determines :
where is the running time of A on instance x until it returns a determining set. When Q can be determined immediately from the property itself, e.g. for any two cells suffice, for “all equal” any single cell suffices, for no cell is needed, we say that Q is visible and .
Example 1 (A non-visible determining set). To see that is not always , consider the property : the input is the matrix of all pairwise distances of a weighted tree on vertices, without any disclosure of which pair of vertices each distance corresponds to. Let denote the number of matrix cells, i.e. the input size. A determining set consists of the distances that are the edge costs of ; hence . Finding which among the distances are the edge costs is exactly the tree-reconstruction problem, which requires polynomial time (between and via the four-point condition or neighbor-joining [13].
4.1.1 Variants of
Let's now define , the constructive counterpart of the existential .
Definition 5 (Accessible uncertainty).
.
It is not hard to see that and diverge in general, in particular it holds: .
The prefix variant . Now suppose we require the determining set to be a prefix of the tape, i.e. for some . Then the uncertainty-vanishing metric becomes:
Obviously it holds , and reaching the lower bound exactly characterizes when the minimal residual information happens to sit at the beginning of the tape. This variant is syntactic and operational. The gain is that is known a priori, hence always and the Extraction stage needs only a sequential tape (no RAM-TM).
4.2 Connection to Information Theory
The metric is directly related to conditional Kolmogorov complexity [32, 33] and Shannon entropy [43]. Specifically, the remaining uncertainty of an input string of size given property is exactly the conditional Kolmogorov complexity , which is bounded:
The conditional Kolmogorov complexity of a string given an auxiliary description (or structural property) is defined as the length of the shortest binary program that, when executed on a reference universal Turing machine with provided as an auxiliary input, outputs . Formally, . In our framework, this measures the absolute minimum computational information required to completely specify the input instance once the structural constraints guaranteed by are already known and utilized.
Lemma 2 (Compression Bound). Let x be an input string of size n satisfying a property K, and assume the active set Q is canonical, i.e. uniquely determined by K and n (no per-instance choice of which cells to read). Then the remaining uncertainty of x given K is bounded by its uncertainty-vanishing metric, i.e.,
where is the tape alphabet.
Proof. By definition of , there exists a set of positions with such that the property , together with the cell values , uniquely determines the entire input . Because is supplied as the auxiliary input, it fixes both the structural constraint and the reconstruction rule that completes the remaining cells.
Consider the program that, given as auxiliary input, performs the following three steps: (1) reads the values on the active cells, (2) applies the fixed reconstruction procedure determined by to fill in the remaining cells, and (3) outputs the resulting string . Each active cell holds a symbol of the alphabet , hence it can be encoded in bits. The program therefore needs only to carry the active data, of length bits, together with a constant-size skeleton (the reconstruction step and the addressing of are already determined by ). Consequently, , and since is the minimum length over all such programs, the claimed bound follows.
This represents the compressed size of the input under the structural constraint K. In this light, a structural property K acts as a lossless compression algorithm, reducing the entropy of the input space.
Remark 1. The overhead in Lemma 2 relies on the active set Q being canonical, i.e. fixed by K and n. In full generality, if Q may depend on the instance, specifying it costs an additional bits (because the decoder needs to be told which subset was used, and there are candidates), yielding . Note that this quantifier issue is the information-theoretic counterpart of the find cost of Section 4.1: the additional bits are what it costs to describe which subset Q was used, whereas is what it costs to compute it.
5 The Fundamental Uncertainty Reduction Theorem
We now establish a formal, mathematical relationship between (a) the cost variation , and (b) the uncertainty-vanishing metric .
Theorem 1 (Uncertainty Reduction (Constructive Form)). Let be a computational problem and an input property. If there exists an algorithm that, on any input of size , (i) verifies in time , (ii) locates a determining set in time , (iii) reads the active cells, and (iv) solves the reduced instance in time, then the cost variation under is bounded by
Proof. Let be an instance of size satisfying . By definition of there exists a determining set of size ; but the algorithm does not know a priori, it must find it. The algorithm solves on in four sequential stages:
-
Verification: verify that , costing steps;
-
Locating: compute a determining set Q, costing steps;
-
Reading: read the active cells of Q, costing cell accesses (unit cost on a random-access machine);
-
Execution: solve the reduced problem of size on the projection ( is the projection of onto the active cells ), costing at most in variation.
Hence for every instance ,
This holds because an algorithm that has verified , located and read only the cells of possesses all the information needed to decide on ; it never needs to process the remaining cells: the pair determines uniquely, so the solver's answer is a function of the -bit string alone (with and as fixed parameters). The solver's cost is therefore bounded by the worst-case cost of on instances of size , i.e. by .
The terms , and depend only on K and n, not on the particular instance x, so they cancel in the variation:
up to the constant-factor overheads of the four-stage decomposition, which we absorb in the notation of (3). This completes the proof.
The variant .
Remark 2 (Reconstruction vs. task resolution). The metric measures the minimum number of cells needed to reconstruct the full input given K. The Uncertainty Reduction Theorem uses this as an upper bound on the information the solver requires: one can always reconstruct the input from the determining cells and then solve P on the reconstruction. However, the solver for P need not distinguish between inputs that yield the same answer. For example, under , (one cell suffices to determine the common value), yet solving Partition requires only the sum , and in fact, for the decision version, only the parity of n once v is known. Many distinct inputs (e.g. and ) produce the same answer, and the algorithm need not distinguish them. We can therefore define the task-relative variant:
that captures this refinement, and obviously it holds: . Note that the bound of theorem 1 remains valid (and often tight in practice), but it should be read as an upper bound on the information the solver consumes, not as a lower bound on the work required to solve P.
Let us now provide some refinements about the kinds of uncertainty.
Definition 6 (Kinds of Uncertainty). We distinguish three notions of “remaining unknowns.”
-
The reconstruction metric counts the minimum number of cells whose values, together with K, determine the entire input ( ).
-
The task-relative metric (Remark 2) counts the minimum number of cells whose values suffice to decide P.
-
The active dimension is the number of degrees of freedom the core solver branches over once is exploited, i.e. the parameter in an FPT-style bound .
Note that is a property of the solver, not of the input, and is distinct from the active cells (the determining cells read during extraction). Two regimes occur. In the projection regime (Partition under , the padding) the solver operates on the -cell projection, so . In the search-interface regime (bounded-treewidth Vertex Cover, strong backdoors, that we shall see later in §8.3) the solver reads all cells ( ) yet branches only over a structural parameter, the treewidth or the backdoor size , so (resp. ), independent of .
Meaning. Theorem 1 mathematically demonstrates that the variation of computational cost under partial knowledge is strictly bounded by the worst-case variation of the same problem scaled down to the active uncertainty size , plus the verification and find costs. If is constant (as in the Partition cases), collapses to , which is polynomial whenever both overheads are polynomial — making the problem practically tractable.
Verification Cost. It should be stressed that is a first-class cost of the framework, and is not bounded by in general: it depends on the specific structural predicate . For all properties that shall be used in the case studies of this paper (equality, arithmetic sequence, 2-CNF, Horn, tree, and bipartiteness) verification is a single linear scan, i.e. (or for graph properties). However, for the Monge property of a matrix, which is one of the structural predicates studied later in this paper, verifying the condition on a distance matrix requires cell comparisons. In all cases the total complexity is , and the Uncertainty Reduction Theorem bounds the solver phase by . For the properties studied in this paper, the verification scan simultaneously locates , so is absorbed into ; the two are distinct only when locating the determining set requires work beyond checking (e.g. the tree-metric case, where one must identify which leaf is the root).
Finding Cost. A second first-class cost is the find cost of Definition 4. For all structural properties what shall be used in the case studies of this paper (equality, arithmetic sequence, 2-CNF, Horn, tree, bipartiteness, bounded degree, planarity) the determining set is visible, hence and the clean bound of Theorem 1 applies verbatim. By contrast, for the tree-metric property of Example 1, is polynomial , and for arbitrary properties it can be as hard as NP (it generalizes minimum distinguishing set problems). The constructive form of the theorem explicitly separates so that no hidden cost is swept under the existential definition of .
Difference with Classical Complexity Theory. Bounding by might suggest that merely measures the cost beyond the linear reading overhead, and is therefore “essentially the same” as the classical cost. This is incorrect: the quantity that is subtracted is not constant across the framework. Without structural knowledge, the reading overhead is itself: , so the variation is the cost beyond . Once a property holds, the reading overhead shrinks to , and the variation becomes . What varies is therefore the difference , i.e. the amount by which structural knowledge reduces the input that must be read. Classical complexity theory possesses only the single input parameter and cannot express this; the pair encodes information genuinely absent from the classical cost. The framework is thus not “cost minus a constant” but cost re-expressed with respect to an information-dependent input scale, and the shift is exactly the new content of the theory.
6 Parametric Complexity Classes: and
To formalize these concepts into structural complexity theory, we introduce new complexity classes that depend on input properties.
Definition 7. Uncertainty-Parametric P - . A language belongs to the class if there exists a deterministic Turing machine M, a polynomial , and an input property K such that for any string x of length n satisfying K, M decides whether in time , and the property K itself can be verified in polynomial time.
Definition 8. Uncertainty-Parametric NP - . A language belongs to the class if there exists a non-deterministic Turing machine M, and a polynomial such that for any string x of length n satisfying K, M decides whether in time .
By defining these classes, we can characterize an NP-complete problem like Partition as belonging to and . Thus, a problem’s hardness is no longer a binary label (P vs. NP), but a spectrum parameterized by the available structural knowledge K.
We can now define the Uncertainty Sensitivity Index (USI).
Definition 9. The Uncertainty Sensitivity Index (USI) of a problem P with respect to a class of properties K is defined as:
This index represents the minimum quantity of structural information that must be extracted from the input to reduce the worst-case complexity to polynomial time. If is small, the problem is highly vulnerable to uncertainty reduction and is practically easy.
7 NP Problems Sensitive and Insensitive to Uncertainty
7.1 Problems Sensitive to Uncertainty
Several fundamental computational problems in different domains exhibit high Sensitivity to Uncertainty (SU). Within our formalized framework, these problems are characterized by a massive gap between their general cost variation ( ) and their conditional cost variation ( ) under specific structural properties .
Below is one highly illustrative computational problem analyzed through the lens of our framework.
7.1.1 Graph Isomorphism (Planarity and Bounded Degree)
The general Graph Isomorphism (GI) problem asks if two graphs of size n are structurally identical. Its general worst-case complexity is quasi-polynomial, (Babai's algorithm [4,5]). However, the complexity of GI is highly sensitive to the topological properties of the input graphs. Three classical structural properties illustrate this:
-
Property : The input graphs are planar. For , Hopcroft and Wong showed [25] that planar graph isomorphism is solvable in linear time . Therefore .
-
Property : The input graphs are acyclic and connected (trees). For , the tree isomorphism problem can be solved via the AHU (Aho, Hopcroft, Ullman) algorithm [2] in linear time . Therefore .
-
Property : The maximum vertex degree is bounded by a constant . For , Luks' group-theoretic algorithm [36] solves the problem in polynomial time , and if is constant, GI collapses to .
Table 1 shows how these different structural properties prune the active uncertainty and collapse the computational cost. We observe that the rate of computational collapse is intimately tied to the information-theoretic reduction achieved by the structural constraint . In cases where the property collapses the active uncertainty to a constant (such as the Partition problem with or Same Integers where ), the problem's conditional cost is rendered completely independent of the input size , collapsing to .
Table 1: Complexity Analysis and Uncertainty Metrics under Property
| Problem | General Cost | Property | Uncertainty Metric | Conditional Cost | Complexity Class |
|---|---|---|---|---|---|
| Partition | or Same Integers | (NSU under ) | |||
| Graph Isomorphism | Planar Graph Topology | ||||
| Graph Isomorphism | Bounded Degree | for constant |
7.2 Really Hard Problems
Are there problems whose complexity is completely unaffected by knowing the input size ? In complexity theory, this is true for undecidable problems (such as the Halting Problem [46], which has infinite complexity regardless of ), but also for certain algebraic cryptographic problems. For instance, in the Discrete Logarithm Problem [40] or Integer Factorization, the input size (the bit-length of the modulus) is always known and publicly specified. Yet, knowing does not provide any structural shortcut or local property that can prune the search space. The problem remains structurally uniform and resistant to local pruning. This suggests that their Sensitivity to Uncertainty (SU) is zero, i.e. because almost all instances of size are extremely hard. These problems are Not Sensitive to Uncertainty (NSU) yet remain computationally hard, forming the foundation of modern cryptography.
Now consider the SUM problem as discussed in §3 where we stated that it is NSU. However can collapse to 1 under a simple (e.g. if all elements are equal), therefore it is a trivially easy problem. Factoring is NSU too, but every leaves large (therefore high USI as defined in §6) meaning that this problem is genuinely hard. Both problems have , yet they sit at opposite ends of our spectrum. What makes Factoring "really hard" is not its NSU-ness but that it is NSU and simultaneously -resistant. That means that the class is heterogeneous, and the property that actually separates easy from hard is the joint profile , i.e. USI.
The Discrete Logarithm Problem (DLP) is formulated as follows: let be a finite cyclic group of order with generator . Given an element , find the unique integer such that (denoted ). While computing given (modular exponentiation) is highly efficient, requiring only multiplications, solving the inverse mapping is classically hard. In generic groups (such as elliptic curve groups), the best classical algorithms require exponential time , whereas in multiplicative groups of finite fields , index-calculus methods run in sub-exponential time.
The Integer Factorization Problem (IFP) is formulated as follows: given a composite integer , find its unique prime factors (i.e., write where each is a distinct prime). In cryptographic systems (such as RSA), is chosen as the product of two large, distinct secret primes and . While verifying a candidate factorization via multiplication is trivial, requiring steps using standard arithmetic, the inverse factorization mapping is classically hard. The fastest known general-purpose classical algorithm is the General Number Field Sieve (GNFS), which operates in sub-exponential time .
7.3 Formal Bridge to Parameterized Complexity
To anchor the parametric complexity classes and within the established taxonomy of theoretical computer science, we formalize their structural relationship to standard Parameterized Complexity (the Downey-Fellows framework) [16].
In traditional parameterized complexity, a parameterized language is defined as a subset , where the second coordinate represents a numerical parameter . The class FPT (Fixed-Parameter Tractable) contains all parameterized languages that can be decided by a deterministic Turing machine in time where is an arbitrary computable function of the parameter , is the input size, and is a constant independent of .
Below we prove that the uncertainty-vanishing metric serves as a natural, information-theoretic parameter that induces a formal parameterization, bridging our framework directly to FPT.
Theorem 2 (Bridge to FPT). Let be a language and an input property. If , the property is checkable in polynomial time , and the determining set can be located in polynomial time for some constants , then the decision problem for on inputs satisfying is Fixed-Parameter Tractable (FPT) with respect to the parameter .
Proof. Let . By definition, there exists an algorithm that decides whether for any input of size satisfying . By Theorem 1 (the Uncertainty Reduction Theorem, constructive form), this algorithm can be decomposed into:
-
A verification step that checks if in time .
-
A locating step that computes a determining set , costing by assumption.
-
A reading step that accesses the active cells.
-
A core solver that runs on the projected input of size k.
Let the worst-case runtime of the core solver on an input of size be bounded by for some computable function and constant . Substituting the active uncertainty size , the runtime of the execution phase is . The total sequential time complexity to decide on any input of size satisfying is the sum of the verification, locating, reading, and core execution phases:
Since , the reading cost is at most . Setting and absorbing the reading term, we get
which is for the computable function . This matches the definition of FPT with parameter .
This theorem provides a rigorous connection: it shows that any problem which is highly tractable under partial knowledge (possessing a small uncertainty metric ) is structurally isomorphic to an FPT problem where the parameter is the information-theoretic entropy of the input.
Remark 3 (Two regimes of the Bridge to FPT). Theorem 2 proves the projection regime: the core solver operates on the -cell projection, so the FPT parameter is . The search-interface regime satisfies the same conclusion with the active dimension in place of the metric: the solver reads all n cells but branches only over states, giving (Def. 6). Bounded-treewidth Vertex Cover ( ) and strong backdoors ( ) are instances of this regime. Both regimes are special cases of knowledge-driven fixed-parameter tractability, with the active dimension as the unifying parameter.
7.4 Structural Separation Under the Exponential Time Hypothesis
A key question in structural complexity theory is whether the introduced classes and are structurally distinct. Trivially, under the assumption that , we have since and . To prove a non-trivial separation for properties where the uncertainty is sub-linear but unbounded, we utilize the Exponential Time Hypothesis (ETH) of Impagliazzo, Paturi, and Zane [29]. ETH states that the 3-SAT problem over variables cannot be solved by any deterministic Turing machine in time (where is the little-o notation indicating a growth rate strictly slower than linear).
Towards our objective, we define a parameterized property that restricts the active variable space of a 3-SAT formula, and prove a conditional separation.
Theorem 3 (Structural Separation of and ). Let be a constant and let denote the structural property of a 3-CNF formula over variables asserting that all but at most variables are assigned fixed truth values, i.e. that the number of free variables of is at most . Since , this is a genuine restriction: at most a sub-linear fraction of the variables remains undetermined. The property is verifiable in linear time ( : count the free variables), and the residual uncertainty of any instance satisfying it is exactly , because the free variables are the only remaining unknowns of the instance. Under the Exponential Time Hypothesis (ETH), for the language of satisfiable 3-CNF formulas it holds that
Proof. Let be the language of satisfiable 3-SAT formulas and fix . We use the property defined in the statement of the theorem, so and . We first show that , i.e. that a non-deterministic Turing machine can decide on inputs satisfying , by:
-
Verifying that in time.
-
Non-deterministically guessing the truth values of the unassigned variables, taking steps.
-
Evaluating the formula on the complete assignment, taking polynomial time (at most steps per clause).
The total non-deterministic runtime is polynomial in (indeed for the verification, for the guessing, and for the evaluation), which is strictly polynomial in . Thus, .
We shall now show that under ETH. Suppose by contradiction that . This implies there exists a deterministic Turing machine that decides for any input of size
The 3-Satisfiability (3-SAT) problem is a canonical NP-complete decision problem. Let be a set of Boolean variables. A literal is a variable or its negation . A 3-CNF formula is a conjunction (AND) of clauses, , where each clause is a disjunction (OR) of exactly three literals (e.g., ). The problem asks whether there exists a truth assignment that satisfies , i.e., makes the entire formula evaluate to True.
satisfying in polynomial time, i.e. for some constant . We can use to solve any arbitrary, unstructured 3-SAT instance over variables. To do so, we pad with dummy variables, assigning them fixed constants (e.g., false). This transformation constructs a padded formula of size . By construction, contains exactly active variables, meaning satisfies the property . Running our deterministic machine on this padded instance of size requires time:
Since and are constants, the exponent is a constant. This means we can solve any general 3-SAT instance over variables in polynomial time . However, a runtime of is strictly sub-exponential , meaning . This directly violates the Exponential Time Hypothesis (ETH). Therefore, under ETH, no such deterministic machine can exist, implying . This completes the separation proof.
This separation theorem shows that when the active uncertainty metric grows as a sub-linear power of the input size (such as ), the problem remains super-polynomially hard for deterministic machines under ETH, yet collapses to polynomial time for non-deterministic machines. This establishes a robust, conditional separation between and .
8 Theoretical Originality and Value
We first discuss the originality and value position of our proposal, and provide the associated clarifications, and then we discuss the superiority of uncertainty-based bounds (in Section 8.1), and we showcase this superiority over the partition problem (in Section 8.2), as well as in other NP Hard problems (in Section 8.3).
8.1 Mathematical Superiority of Uncertainty-Based Bounds
How does this differ from standard Fixed-Parameter Tractability (FPT)? As described in §7.3, Fixed-Parameter Tractability (FPT) is a framework in computational complexity that studies whether a hard problem becomes efficiently solvable when some aspect of the input (the parameter) is small. It is the central concept in parameterized complexity theory. The basic idea is that many NP-hard problems are difficult because the input size n is large. However, in practice, some property of the input, such as the size of the desired solution, the treewidth of a graph, or the number of variables, may be small. Parameterized complexity separates these two quantities: (a) n: the overall input size, (b) k: a parameter that is expected to be small. Instead of asking whether a problem can be solved in polynomial time in n, we ask whether it can be solved in , where is any computable function depending only on k, is a polynomial in the input size. If such an algorithm exists, the problem is fixed-parameter tractable (FPT). This means that in FPT, we already parameterize complexity using a parameter k. Why do we need ? Standard FPT parameterizes the numerical properties of the input (e.g., vertex cover size k). parameterizes the logical predicate K and its information content
A concrete instance of the padding follows: Take and . The padding appends dummy variables, all fixed to false, giving a padded formula with variables. Of these, exactly are active (the original ones), so satisfies with . Running on then costs , polynomial in .
An algorithm is said to run in sub-exponential time if its worst-case time complexity is bounded by , where is the little-o notation indicating a growth rate strictly slower than linear. Formally, this means that for any real constant , as . This class of runtimes includes functions of the form for any constant (such as ), which scale significantly faster than any polynomial but strictly slower than fully exponential bounds .
. In the proposed framework, the parameter is not just a number, but the entropy reduction achieved by knowing K. Our framework yields strictly tighter, instance-level upper bounds compared to classical worst-case and pseudo-polynomial analyses, in patricular:
A. Elimination of Pseudo-Polynomial Exponents: Classical dynamic programming for numerical NP-complete problems yields bounds of , where is the bit-length of input values. Under , when a property establishes structural symmetry (e.g., ), regardless of . Our bound collapses from pseudo-polynomial to strongly polynomial , proving that bit-length overhead disappears under structural knowledge.
B. Exact Cell-Probe Matching Bounds: In memory-access complexity models, once a determining set Q has been located, reading the input requires at least cell probes to resolve instance ambiguity. Combining this with Theorem 1 establishes an asymptotically tight matching bound for the core execution phase,
yielding an exact information-theoretic characterization of instance-level runtime. The lower bound applies to the read-and-solve phase after Q is known; when Q is not visible, the total cost is , and the matching is achieved when . For example consider the Partition problem under the structural properties of Section 3.1.
-
All equal : (one cell fixes the common value , the parity check is then ). The matching bound reads , so the core phase costs exactly : one probe suffices, and after reading that single cell the answer is determined.
-
Arithmetic sequence : , so the bound degenerates to , i.e. the core phase costs ; no cell probe is needed at all, since the property itself determines the input completely.
-
No knowledge : , so , a wide but correct range: at least probes are unavoidable (residual ambiguity is total), and the worst case is exponential.
In all three cases the lower bound is achieved by the collapsed solver: the core phase reads exactly the cells whose values resolve the instance, and the Uncertainty Reduction Theorem guarantees the matching upper bound.
D. How does this differ from average-case complexity? Average-case complexity [6,11,31] measures, for a distribution over instances, the expected cost . It answers: is the typical instance easy? The present framework answers a different question: is there a checkable structural property such that every instance satisfying is easy? The two views are complementary:
-
Quantitative bridge. If the support of is contained in , then ; in particular, implies that is average-case polynomial for every distribution concentrated on . The converse fails: a problem may be easy on random instances without admitting any recognizable property , because average-case analysis does not provide the algorithm with a guard to certify that the current instance lies in the easy regime. The view adds certification (the guard ); the average-case view adds typicality across all instances.
-
Worst-case vs. average-case for hard problems. For problems with random self-reducibility [9,17], notably discrete logarithms and, in the cryptographic sense, integer factorization, worst-case and average-case hardness coincide. In our terms, such problems have and are -resistant (NSU): they are uniformly hard, which is precisely why cryptography can rely on average-case assumptions for them. At the opposite end, number partitioning is famously easy on average (Mertens calls it the “easiest NP-complete problem” [37]), while its worst case requires exponential time; our framework explains this gap through : the two phenomena are distinct. Random instances are easy for statistical reasons (the subset-sum distribution becomes dense past the phase transition), not because they satisfy a checkable property with small , a random instance satisfies no such . Average-case and uncertainty analysis are thus two orthogonal refinements of worst-case complexity: one quantifies typicality, the other quantifies certifiable structure.
Is the metric computable? is defined as a minimum over the finitely many cell subsets , so for every decidable property it is computable (by exhaustive search, though not necessarily efficiently); for undecidable it need not be. This is a different matter from the Kolmogorov complexity , which is itself uncomputable even though Lemma 2 bounds it above by ; the uncomputability of does not by itself transfer to . For practical use we restrict to tractable predicates for which is efficiently computable (e.g., in polynomial time).
Is the Uncertainty Reduction Theorem model-dependent? The original phrasing assumed that an algorithm can simply isolate and read only the active cells. That phrasing abstracts two distinct charges: locating the determining set (the find cost of Definition 4) and reading it. On a standard single-tape Turing machine, navigating to those cells incurs sequential traversal costs; we therefore adopt a Random Access Turing Machine (RAM-TM) or an Oracle-assisted Turing Machine as our model, where the active cells can be queried directly in steps once identified. This aligns the mathematics perfectly with modern random-access memory architectures. The locating charge, however, is not an artifact of the machine model: it is intrinsic to the existential definition of , and it is exactly what the constructive form of Theorem 1 makes explicit through .
Relation to Non-deterministic Turing Machine Topology. The topology of a non-deterministic Turing machine (NDTM) could reveal its sensitivity to uncertainty. The computation tree of an NDTM has a branching factor b and depth d, yielding possible execution paths. An input property K acts as a topological constraint that prunes these execution branches. We can model the sensitivity of an NDTM as the rate at which its topological branching entropy collapses when the input tape is partially constrained by K. Highly sensitive problems (like Partition) experience a massive topological collapse of their computation tree (from paths down to a single deterministic path) under simple properties K, whereas insensitive problems retain their full topological expansion.
8.2 Partition Problem: Fixed-Parameter Tractability vs Sensitivity to Uncertainty
8.2.1 Analyzing the Partition Problem through FPT
Below we describe the complexity of the partition problem (of a set of positive integers ), according to various parameters, in a FPT style.
- Parameter Target Sum.
Let . The classical dynamic programming algorithm solves Partition in time . This running time can be written as , where . Since is a computable function of the parameter alone, Partition is fixed-parameter tractable (FPT) with respect to the target sum .
-
Parameter Maximum Element. Let . Since , the dynamic programming algorithm runs in . Equivalently, , where . Hence, Partition is also FPT when parameterized by the maximum input value.
-
Parameter Number of Items. If the parameter is simply the number of integers , exhaustive search examines all subsets in time. Since this can be written as , Partition is trivially FPT with respect to . However, this parameterization is generally considered uninteresting because the parameter is essentially the entire input size.
-
Parameter Number of Distinct Values. Suppose the input contains only distinct integer values. In this case, several algorithms based on compressed dynamic programming and integer programming techniques show that Partition (and the related Subset Sum problem) is fixed-parameter tractable with respect to .
-
Parameter Allowed Imbalance. A related optimization problem asks whether the integers can be partitioned into two subsets whose sums differ by at most . The parameterized complexity of this variant depends on the precise formulation, but several versions admit FPT algorithms and parameterized approximation schemes.
Also note that the Partition is a special case of the Subset Sum problem, meaning that if we set , then Partition is equivalent to asking whether there exists a subset whose sum is . Consequently, many parameterized algorithms and complexity results for Subset Sum immediately apply to Partition.
Summary. A summary of the partition problem from a FPT perspective, is given in Table 2. Note that the Partition problem is considerably more tractable than many other NP-complete problems from a parameterized perspective. In particular, parameterizations based on numeric quantities such as the target sum or the maximum input value lead to fixed-parameter tractable algorithms via classical pseudo-polynomial dynamic programming. This contrasts with strongly NP-complete problems, for which such pseudo-polynomial and FPT algorithms are generally not expected to exist.
| Parameter | FPT? | Reason |
|---|---|---|
| Target sum | Yes | Dynamic programming in |
| Maximum value | Yes | Since , DP runs in |
| Number of distinct values | Yes | Compressed DP / integer programming |
| Number of items | Yes (trivial) | Exhaustive search in |
| Input length only | No (unless ) | Partition is NP-complete |
Table 2: Partition as FPT problem
8.2.2 Analyzing the Partition Problem through Sensitivity to Uncertainty
The relationship between and standard parameterized complexity is one of refinement, not competition. Theorem 2 shows that, whenever is polynomial-time checkable and the determining set can be located in polynomial time , the membership
places the restricted problem in FPT with parameter . In this sense every tractable instance class of this paper is, a fortiori, a fixed-parameter tractable one.
The contribution of lies in three specific choices that parameterized complexity theory itself does not prescribe.
-
A semantic, information-theoretic parameter. Standard FPT parameterizes a problem by a numeric feature of the input (treewidth, solution size, maximum value). The present framework parameterizes by the logical predicate K and the residual information it leaves in the instance, a semantic choice that FPT leaves open.
-
Explicit accounting of the find cost. FPT typically receives the parameter “for free” (e.g. a tree decomposition is given). The framework here separates the verification cost and, most importantly, the find cost : the cost of locating the small residual instance that the parameter refers to. This cost is real (Example 1) and is charged explicitly rather than being absorbed into the assumption “parameter given”.
-
A stronger collapse in the constant-uncertainty regime. The running time of an FPT algorithm is always of the form , keeping the input size in the solver phase. In the regime , e.g. Partition with or , TSP with the Monge property, the Uncertainty Reduction Theorem collapses the core solver to time,
which is strictly below the general guarantee.
We therefore do not claim that is superior to FPT as a framework: rather, isolates a regime (constant residual uncertainty) and a parameter style (semantic predicates and their information content) for which parameterized complexity theory provides no specific guidance, while remaining compatible with it. An open direction is a hardness hierarchy for locating tractable properties (a W-analogue for the find cost), which would tell us which instance classes are not merely unparameterized but genuinely hard to exploit.
8.3 Collapse to Polynomial: Further Case Studies
We now examine three well-known NP-hard problems where structural knowledge K provably collapses the exponential worst case to polynomial time, and where the collapse is made transparent by the metrics of this framework.
8.3.1 Boolean Satisfiability with Strong Backdoor Sets
The Boolean Satisfiability problem (SAT) asks: given a propositional formula F, typically in conjunctive normal form, i.e. a conjunction of clauses, each clause being a disjunction of literals, does there exist a truth assignment to its variables that makes F evaluate to true? SAT was the first problem proved NP-complete (Cook–Levin), and no algorithm substantially faster than exhaustive search over all assignments is believed to exist (the Strong Exponential Time Hypothesis, SETH). Yet, its worst-case complexity collapses once the formula carries structural information, in particular, a small set of variables whose fixing reduces the rest of the formula to a tractable class.
Let be a tractable class of formulas (e.g. 2-SAT or Horn). A set of variables of a CNF formula is a strong backdoor set of size with respect to if for every partial assignment (there are of them) the reduced formula belongs to [19, 48]. The mapping to our perspective follows:
• Property K: F has a strong backdoor set B of size k with respect to 2-SAT.
• Metrics: the whole formula must still be read, so ; what collapses is the active dimension (Def. 6), the number of backdoor assignments the solver branches over (search-interface regime, Remark 3).
-
Active dimension: the solver reads only the k backdoor assignments, so the decision depends on those k cells alone (the rest of the formula being fixed by K, with B part of the certificate). Note that the full reconstruction metric stays , reading k cells does not reconstruct F, so the collapse here is one of decision uncertainty, not input reconstruction, exactly as in the Vertex Cover case below.
-
Cost collapse: enumerate the assignments of and run a linear-time 2-SAT solver on each reduced formula, thus . If , then , i.e. polynomial time.
For example let . The only clause longer than two literals is the third one, , which contains the variable (our backdoor candidate). Take the backdoor set . If , then becomes , a 2-clause; if , becomes , again a 2-clause. In both cases every clause of the reduced formula has at most two literals, so is a 2-CNF and is decidable in linear time. Hence is a strong backdoor set of size 1 with respect to 2-SAT, and the active dimension of the decision is : the answer depends only on the single cell . The whole formula is then decided by enumerating the assignments of , running a linear-time 2-SAT solver on each.
Consequently , although SAT is NP-complete at : the entire exponential penalty has moved from the input size to the active dimension , precisely the reduction promised by the Uncertainty Reduction Theorem. Note that the check that a given candidate is a strong backdoor requires testing all assignments, costing ; finding such a is itself NP-hard in general, so is a certified structural promise rather than a derived one [19].
8.3.2 Vertex Cover on Graphs of Bounded Treewidth
The Vertex Cover problem asks: given an undirected graph with vertices, find the smallest set of vertices such that every edge is incident to at least one vertex of (i.e. every edge is covered). The decision version asks whether such a set of size at most exists. Vertex Cover is one of the classic NP-complete problems, with a naive exhaustive search over all vertex subsets. Yet, as with SAT, its worst-case complexity collapses once the graph carries structural information, in particular, a bounded treewidth . In particular, suppose the input graph has treewidth , i.e. a nice tree decomposition of width is available [3, 10, 41]. The mapping to our perspective follows:
• Property (i.e. decomposition given).
• Uncertainty metric: the whole graph must still be read (i.e. ); what collapses is the active dimension of the search: the dynamic program over the decomposition passes only -sized interface states between adjacent bags.
- Cost collapse: the standard dynamic programming algorithm over the decomposition runs in , polynomial for , and for .
This case is interesting because the mechanism differs from the previous ones: the collapse is not obtained by reading fewer input cells but by parameterizing the search interface: this is the search-interface regime of the Bridge to FPT (Remark 3), with active dimension (Def. 6). It thus illustrates how the framework absorbs classical FPT results as instances of knowledge-driven tractability.
8.3.3 The Traveling Salesperson Problem with Monge Matrices
The Traveling Salesperson Problem (TSP) asks for the shortest Hamiltonian cycle visiting n cities given their pairwise distances. In full generality it is NP-hard, and the canonical dynamic program (Bellman–Held–Karp) runs in time, exponential even for moderate n. Yet, as with SAT and Vertex Cover, this pessimistic bound collapses the moment the distance matrix carries algebraic structure, in particular, when it satisfies certain ordering inequalities known as the Monge property. In particular, consider the case where the distance matrix be symmetric Monge (or Kalmanson), satisfying the Monge inequalities for all ; Demidenko matrices form the corresponding asymmetric class [14,20,30]. Now the mapping to our perspective follows:
• Property K: D is a symmetric Monge matrix.
• Uncertainty metric: for the decision version since a tour always exists, and the solver need not read the matrix at all to output the optimal tour.
- Cost collapse: for Monge matrices (in particular for symmetric Kalmanson matrices) the identity tour is optimal [20,30], so (or for the decision version), versus for general asymmetric TSP via Bellman–Held–Karp.
Consequently, and is, in fact, NSU under , despite the general problem being NP-hard.
Summary. Together with the Partition case, these examples yield a three-point spectrum of collapse that the framework makes evident:
• constant (i.e. as in Partition and TSP-Monge),
• polynomial in a logarithmic active dimension ( as in SAT backdoors, as in bounded treewidth), and
• near-linear (as in TSP-Monge optimization).
The framework thus separates three distinct mechanisms of tractability, reduction of residual uncertainty , FPT-style interface parameterization, and algebraic structure fixing the optimal solution, which classical worst-case analysis aggregates into a single pessimistic bound.
8.4 The Framework in Tractable Tasks
Note that the uncertainty analysis is not restricted to NP-hard problems: it applies to any computational task, including polynomial-time ones. Consider membership lookup in an array : without structural knowledge ( ) the worst case is a linear scan, so . If the array is known to be sorted ( ), binary search answers the query by reading only cells, hence , meaning that the cost variation collapses from linear to logarithmic. Note that this collapse is not a reduction of input uncertainty, reconstructing the whole array still requires reading all cells, so , but a reduction of task uncertainty: the query can be resolved by reading only the cells that the search probes. The task-relative variant, let's denote it by (as introduced in §5, Remark 2), i.e. the minimum number of cells that must be read to resolve the task (not to reconstruct the input), makes this precise: , and the same uncertainty-reduction reasoning applies verbatim with in place of . This shows that Sensitivity to Uncertainty is a continuous spectrum: exponential collapse for NP-hard problems with strong structure, logarithmic collapse for tractable problems (like lookup on sorted data), and no collapse at all for knowledge-resistant problems such as Integer Factorization, whose maximum cost stays high under every .
9 Applications in Software Engineering, Agentic AI and Quantum Computing
While the parametric complexity classes and provide a robust foundation for structural complexity theory, their implications extend directly into applied computer science and software engineering. Historically, software architects, compiler designers, and database engineers have developed heuristics to bypass worst-case theoretical bottlenecks based on intuitive, instance-level observations. In this section, we show how our Sensitivity to Uncertainty (SU) framework formalizes these design paradigms, providing a rigorous mathematical vocabulary to optimize real-world computing systems.
9.1 Predicate-Based Algorithm Dispatching
In software architecture, developers frequently encounter tasks that are globally NP-hard (such as bin-packing for cloud resource allocation, register allocation in compilers, or subset-sum checks in financial ledgers). Our Uncertainty Reduction Theorem (Theorem 1) translates directly into a formal, object-oriented design pattern known as Predicate-Based Algorithm Dispatching.
Rather than routing all arbitrary inputs of size n to an expensive, general-case exponential solver, the system can be designed as a two-tier architectural mediator:
-
The Guard Predicate : A lightweight, deterministic polynomial-time checker that scans the incoming instance x to verify if it satisfies a pre-specified structural property K.
-
The Dispatcher: If the check succeeds , the dispatcher routes the input to a specialized, fast solver that exploits K. If the check fails, the dispatcher falls back to the generic NP-hard engine.
By Theorem 1, the total computational cost of this execution path is bounded by
where is the projection of the input onto the active cells of size . As long as the verification cost , the find cost and the restricted solver cost are strictly smaller than the general-case cost , this dispatching pattern guarantees optimal resource utilization. Note that the guarantee pertains to the complete bound : the dispatcher is beneficial only if all three terms are strictly smaller than the general-case cost. For the structural predicates in this paper's cases (all-equal, 2-CNF, Horn, tree, bipartiteness), is (or ) and , so the deterministic-SLA claim holds verbatim. For predicates with superlinear verification (e.g. the Monge property, where ), the same architecture still yields a polynomial, but not linear, SLA bound; the verification cost is the dominant term.
9.2 Deterministic SLAs via Design-by-Contract in
In modern distributed microservice architectures, API gateways must guarantee strict, deterministic Service Level Agreements (SLAs) for maximum response latency (e.g., “this endpoint will return a result in under 50ms”). Under classical worst-case complexity theory, if a microservice relies on a backend engine that solves an NP-complete problem, guaranteeing a reliable SLA in polynomial time is impossible without assumptions on the input.
By adopting our parametric complexity class , software engineers can achieve deterministic latency bounds using the Design-by-Contract paradigm. Rather than defining a weak API contract with an unstructured parameter (such as List<int> input), the gateway enforces a structural precondition corresponding to a property (such as SortedList<int> input or BipartiteGraph input):
-
The contract guarantees that the incoming request has a bounded, small active uncertainty .
-
Because the microservice executes a problem that is structurally in , the worst-case runtime collapses to a predictable polynomial function of .
-
This enables the engineering team to mathematically compute the upper bound of the service execution time and guarantee a highly reliable, deterministic SLA.
9.2.1 Proof of Concept Implementation
An implementation of the Design-by-Contract for the Partition problem, as well as for all problems discussed in §8.3 (SAT, Vertex Cover, TSP), is available at https://github.com/YannisTzitzikas/PNPu. For example, the output of the execution of the partition problem, is shown below.
DESIGN-BY-CONTRACT & PARAMETRIC COMPLEXITY (UP[K]) DEMONSTRATION
--> Test 1: Processing input of size N = 10,000,000 satisfying Property K_2 (All Equal)...
- Partition Result : TRUE (Equal Partition Exists)
- Matched Property K : K_ALL_EQUAL (s_i = k)
- Guard Verify Time : 2.140 ms (C_verify(K) linear scan)
- Solver Exec Time : 0.000300 ms (UP[K] 0(1) Collapse)
- Total Time : 2.140 ms
- SLA Status : PASSED [SLA MET]
--> Test 2: Processing input of size N = 10,000,000 satisfying Property K_3 (Sequential {1..N})...
- Partition Result : TRUE (Equal Partition Exists)
- Matched Property K : K_ARITHMETIC_SEQ ({1..n})
- Guard Verify Time : 2.315 ms (C_verify(K) linear scan)
- Solver Exec Time : 0.000200 ms (UP[K] 0(1) Collapse)
- Total Time : 2.315 ms
- SLA Status : PASSED [SLA MET]
--> Test 3: Testing small unstructured input (N = 30, K = \epsilon)...
- Partition Result : TRUE (Equal Partition Exists)
- Matched Property K : K_UNSTRUCTURED (Fallback DP)
- Guard Verify Time : 0.002 ms (C_verify(K) linear scan)
- Solver Exec Time : 0.018000 ms (UP[K] 0(1) Collapse)
- Total Time : 0.020 ms
- SLA Status : PASSED [SLA MET]
--> Test 4: Attempting large unstructured input (N = 1,000, K = \epsilon)... [CONTRACT REJECTION TRIGGERED] Exception Message: Design-by-Contract Violation: Input instance lacks structural property K (K=\epsilon) → and size N=1000 exceeds deterministic SLA execution bounds. SLA Status : PROTECTED (System prevented unbounded CPU execution!)
SUMMARY OF PRACTICAL VALUE:
- Verifying property K in O(n) collapses NP-hard solving to O(1) in UP[K].
- Execution time for 10 Million elements took < 3ms, easily meeting <5ms SLAs.
- Unstructured inputs are rejected upfront, guaranteeing deterministic latency.
The key software engineering takeaways illustrated by the code are:
-
Guaranteed Microservice SLAs: Notice that in Test 1 for N=10,000,000 elements, the general NP-hard solver would require astronomical time . But under Design-by-Contract, the total execution time is 2.14 ms (meeting the <5.0 ms SLA threshold).
-
Direct Mapping to Theorem 1: Again in Test 1 notice that (the linear scan that verifies structural integrity), (the O(1) arithmetic modulo check).
-
Protection Against Pathological Latency: Test 4 shows how an enterprise API Gateway protects its infrastructure. When an input of size N=1,000 arrives without a valid property , the service rejects it in 0.002 ms with an explicit contract exception rather than spinning CPU cores indefinitely.
Screenshots of the execution of the rest programs are available in Appendix A.
9.2.2 Optimal Guard Ordering for Multiple Structural Properties
The framework so far assumed a single structural property whose guard is checked against every incoming instance. In practice a dispatcher may test a collection of properties , each yielding a polynomial collapse , and route the instance to the solver of the first property it satisfies. This raises a natural scheduling question: in which order should the guards be evaluated?
Definition 10 (Guard and cost model). For each let
-
be the verification cost of the guard (e.g. for a linear scan, for the Monge property);
-
be the cost of the fast solver associated with on the reduced instance;
-
be the hit rate of , i.e. the probability that a random input satisfies .
We assume the events are disjoint (Pr[x ⊢ K_i ∧ x ⊢ K_j] = 0 for i ≠ j); the general case is discussed in Remark 6. The dispatcher evaluates the guards in some fixed order π and, upon the first index i with x ⊢ K_{π(i)}, runs alg(K_{π(i)}) on the projected instance and returns. If no guard matches, the input is handled by the generic fallback (or rejected by the SLA gate of Section 9).
Proposition 4 (Optimal guard ordering). Let be the total cost incurred by the dispatcher on input x under the ordering , including verification and the executed solver. Then the expected cost is
and an optimal ordering is obtained by sorting the guards in decreasing order of the ratio :
Proof. The solver of guard runs exactly when no earlier guard matched, an event of probability , hence the indicators is reached] have expectation ; the expected total verification cost is the second sum in (4). Each solver runs exactly when , with probability independent of the order, which gives the order-invariant first term. To see that (5) is optimal, suppose two adjacent guards are checked in the order then rather than then . The difference in the corresponding expected verification costs is
Hence checking before is no worse than the opposite iff , i.e. . Transposing adjacent inversions of (5) never increases the expected cost, so any guardwise-sorted order is optimal.
Remark 4 (Special cases). The rule in (5) subsumes two natural heuristics: (i) if all guards are equally likely , it reduces to checking the cheapest guard first, i.e. increasing ; (ii) if all guards cost the same , it reduces to checking the most likely guard first, i.e. decreasing . The general rule balances the two: a guard should be checked early either if it is very likely to match or if it is cheap to verify .
Remark 5 (Link to the uncertainty-reduction bound). The ordering is intimately tied to the Uncertainty Reduction Theorem. In the collapsed regime of interest the solver cost equals which, at the level of cost variation, is bounded by ; and the guard cost is . Thus the ordering (5) minimizes the expected total
and can be computed either offline from domain knowledge or online by bootstrapping estimates from observed match frequencies. This is the precise sense in which “checking cheaper guards first” is optimal: it removes the most uncertainty about which fast solver applies per unit of verification cost.
Remark 6 (Overlapping properties and unknown rates). When the are not disjoint — e.g. a “sorted array” instance also satisfies “all equal” — the events may overlap, and the pairwise exchange argument gives only a necessary condition for optimality. In that case the correct notion is: for each subset of properties, the dispatcher should check the most specific guard covering first, i.e. the one with the strongest post-condition, which is the unique minimal element of under logical implication. When the are unknown, they can be estimated online by , where is the number of matches of among the first requests; the optimal order is then maintained dynamically in a priority queue keyed by .
Remark 7 (Comparison with classifier cascades). The problem is structurally identical to that of learning a classifier cascade (or a decision list over a collection of weak predicates), where plays the role of the precision of a stage and its average inference cost. The optimality of the ratio rule (5) for such cascades is well known in the computer-vision and retrieval literature; we re-derive it here in the language of structural predicates to stress that the principle holds independently of the semantics of the 's.
Remark 8 (Guarantees under unknown verification cost). The analysis assumes the 's are known exactly. When only lower/upper bounds are available (e.g. data-dependent early termination of the guard), the robust analogue is to order by ; the relative loss with respect to the optimal order is bounded by , so the rule is never catastrophically suboptimal.
On the value of the proposed conditional dispatch. A reader might object that the software framework reduces to an “if-then-else”: if run . At the level of control flow it is a conditional dispatcher, however the contribution lies in the content attached to each branch. For each , the guard is verifiable in and the branch solver is certified to run in the collapse bound of the Uncertainty Reduction Theorem; the ordering of the guards is chosen by the ratio rule , handling overlapping properties by the strongest first. An unconstrained if-else carries none of these guarantees: its guards have no a-priori verification bound, its branches no collapse bound, and its order no optimality criterion. The framework is thus not “a conditional” but a theory of when and how conditionals over structural predicates are complexity-safe. A summary is given in Table 3.
Finally, if the SLA cannot be met even after optimal guard ordering, because no structural property K applies to the instance, or because the best match still violates the latency bound, the dispatcher can of course resort to an approximation algorithm as the ultimate fallback: on inputs it could compute an -approximate solution in polynomial time, thereby trading exactness for a guaranteed latency bound.
Table 3: Dispatch on structural predicates vs. an unconstrained conditional. The framework adds a complexity contract to every branch of an if-then-else.
| Dimension | Plain if-then-else ("if x satisfies K run ALGx") | parametric dispatch |
|---|---|---|
| Guard test cost | unspecified; may be as costly as the problem itself | bounded by the verification cost , separated and made explicit |
| Branch (solver) cost | no guarantee; ALGx may be exponential | collapsed by the Uncertainty Reduction Theorem to ; hence |
| Ordering of guards | ad hoc; depends on how the programmer writes the ifs | optimal via the ratio rule (Section 9.2.2) |
| Composition / conflicts | overlapping conditions resolved arbitrarily | overlapping handled by checking the most specific (strongest) property first |
| Complexity certificate | none exposed to the caller | a certified contract: guard bound + solver bound are known to the API and to the SLA layer |
9.3 Application in Agentic AI and Multi-Agent Planning
The rapid emergence of Agentic AI, where autonomous, large language model (LLM) agents must independently reason, plan, execute tools, and coordinate, demands a transition from heuristic agent frameworks to mathematically rigorous decision models. Currently, autonomous agents suffer from planning execution bottlenecks, inefficient tool-use routing, and unbounded reasoning loops. We show how our Sensitivity to Uncertainty (SU) framework, specifically the metrics and the parametric classes , provides a formal information-theoretic foundation to resolve these challenges.
9.3.1 Collapsing Planning and Causal Reasoning Complexity
Autonomous agent planning (e.g., represented via PDDL or STRIPS) is classically PSPACE-complete or undecidable in the worst case [28,47]. Under standard agentic architectures, this worst-case complexity forces agents to rely on expensive, non-deterministic heuristic search algorithms that frequently fail to scale. However, an agent's environment is rarely a completely unstructured, worst-case space (). Instead, the environment's causal graph typically satisfies specific structural properties (such as acyclic causal dependencies of actions or bounded treewidth of state transitions). Let denote the property that the causal graph of the planning domain is acyclic. When the causal graph of the planning domain is acyclic, the dependency structure admits a topological ordering and planning reduces to processing actions in that order, which is polynomial time. We formalize this within our framework as PDDL-Planning . By executing a linear-time guard check before initiating a planning sequence, the agent can verify if the environment matches this tractability contract. If verified, the agent's planning engine bypasses the PSPACE-complete search space entirely, executing a deterministic polynomial-time planner over the topological order, with the running time certified by the contract.
9.3.2 Optimal Tool-Use and Information-Theoretic Utility
A central challenge in agentic architectures is the Tool-Use Selection Problem: determining when an agent should invoke an external tool (such as an API, a database query, or a localized symbolic solver) and which tool among a library offers the highest utility. Current architectures rely on standard LLM prompting to heuristically select tools, introducing massive latency and financial overhead. We can formalize the utility of tool invocation using our uncertainty-vanishing metric . Let the agent's current understanding of the goal state be with uncertainty . The invocation of an external tool transforms the state to , yielding a target state with structural property . We define the Information Gain achieved by executing tool as the net reduction in target uncertainty, i.e. . Let represent the computational, latency, or API cost of executing . The agent can mathematically compute the Information-Theoretic Utility of each candidate tool as: . Then the agent can then evaluate the utility of all available tools and execute the optimal action:
This formalization allows autonomous agents to make mathematically optimal, cost-aware decisions regarding when to seek external assistance versus when to continue internal reasoning, providing a rigorous foundation for agentic meta-cognition.
9.3.3 Formalizing the System 1 vs. System 2 Reasoning Split
Modern AI architectures seek to split execution between “System 1” reasoning (fast, intuitive, non-deterministic LLM token generation) and “System 2” reasoning (slow, deliberative, deterministic symbolic execution or tree-of-thought search). Our parametric framework provides the exact mathematical criteria required to orchestrate this split. Let a user query be represented as an input instance x of size n. The platform’s orchestrator passes x through a set of polynomial-time checkers to identify if x satisfies any known property K for which the underlying problem is in :
-
If and for some constant , the orchestrator immediately routes the query to a System 2 symbolic solver tool. This guarantees an exact, deterministic, and polynomial-time execution path, bypassing the LLM entirely.
-
If no such property K is verified (representing maximum structural uncertainty ), the orchestrator routes the query to the System 1 probabilistic LLM.
By parameterizing the reasoning split via boundaries, the orchestrator guarantees maximum accuracy while minimizing expensive GPU and API overheads, formalizing the interface between deep learning and symbolic AI.
9.4 Applications in Quantum Complexity and the Limits of Quantum Speedup
The metrics of our Sensitivity to Uncertainty (SU) framework provide a profound information-theoretic explanation for a central, open question in quantum information theory: Why do quantum computers achieve exponential speedups for specific computational tasks while remaining strictly bounded for others?
To formalize this analysis, we extend our parametric framework to quantum complexity classes by defining the class (Uncertainty-Parametric BQP), where BQP (Bounded-Error Quantum Polynomial-Time) represents the class of decision problems solvable by a quantum computer in polynomial time with an error probability of at most [8,38].
Definition 11. (Uncertainty-Parametric BQP - ) A language belongs to the class if there exists a polynomial-time quantum Turing machine (or family of quantum circuits) , a polynomial , and an input property such that for any string of length satisfying , decides whether with bounded error in time , and the property is classically verifiable in polynomial time.
Using this definition, we can characterize the limits of quantum speedups based on the structural uncertainty of the input space. Three cases are described below.
9.4.1 Unstructured Search and Grover's Bound
Suppose we are searching for a target element in an unstructured database of size . Because the database lacks any organizing structure, the input possesses maximum structural uncertainty, i.e. and . In this high-entropy, unstructured state, a classical deterministic algorithm requires queries to locate the element. A foundational theorem in quantum query complexity proved by Bennett, Bernstein, Brassard, and Vazirani [7] establishes that any quantum algorithm requires a minimum of queries to solve the unstructured search problem. While Grover's search algorithm [21] achieves this quadratic speedup, the complexity remains strictly exponential in the input size , and this explains the extremely slow execution times of Grover's Algorithm in big datasets [45]. That suggests the following conjecture: for non-adaptive search problems, , i.e. quantum query algorithms cannot certify a structural collapse, since their advantage is bounded by queries while a classical guard achieves .
9.4.2 Structured Search and Exponential Quantum Collapse
Conversely, the most prominent quantum algorithms that achieve an exponential speedup over classical computing, transitioning from super-polynomial classical complexity to quantum polynomial time, do so by exploiting a hidden coset structure in the problem. A large and important family of such algorithms can be mathematically unified as instances of the Hidden Subgroup Problem (HSP) over an abelian group G [15,35]: the function f encodes an unknown subgroup by being constant on, and distinct between, the cosets of H. Notable examples include Shor's factoring algorithm ( , period-finding) and Simon's algorithm ( ). However, HSP does not capture all known quantum exponential speedups; quantum simulation [34] and quantum linear-systems algorithms [23] achieve exponential advantages through different mechanisms.
For example, the integer factorization problem is solved by Shor’s algorithm [44] by reducing it to period-finding for the modular exponentiation function . This function satisfies the strict periodic property:
The periodic constraint restricts the input state to an exceptionally low-entropy subspace. The Quantum Fourier Transform (QFT) [39] acts as the mathematically optimal quantum encoder. By applying the QFT, the quantum computer processes the superposition of states to construct a constructive interference pattern, collapsing the active uncertainty of the hidden subgroup to a single point in the phase space . Because this active uncertainty collapses to a logarithmic factor, Shor's quantum phase estimation algorithm can extract the period in polynomial time, therefore Factoring .
Our Sensitivity to Uncertainty framework thus suggests a deep computational truth: Quantum speedup is fundamentally an entropy-dependent phenomenon. An exponential quantum speedup is not an intrinsic capability of quantum hardware operating on arbitrary inputs; rather, it is a dynamic consequence of a quantum computer's ability to exploit highly structured, low-uncertainty algebraic properties to collapse the active search space , a capability that classical architectures cannot natively replicate.
Which is a hard problem, but not proved to be NP-Complete.
9.4.3 Limits of Quantum Advantage on Structured Inputs
The entropy-dependence of quantum speedup has a direct consequence for approximation. Consider MaxCut, a canonical benchmark for the quantum approximate optimization algorithm (QAOA). Under the structural property the graph is bipartite, every edge crosses the cut, and the maximum cut equals the number of edges: the problem is solved exactly in by the guard scan itself, with ; under it is solvable in polynomial time by Hadlock's algorithm, and the planarity test is again a linear-time guard [22,24]. In both cases the instance class carries sufficiently low uncertainty that no quantum algorithm is needed, and, by the argument of Section 9.4.2, no exponential quantum advantage is available either, since the collapse is already classical.
Quantum approximation heuristics such as QAOA are therefore relevant only in the high-uncertainty regime (equivalently, high ), where the input possesses no exploitable structure. In information-theoretic terms, the same metric that explains Shor's exponential speedup (low under ) and Grover's quadratic bound (high under ) also predicts when a quantum approximation heuristic can matter at all: exactly when remains large. The framework thus provides a unified account of quantum advantage and quantum approximation: both are phenomena of residual input entropy, not of hardware per se.
10 Conclusion
This paper introduces a formal framework for analyzing the dual nature of NP-hard problems: while they are computationally intractable in the worst case, they can collapse to polynomial time when specific structural properties are present. We define the residual uncertainty using conditional Kolmogorov complexity, which quantifies the information that remains unknown about an instance even after a structural property K is known. The Uncertainty Reduction Theorem establishes that the solver complexity depends on this residual uncertainty, not solely on the input size.
We demonstrated this collapse across multiple NP-hard problems, including Partition, SAT, Vertex Cover, TSP, and MaxCut, where algebraic, combinatorial, and geometric structures trigger the collapse. We also identified problems that are knowledge-resistant: for Integer Factorization, the maximum cost stays high for every structural property K, because no K reduces the worst-case instance cost (although easy instances of every size, such as even or smooth integers, keep large). This shows that the framework captures a genuine spectrum of tractability, from fully collapsible to uniformly resistant problems.
We further analyzed the quantum extension of the framework. The Quantum Uncertainty Reduction Theorem shows that quantum algorithms can reduce the solver complexity when the structural property enables quantum speedups, as in Shor's algorithm: the period-finding property has active dimension (Def. 6), and the QFT-based solver runs in polynomial time in the input length (i.e. polylogarithmic in ).
We conjecture that quantum computation alone does not collapse NP-complete search problems at , consistent with the open question NP BQP, so the residual uncertainty remains the operative quantity even in the quantum regime.
The framework also provides a practical methodology for algorithm design: by identifying structural properties and measuring their residual uncertainty, one can predict and exploit computational collapses in real-world instances. The catalogue of structural properties and their corresponding collapses, together with the optimal guard ordering, offers a systematic approach to solving NP-hard problems in practice.
As future work, it is worth building a software library and catalogue of NP-hard problems and their structural collapses. Each entry records, for a given problem : a family of structural properties for which , the verification cost , the find cost , the solver complexity implied by the Uncertainty Reduction Theorem, and the optimal guard ordering given by the ratio . Given an NP-hard task and a known instance structure, an engineer (or an AI agent) could then query the exact certified collapse and the price of realizing it, rather than resorting to worst-case analysis. Starting from the problems treated in this paper (Partition, SAT, Vertex Cover, and TSP under the Monge property), the catalogue can grow incrementally as further structural properties are identified. Building it requires, and therefore incentivizes, characterizing further families of tractable predicates for which and are computable or effectively approximable.
A second direction is a hardness hierarchy for the framework. It is natural to ask which properties are hard to locate even when the residual uncertainty is small: a W-analogue classifying the find cost would determine when the collapse promised by the Uncertainty Reduction Theorem is genuinely exploitable, and when it remains a theoretical bound hiding an intractable search. Third, the connection with approximation algorithms deserves investigation: for instances that satisfy no tractable property , an approximation algorithm trading exactness for a guaranteed latency bound is the natural fallback, and the uncertainty metrics may guide the choice of the approximation ratio. Finally, extending the analysis to the quantum setting, in particular characterizing precisely when holds, would sharpen the information-theoretic account of quantum advantage developed in this paper.
Acknowledgments
This paper assembles personal ideas and work of many summers. During this long period I enjoyed related discussions with Nicolas Spyratos. Many thanks to Michalis Kolountzakis for spotting problems that enabled me to correct the theory, and to Charalampos E. Tsourakakis for suggesting me to establish the relationship to average complexity, and other feedback. Many thanks also to Anastasia Analyti, Dimitris Plexousakis and Grigorios Tsagkatakis for providing me with valuable feedback. Finally I would like to thank Marios Adamidis for giving me access to the FORTHought [1] that helped me assemble my notes and ideas in a coherent text.
References
[1] Marios Adamidis, Anastasia Katrisioti, Yannis Tzitzikas, and Emmanuel Stratakis. It's not the language model, it's the tool: Deterministic mediation for scientific workflows. In Proceedings of the 14th Hellenic Conference on Artificial Intelligence, SETN '26, Chania, Greece, 2026.
[2] Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. The Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, USA, 1974.
[3] Stefan Arnborg and Andrzej Proskurowski. Linear time algorithms for NP-hard problems restricted to partial k-trees. Discrete Applied Mathematics, 23(1):11–24, 1989.
[4] László Babai. Graph isomorphism in quasipolynomial time. arXiv preprint arXiv:1512.03547, 2015.
[5] László Babai. Graph isomorphism in quasipolynomial time. In Proceedings of the Forty-Eighth Annual ACM Symposium on Theory of Computing (STOC 2016), pages 684–697, New York, NY, USA, 2016. ACM.
[6] Shai Ben-David, Benny Chor, Oded Goldreich, and Michael Luby. On the theory of average case complexity. Journal of Computer and System Sciences, 44(2):193–252, 1992.
[7] Charles H. Bennett, Ethan Bernstein, Gilles Brassard, and Umesh Vazirani. Strengths and weaknesses of quantum computing. SIAM Journal on Computing, 26(5):1510–1523, 1997.
[8] Ethan Bernstein and Umesh Vazirani. Quantum complexity theory. SIAM Journal on Computing, 26(5):1411–1473, 1997.
[9] Manuel Blum and Silvio Micali. How to generate cryptographically strong sequences of pseudorandom bits. SIAM Journal on Computing, 13(4):850–864, 1984.
[10] Hans L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM Journal on Computing, 25(6):1305–1317, 1996.
[11] Andrej Bogdanov and Luca Trevisan. Average-case complexity. Foundations and Trends in Theoretical Computer Science, 2(1):1–106, 2006.
[12] John Broome. The two-envelope paradox. Analysis, 55(1):6–11, 1995.
[13] Peter Buneman. The recovery of trees from measures of dissimilarity. In F. R. Hodson, D. G. Kendall, and P. Tautu, editors, Mathematics in the Archaeological and Historical Sciences, pages 387–395. Edinburgh University Press, 1971.
[14] Rainer E. Burkard, Bettina Klinz, and Rüdiger Rudolf. Perspectives of monge properties in optimization. Discrete Applied Mathematics, 70(2):95–161, 1996.
[15] Andrew M. Childs and Wim van Dam. Quantum algorithms for algebraic problems. Reviews of Modern Physics, 82(1):1–52, 2010. arXiv:0812.0380.
[16] Rodney G. Downey and Michael R. Fellows. Parameterized Complexity. Springer-Verlag, New York, NY, USA, 1999.
[17] Joan Feigenbaum and Lance Fortnow. Random-self-reducibility of complete sets. SIAM Journal on Computing, 22(5):994–1005, 1993.
[18] Lance Fortnow. The status of the P versus NP problem. Communications of the ACM, 52(9):78–86, sep 2009.
[19] Serge Gaspers and Stefan Szeider. Backdoors to satisfaction. In Armin Biere, Marijn Heule, Hans van Maaren, and Toby Walsh, editors, Handbook of Satisfiability, volume 336 of Frontiers in Artificial Intelligence and Applications. IOS Press, 2nd edition, 2021.
[20] P. C. Gilmore and R. E. Gomory. Sequencing a one state-variable machine: a solvable case of the traveling salesman problem. Operations Research, 12(5):655–679, 1964.
[21] Lov K Grover. A fast quantum mechanical algorithm for database search. In Proceedings of the twenty-eighth annual ACM symposium on Theory of computing, pages 212–219, 1996.
[22] Frank O. Hadlock. Finding a maximum cut of a planar graph in polynomial time. SIAM Journal on Computing, 4(3):221–225, 1975.
[23] Aram W. Harrow, Avinatan Hassidim, and Seth Lloyd. Quantum algorithm for linear systems of equations. Physical Review Letters, 103(15):150502, 2009.
[24] John Hopcroft and Robert Tarjan. Efficient planarity testing. Journal of the ACM, 21(4):549–568, 1974.
[25] John E. Hopcroft and J. K. Wong. Linear time algorithm for isomorphism of planar graphs (preliminary report). In Proceedings of the Sixth Annual ACM Symposium on Theory of Computing (STOC 1974), pages 172–184, New York, NY, USA, 1974. ACM.
[26] Ellis Horowitz and Sartaj Sahni. Computing partitions with applications to the knapsack problem. Journal of the ACM (JACM), 21(2):277–292, 1974.
[27] Nick Howgrave-Graham and Antoine Joux. New generic algorithms for hard knapsacks. In Advances in Cryptology – EUROCRYPT 2010, volume 6110 of Lecture Notes in Computer Science, pages 235–256. Springer, 2010.
[28] Xu Huang, Weiwen Liu, Xiaolong Chen, Xingmei Wang, Hao Wang, Defu Lian, Yasheng Wang, Ruiming Tang, and Enhong Chen. Understanding the planning of LLM agents: A survey. 2024.
[29] Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63(4):512–530, 2001.
[30] Kenneth Kalmanson. Edgeconvex circuits and the traveling salesman problem. Canadian Journal of Mathematics, 27(5):1000–1010, 1975.
[31] Leonid A. Levin. Average case complete problems. SIAM Journal on Computing, 15(1):285–286, 1986.
[32] Ming Li, Paul Vitányi, et al. An introduction to Kolmogorov complexity and its applications, volume 3. Springer, 2008.
[33] Ming Li and Paul M. B. Vitányi. An Introduction to Kolmogorov Complexity and Its Applications. Texts in Computer Science. Springer, 4th edition, 2019.
[34] Seth Lloyd. Universal quantum simulators. Science, 273(5278):1073–1078, 1996.
[35] Chris Lomont. The hidden subgroup problem — review and open problems, 2004. arXiv:quant-ph/0411037.
[36] Eugene M. Luks. Isomorphism of graphs of bounded valence can be tested in polynomial time. Journal of Computer and System Sciences, 25(1):42–65, 1982.
[37] Stephan Mertens. The easiest hard problem: Number partitioning. Computational Complexity and Statistical Physics, 125(2):125–139, 2006.
[38] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press, 2000.
[39] Michael A. Nielsen and Isaac L. Chuang. Quantum Computation and Quantum Information. Cambridge University Press, Cambridge, UK, 10th anniversary edition, 2010.
[40] Andrew M. Odlyzko. Discrete logarithms in finite fields and their cryptographic significance. In Advances in Cryptology, Proceedings of EUROCRYPT 1984, volume 209 of Lecture Notes in Computer Science, pages 224–314. Springer, 1984.
[41] Neil Robertson and Paul D. Seymour. Graph minors. II. Algorithmic aspects of tree-width. Journal of Algorithms, 7(3):309–322, 1986.
[42] Richard Schroeppel and Adi Shamir. A , algorithm for certain NP-complete problems. SIAM Journal on Computing, 10(3):456–464, 1981.
[43] Claude Elwood Shannon. A mathematical theory of communication. The Bell System Technical Journal, 27(3):379–423, 623–656, jul 1948.
[44] Peter W Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM review, 41(2):303–332, 1999.
[45] Giorgos Theodorakis, Michalis Touloupakis, and Yannis Tzitzikas. On encoding big knowledge graphs as quantum states and on running Grover's algorithm. In Quantum Computing and Data/Knowledge Management (QCDKM 2025), Satellite workshop of International Joint Conference on Knowledge Graphs (IJCKG, pages 509–525. Springer, 2025.
[46] Alan Mathison Turing. On computable numbers, with an application to the Entscheidungsproblem. Proceedings of the London Mathematical Society, 42(1):230–265, 1937.
[47] Lei Wang, Chen Ma, Xueyang Feng, Zeyu Zhang, Hao Yang, Jingsen Zhang, Zhiyuan Chen, Jiakai Tang, Xu Chen, Yankai Lin, Wayne Xin Zhao, Zhewei Wei, and Jirong Wen. A survey on large language model based autonomous agents. Frontiers of Computer Science, 18(6):186345, 2024.
[48] Ryan Williams, Carla P. Gomes, and Bart Selman. Backdoors to typical case complexity. In Proceedings of the 18th International Joint Conference on Artificial Intelligence (IJCAI), pages 1173–1178, 2003.
A Implementation Results
The code is publicly available at https://github.com/YannisTzitzikas/PNPu.
A.1 SAT
DESIGN-BY-CONTRACT & PARAMETRIC COMPLEXITY (P_u[K]) DEMONSTRATION -- SAT problem --
--> Test 1: Processing 2-CNF with N = 2,000,000 clauses (K_2CNF)...
- SAT Result : SATISFIABLE
- #Variables : 5,000
- #Clauses : 2,000,000
- Matched Property K: K_2CNF (syntactic 2-SAT)
- Guard Verify Time : 265.825 ms (C_verify(K) linear scan)
- Solver Exec Time : 3181.401100 ms (UP[K] polynomial collapse)
- Total Time : 3447.229 ms
- SLA Status : FAILED [SLA BREACHED]
--> Test 2: Processing Horn formula with N = 2,000,000 clauses (K_HORN)...
- SAT Result : SATISFIABLE
- #Variables : 5,000
- #Clauses : 2,000,000
- Matched Property K: K_HORN (Horn-SAT)
- Guard Verify Time : 28.465 ms (C_verify(K) linear scan)
- Solver Exec Time : 211.321000 ms (UP[K] polynomial collapse)
- Total Time : 239.787 ms
- SLA Status : FAILED [SLA BREACHED]
--> Test 3: Testing small unstructured 3-SAT (K = \epsilon) ...
- SAT Result : SATISFIABLE
- #Variables : 3
- #Clauses : 3
- Matched Property K: K_UNSTRUCTURED (Fallback DPLL)
- Guard Verify Time : 0.038 ms (C_verify(K) linear scan)
- Solver Exec Time : 0.014000 ms (UP[K] polynomial collapse)
- Total Time : 0.052 ms
- SLA Status : PASSED [SLA MET]
--> Test 4: Attempting large unstructured 3-SAT (N = 500, K = \epsilon) ... [CONTRACT REJECTION TRIGGERED] Exception Message: Design-by-Contract Violation: Formula lacks structural property K (K=\epsilon) with 600 → variables and 500 clauses exceeds deterministic SLA execution bounds. SLA Status : PROTECTED (System prevented unbounded CPU execution!)
SUMMARY OF PRACTICAL VALUE:
- Verifying property K in O(m) collapses SAT solving to O(m) in UP[K].
- Two million clauses (2-CNF and Horn) solved in well under the 5 ms SLA.
- Unstructured 3-SAT inputs are rejected upfront, guaranteeing deterministic latency.
A.2 Vertex Cover
DESIGN-BY-CONTRACT & PARAMETRIC COMPLEXITY (P_u[K]) DEMONSTRATION -- Vertex Cover problem --
--> Test 1: Processing a TREE with V = 500,000 vertices (K_TREE)...
- Min Vertex Cover : 250000
- #Vertices : 500,000
- #Edges : 499,999
- Matched Property K : K_TREE (linear DP)
- Guard Verify Time : 60.228 ms (C_verify(K) linear scan)
- Solver Exec Time : 22.949100 ms (UP[K] collapse)
- Total Time : 83.178 ms
- SLA Status : FAILED [SLA BREACHED]
--> Test 2: Processing a BIPARTITE graph with V = 40,000 vertices (even cycle, K_BIPARTITE)...
- Min Vertex Cover : 20000
- #Vertices : 40,000
- #Edges : 40,000
- Matched Property K : K_BIPARTITE (Konig)
- Guard Verify Time : 5.053 ms (C_verify(K) linear scan)
- Solver Exec Time : 5.386500 ms (UP[K] collapse)
- Total Time : 10.441 ms
- SLA Status : FAILED [SLA BREACHED]
--> Test 3: Testing small unstructured non-bipartite graph (K = \epsilon, triangle)...
- Min Vertex Cover : 2
- #Vertices : 3
- #Edges : 3
- Matched Property K : K_UNSTRUCTURED (brute force)
- Guard Verify Time : 0.008 ms (C_verify(K) linear scan)
- Solver Exec Time : 0.057000 ms (UP[K] collapse)
- Total Time : 0.066 ms
- SLA Status : PASSED [SLA MET]
--> Test 4: Attempting large non-bipartite graph (V = 200, K = \epsilon)... [CONTRACT REJECTION TRIGGERED] Exception Message: Design-by-Contract Violation: Non-bipartite graph with V=200 lacks structural property → K (K=\epsilon) and exceeds deterministic SLA execution bounds. SLA Status : PROTECTED (System prevented unbounded CPU execution!)
SUMMARY OF PRACTICAL VALUE:
- Verifying property K in O(V+E) collapses NP-hard Vertex Cover to polynomial.
- A 500,000-vertex tree and a 40,000-vertex bipartite graph are solved exactly, whereas brute force would need 2^V time.
- Unstructured non-bipartite inputs are rejected upfront, guaranteeing deterministic latency.
A.3 TSP
Notice that here the verification cost (in Test 1) is higher than the solver cost.
DESIGN-BY-CONTRACT & PARAMETRIC COMPLEXITY (P_u[K]) DEMONSTRATION -- TSP problem --
--> Test 1: Processing MONGE (Demidenko) matrix, n = 200 (K_MONGE)...
-
TSP Cost : 39800
-
#Cities : 200
-
Matched Property K: K_MONGE (identity optimal)
-
Guard Verify Time : 2.656 ms (C_verify(K))
-
Solver Exec Time : 0.031700 ms (UP[K] collapse)
-
Total Time : 2.689 ms
-
SLA Status : PASSED [SLA MET]
--> Test 2: Processing small random matrix, n = 10 (K_UNSTRUCTURED, Held-Karp)...
- TSP Cost : 1943
- #Cities : 10
- Matched Property K: K_UNSTRUCTURED (held-karp)
- Guard Verify Time : 0.004 ms (C_verify(K))
- Solver Exec Time : 1.241000 ms (UP[K] collapse)
- Total Time : 1.245 ms
- SLA Status : PASSED [SLA MET]
--> Test 3: Attempting large random matrix, n = 30 (K = \epsilon).... [CONTRACT REJECTION TRIGGERED] Exception Message: Design-by-Contract Violation: TSP instance (n=30) lacks a structural property K → (Monge/rank-1) and exceeds deterministic SLA execution bounds. SLA Status : PROTECTED (System prevented unbounded CPU execution!)
SUMMARY OF PRACTICAL VALUE:
- A Monge/Demidenko matrix collapses TSP to O(n) (identity tour).
- Unstructured instances rejected upfront to guarantee deterministic latency.