Next Article in Journal
Some Characterizations of k-Fuzzy γ-Open Sets and Fuzzy γ-Continuity with Further Selected Topics
Previous Article in Journal
Continuous Maximum Coverage Location Problem with Arbitrary Shape of Service Areas and Regional Demand
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Tableau with Holes: Clarifying NP-Completeness

by
Edgar Graham Daylight
a.k.a. Karel Van Oudheusden, Department of Computer Science, KU Leuven, Celestijnenlaan 200a, Box 2402, 3001 Leuven, Belgium
Symmetry 2025, 17(5), 677; https://doi.org/10.3390/sym17050677
Submission received: 10 February 2025 / Revised: 4 April 2025 / Accepted: 18 April 2025 / Published: 29 April 2025
(This article belongs to the Special Issue Symmetry in Solving NP-Hard Problems)

Abstract

:
In the context of defining NP -completeness, a tableau represents a hypothetical accepting computation path p of a nondeterministic polynomial time Turing machine N on an input w. The tableau is encoded by the propositional logic formula ψ , defined as ψ = ψ c e l l ψ r e s t . The component ψ c e l l enforces the constraint that each cell in the tableau contains exactly one symbol, while ψ r e s t incorporates constraints governing the step-by-step behavior of N on w. Intuitively, ψ r e s t appears to pose a much greater challenge for satisfiability. This raises the question of whether the distinction between ψ c e l l being a 3cnf formula, rather than a cheap 2cnf formula, actually matters. We show that if, hypothetically, ψ r e s t can be succinctly represented as a Horn formula, then satisfying ψ can be achieved efficiently in K f ( n , k ) steps, where N operates within O ( n k ) steps and both k and K are constants. Asymptotically, f ( n , k ) n 2 3 k . Our method has the potential for iterative application. Technically, we trim ψ c e l l down to a 2cnf–Horn formula, whose satisfiability allows for empty cells, or “holes”, in the tableau. This modified tableau represents exponentially many paths of N on w, rather than a single accepting path p. While a tableau with holes conceptualizes the satisfiability of ψ t r i m —a trimmed-down version of ψ —it does not directly address the satisfiability of ψ . Therefore, we introduce an external user who efficiently employs backtracking to fill in specific holes, ultimately verifying the satisfiability of the original ψ .

1. Introduction

Consider an arbitrary nondeterministic polynomial time Turing machine N, running on arbitrary input w of length n, in O ( n k ) steps—where k is a constant. Formulating NP -completeness entails representing the behavior of a hypothetical accepting computation path p of N on input word w, with
w = w 0 w 1 w n 1 ,
using propositional logic. The path depends on the execution of uniquely labeled instructions, such as the following one:
t a b c : q 1 , a q 2 , b , , q 3 , c , + .
This nondeterministic instruction, labeled t a b c , can be split into two distinct deterministic instructions as follows:
  • t a b : q 1 , a q 2 , b , .
  • t a c : q 1 , a q 3 , c , + .
Each deterministic instruction is assigned a unique label (e.g., t a b ).
Instruction t a b specifies that when N is in state q 1 and reading symbol a, the machine is supposed to transition to state q 2 and rewrite the symbol a as b, and the tape head should move one cell to the left (−). A plus sign (+) indicates a unary move to the right.
Standard treatments of NP -completeness use the concept of a tableau—a matrix with n k rows and n k + 3 columns, depicted in Table 1—to conceptualize the hypothetical computation path p. Each row in this tableau represents a Turing machine configuration of N, framed by boundary markers at the beginning and end. Successive rows evolve from their predecessors based on N’s transition function. A portion of one tableau, related to instruction t a b , is shown on the left in Table 2, while a portion of another tableau, associated with instruction t a c , is displayed on the right.
The two illustrations in Table 2 are slight variations of those presented by Sipser [1] (p. 280). In a similar vein, Papadimitriou introduces the concept of a “computation table” [2] (Section 8.2). Likewise, Hopcroft, Motwani, and Ullman use the term “array of cell/ID facts” [3] (p. 443). Finally, Aaronson also conveys the idea of a tableau, using slang in his popularizing book [4] (p. 61). To the best of our knowledge, all approaches to NP -completeness rely on a tableau, ultimately tracing back to Cook’s seminal paper [5].
The symbol sequence “ q 1 a ”, which appears in both top rows of Table 2, signifies that the machine is currently in state q 1 , with its head oriented towards the tape cell containing the symbol a. This information is expressed propositionally through the conjunction of two Boolean variables, x i , j , q 1 and x i , j + 1 , a , where indices i and j denote the row i and column j in a tableau.
A tableau is deemed accepting when it represents a non-hypothetical accepting computation branch of N on w. The task of determining whether N accepts w is equivalent to ascertaining the existence of an accepting tableau for N on w. To achieve this, one must establish the satisfiability of ψ ,
ψ = ψ c e l l ψ r e s t ,
a propositional logic formula that encodes the intended meaning of the tableau. This reasoning closely follows Sipser’s account [1] (Section 7.4).
To elucidate the variables within ψ , consider Q and Φ as, respectively, the state set and tape alphabet of N. Define C = Q Φ , , where ⊢ and ⊣ are boundary markers. For each i and j ranging from 1 to, respectively, n k and n k + 3 , and for every symbol s in C , we introduce a Boolean variable, x i , j , s . We have a total of O n 2 k such variables.
Definition 1.
A Boolean formula in conjunctive normal form is referred to as a 3cnf formula if each clause consists of exactly three literals. If each clause contains at most two literals, the formula is called a 2cnf formula. We refer to a formula as “a 2cnf–Horn formula” if it qualifies as both a 2cnf and a Horn formula.
Remark 1.
More rigorous definitions can be found in Appendix A.
Remark 2.
Determining the satisfiability of 2cnf formulas or Horn formulas is substantially more efficient than for genuine 3cnf formulas [6].

1.1. Problem Statement

An accepting tableau provides a visual framework to demonstrate the satisfiability of ψ , affirming that N accepts w. The formula ψ comprises two key components: ψ c e l l and ψ r e s t , both expressed as 3cnf formulas. Intuitively, ψ r e s t , which incorporates constraints pertaining to the step-by-step behavior of N on w, appears to pose a much greater challenge for satisfiability. This raises the question of whether the distinction between ψ c e l l being a 3cnf formula and being a cheap 2cnf formula actually matters.

1.2. Results

In this paper, we introduce our FHB algorithm (“Filling Holes with Backtracking”) along with its refinement, the rFHB algorithm. We show that if ψ r e s t can, hypothetically, be succinctly represented as a Horn formula, then the distinction between ψ c e l l being a 3cnf versus a simpler 2cnf formula becomes smaller. In this case, satisfying ψ can be achieved with the rFHB algorithm in at most
K f ( n , k )
steps, where N operates within O ( n k ) steps and both k and K are constants. Here,
f ( n , k ) n 2 k 4 1 3 = n 2 k 3 1.59 ,
or arguably even
f ( n , k ) n 2 k 8 1 4 = n k 2 1.68 .
We further contextualize this result in Section 7. In future work, we will explain how the method presented in this article can be applied iteratively, progressively reducing the exponent f ( n , k ) .

1.3. Relevance

The immediate value of this work is twofold. First, it complements the author’s ongoing efforts to represent ψ r e s t —specifically, the step-by-step behavior of certain well-chosen nondeterministic machines in particular contexts—using Horn clauses to the fullest extent possible. Second, it provides an analysis that tackles one of the first nontrivial questions—outlined below—that engineering students commonly ask when encountering NP -completeness in standard treatments [1,6,7].
To illustrate part of this roadmap in a simplified manner, consider computational models with a constant number of nondeterministic choices. A conceptual example is solving a Sudoku puzzle, where constant nondeterminism can be leveraged as follows:
  • Guess a number for a single Sudoku cell.
  • After making this guess, follow the deterministic rules of Sudoku (each row, column, and box must contain the digits 1–9 exactly once) to fill in the rest of the grid.
  • If the puzzle is unsolvable with that guess, try another guess for the same cell.
In this Sudoku context, the Turing machine’s step-by-step behavior is a priori known to be deterministic in large predefined regions of the tableau. As a result, it can naturally be expressed as a Horn formula in those regions. While this may be nearly trivial from a theoretical perspective, software engineers exploit such application-specific properties to optimize performance.
Remark 3.
In connection with related and upcoming results—where the author demonstrates how a binary choice an sich can be reformulated using a Horn formula—see his Turing machine simulation on YouTube (click here: https://youtu.be/3jmBcgjES5I (accessed on 4 April 2025)) and his theory building [8].
Mathematical engineers, in contrast, also seek to explore a broader, context-independent question: Given two 3cnf formulas, ψ c e l l and ψ r e s t , which—if either—becomes easier to satisfy when the other is fully, yet hypothetically, transformed into an equivalent Horn formula? This theoretical question frequently arises among engineering students studying computational complexity, at least in the author’s experience.
In this paper, we assume that ψ r e s t can be reformulated as an equivalent Horn formula. The reverse hypothetical scenario—where we assume that ψ c e l l can be reformulated as a Horn formula—is not explored here.

1.4. Previous Work

Although contemporary accounts of NP -completeness are widely available, there is a notable absence of studies specifically addressing holes in a tableau. Theoretically, each cell always contains a single symbol, both initially and throughout. See the previously cited works of Sipser, Papadimitriou, Hopcroft et al., and Aaronson. We aim to fill that void by enhancing and utilizing geometrical symmetry within the “tableau with holes” framework.

1.5. Methodology

This paper contributes to the field of NP -completeness, with a focus on its foundational aspects. The research is supported by mathematical arguments, along with figures, tables, and graphs. While references to an off-the-shelf HORNSAT solver and algorithmic techniques (e.g., backtracking) stem not only from the literature but also from engineering practice, the content of this article is purely conceptual.

1.6. Outline

This paper is organized as follows. In Section 2, we refine the problem statement involving ψ = ψ c e l l ψ r e s t , and in Section 3, we introduce an auxiliary formula, ψ e x t r a η . Then, we delve into the concept of a tableau with holes and prove three related claims in Section 4. Next, we present and analyze the proposed backtracking algorithm in Section 5, followed by a refinement thereof in Section 6. Finally, we present our conclusions in Section 7. This paper includes four appendices: standard definitions are given in Appendix A, lemmas are provided in Appendix B, a geometrical proof is presented in Appendix C, and a solution to a recurrence relation is derived in Appendix D.

2. Refining the Problem Statement

In a tableau, each of the n k × n k + 3 entries is referred to as a cell. Specifically, the cell located in row i and column j is denoted as c e l l i , j and is supposed to contain a symbol from the set C . The contents of these cells are represented using the variables of ψ . When the variable x i , j , s is assigned the value 1, it signifies that c e l l i , j contains the symbol s. We also denote this situation as follows:
s @ ( i , j ) .
Similarly, we write
¬ s @ ( i , j )
or
s @ ( i , j ) ¯
when x i , j , s is assigned 0. We use ¬ and the overbar interchangeably to enhance readability.

2.1. Formula ψ c e l l

The 3cnf formula ψ c e l l is constructed as a conjunction of two segments, S 1 and S 2 , structured as follows:
ψ c e l l = 1 i n k 1 j n k + 3 S 1 S 2 S 1 = s C x i , j , s S 2 = s , t C , s t x i , j , s ¯ x i , j , t ¯
The first segment enforces that at least one variable is “turned on” per cell in the tableau, while the second segment ensures that at most one variable is “turned on” per cell. Although S 2 qualifies as a 2cnf–Horn formula, it is clear that S 1 is neither a 2cnf nor a Horn formula.

2.2. Formula ψ r e s t

The second component of ψ is defined as:
ψ r e s t = ψ s t a r t ψ a c c e p t ψ s t e p .
The satisfiability of ψ s t a r t , a 2cnf–Horn formula of size O n k , guarantees that the initial row of the tableau represents the start configuration of N on w, of length n.
ψ s t a r t = x 1 , 1 , x 1 , 2 , q 0 x 1 , 3 , w 0 x 1 , 4 , w 1 x 1 , n + 2 , w n 1
x 1 , n + 3 , x 1 , n k + 2 , x 1 , n k + 3 ,
The boundary markers are denoted by ⊢ and ⊣, while □ represents the blank symbol.
The satisfiability of ψ a c c e p t , a 2cnf–Horn formula of size O n 2 k , entails that no cell in the tableau may contain the state symbol q r e j e c t , thereby ensuring that an accepting tableau corresponds to a computation path p that does not reach the q r e j e c t state.
ψ a c c e p t = 1 i n k 1 j n k + 3 x i , j , q r e j e c t ¯
For readers unfamiliar with this convention, see Grädel [7] (p. 32).
To address the satisfiability of ψ s t e p , which captures the step-by-step behavior of N on w, we focus on the aforementioned instruction t a b c as it applies to the following Turing machine configuration, denoted as C:
a q 1 a
We analyze the execution of instructions t a b and t a c separately—both outcomes are depicted on the left and right sides of Table 2, respectively—before combining them into a single implication. This results in an expression of the form:
C 1 C 2 C 3 T a b T a c ,
where both T a b and T a c take the form C 1 C 2 C 3 . Ultimately, this forms a 3cnf formula corresponding to Sipser’s notion of a 2 × 3 window [1] (p. 280). By taking conjunctions over all 2 × 3 windows defined by N, and for each row and column in the tableau, we derive a 3cnf formula ψ s t e p of size O ( n 2 k ) .
Whether the meaning of the formula ψ s t e p can be compactly expressed as a Horn formula ψ s t e p η remains an open question. If one could answer this affirmatively, independent of a specific engineering context, it would provide a significantly simpler characterization of NP -completeness than those found in the current textbooks. The only remaining non-Horn formula would be ψ c e l l , whereas current accounts characterize NP -completeness in terms of two non-Horn formulas: ψ c e l l and ψ r e s t . See, for instance, Sipser [1] (Section 7.4).
Hypothetically, if such a Horn formula ψ s t e p η does exist, it must differ from ψ s t e p , i.e., ψ s t e p ψ s t e p η . The Greek letter eta ( η ), resembling the Latin letter h, is used here to highlight that the formula in question is a Horn formula.
By contrast, other formulas, such as ψ s t a r t , are inherently Horn formulas:
ψ s t a r t = ψ s t a r t η .
For simplicity and readability, however, we often write ψ s t a r t instead of ψ s t a r t η .

2.3. Trimming Down

Does the fact that ψ c e l l is a 3cnf formula inherently make ψ , with ψ = ψ c e l l ψ r e s t , computationally expensive to satisfy? To explore this question, we introduce one simplification, one assumption, and one extension—enabling a transition from ψ to a trimmed-down formula, ψ t r i m .
The simplification is as follows: we substitute the truth value of 1 for S 1 in ψ c e l l , yielding ψ c e l l , a 2cnf–Horn formula of size O ( n κ 1 ) , for some constant κ 1 . The satisfiability of ψ c e l l allows for the presence of multiple empty cells, or “holes”, in the tableau.
The assumption is the existence of the Horn formula ψ s t e p η , of size O ( n κ 2 ) , where κ 2 is a constant. Consequently, we now replace ψ r e s t with ψ r e s t η , defined as:
ψ r e s t η = ψ s t a r t ψ a c c e p t ψ s t e p η ,
where Horn formula ψ r e s t η is of size O ( n κ 3 ) , for some constant κ 3 .
The extension involves introducing extra constraints, represented by ψ e x t r a η , a Horn formula of size O ( n κ 4 ) , where κ 4 is a constant. We define ψ e x t r a η in the next section. The satisfiability of ψ e x t r a η is implied by the satisfiability of ψ .
From these three moves, we obtain:
ψ t r i m = ψ c e l l ψ r e s t η ψ e x t r a η ,
where
ψ t r i m = ψ t r i m η .
Horn formula ψ t r i m is of size O ( n κ 5 ) , for some constant κ 5 .
Instead of working directly with ψ , we focus on ψ t r i m for the remainder of this paper. Typically, the tableau corresponding to a satisfiable ψ t r i m contains holes. Consequently, it does not encode a single accepting path p of N on w; instead, it indirectly represents exponentially many paths. From this point forward, unless explicitly stated otherwise, any discussion of tableaux and propositional variables will pertain to ψ t r i m , not ψ .
Under significant nondeterminism (e.g., when the Turing machine N functions as a SAT solver processing a nontrivial input w), and given that ψ is satisfiable, using an off-the-shelf HORNSAT solver H on the formula ψ t r i m leads to nearly all cells of the tableau containing holes.
This insight can be derived through conceptual reasoning or practical implementation via computer programming, both of which the author has employed. The worst-case assumption—that the SAT solver N makes several nondeterministic choices early in the computation—is realistic. Consequently, nearly all rows in the tableau remain undetermined, except for a few at the top.
Solver H assigns a default truth value of 0 (i.e., false) to each propositional variable, switching a value from 0 to 1 (i.e., true) only when compelled by the constraints of the given Horn clauses. The solver H never reverts a propositional variable assigned the value 1 back to 0. Since satisfying ψ c e l l is sufficient, rather than the full ψ c e l l , solver H can satisfy ψ t r i m while leaving nearly all propositional variables turned off.
Remark 4.
To efficiently implement solver H with a few for loops, see the work of Dowling and Gallier [9].
Definition 2.
Given ψ t r i m and a corresponding tableau, we say that c e l l [ i , j ] in the tableau contains a hole if x i , j , s is false for all s C .
Definition 2 does not rule out the possibility that a specific variable x i , j , s * , for some s * C , may eventually be “turned on”, thereby filling the hole with symbol s * at a later stage. For instance, consider the case where c e l l [ i , j ] contains a hole but is later filled by the user of solver H with the state symbol q 5 , as illustrated in Table 3. What are the implications of this action? To explore this, we now define the Horn formula ψ e x t r a η .

3. Formula ψ e x t r a η

The formula ψ e x t r a η captures some global properties of a Turing machine computation. While it is redundant in the context of ψ ’s satisfiability, it generally proves useful when ψ t r i m is satisfiable, i.e., when the tableau is potentially accepting but still contains holes. To formally define ψ e x t r a η , we begin by examining the example in Table 3.
If q 5 @ ( i , j ) holds, where q 5 Q —meaning x i , j , q 5 has a value of 1—then the tape head of N can never visit any of the crossed-out cells in Table 3. This restriction arises from the fact that a Turing machine can move its tape head only one cell to the left or right with each instruction and thus with each transition between consecutive rows in the tableau. Moreover, in each column of the tableau, all crossed-out cells either store or are expected to store the same tape symbol s Φ . This restriction follows from the fact that a Turing machine can only modify a tape symbol when the head is positioned over that specific cell.
Therefore, filling the hole in c e l l [ i , j ] with the state symbol q 5 effectively amounts to filling in all crossed-out cells, albeit indirectly. The requirement that q 5 @ ( i , j ) holds implies that only cells that are not crossed out can contain the binary choices made by N on w.
Formula ψ e x t r a η expresses these restrictions as a conjunction of three parts:
ψ e x t r a η = 1 i n k 1 j n k + 3 q Q ψ e x t r a s i n g l e s Φ ψ e x t r a l e f t ψ e x t r a r i g h t
The single part, ψ e x t r a s i n g l e , ensures that at most one state symbol is stored per row. The left part, ψ e x t r a l e f t , addresses the crossed-out cells to the left of q 5 @ ( i , j ) in Table 3, while the right part, ψ e x t r a r i g h t , handles the crossed-out cells to the right.
Remark 5.
Technical simplifications are possible in the following discussion but would come at the cost of pedagogical clarity.

3.1. The Single Part

We define ψ e x t r a s i n g l e as follows:
ψ e x t r a s i n g l e = q @ ( i , j ) q j j ¬ q @ ( i , j ) ,
where q Q and the column index j ranges from 1 to n k + 3 . This condition ensures that if the state symbol q is stored in c e l l [ i , j ] , it is the only state symbol in row i. In other words, no state symbol q can be stored in any other cell within the same row.
Remark 6.
The possibility of q @ ( i , j ) with q q is ruled out due to the satisfiability of ψ c e l l . Suppose that q @ ( i , j ) holds; then, according to ψ c e l l , no other symbol (e.g., q ) can be stored in c e l l [ i , j ] . Additionally, the reader will note that ψ e x t r a s i n g l e can already be deduced from ψ s t a r t ψ s t e p η ψ c e l l . Nonetheless, explicitly stating this property does no harm.

3.2. The Left Part

We define ψ e x t r a l e f t as follows:
ψ e x t r a l e f t = ψ 1 l e f t ψ 2 l e f t ψ 3 l e f t
On the one hand, we reason from row i both towards earlier rows ( δ ) and towards later rows ( + δ ):
ψ 1 l e f t = 0 < m < j q @ ( i , j ) s @ ( i , j m ) r ( δ ) s @ ( i + δ , j m ) ,
where the restriction on δ , denoted by r ( δ ) , is defined by the following inequalities:
  • 0 δ m 1 .
  • 1 i δ i + δ n k .
Additionally, the expression
s @ ( i + δ , j )
is shorthand for:
s @ ( i δ , j ) s @ ( i + δ , j ) .
Example 1.
For instance, if q 5 @ ( i , j ) and s * @ ( i , j 3 ) hold, then the following must also hold:
r ( δ ) [ s * @ ( i δ , j 3 ) s * @ ( i + δ , j 3 ) ] ,
where r ( δ ) is defined by the following inequalities:
  • 0 δ 2 .
  • 1 i δ i + δ n k .
The reader can verify that all relevant cells range from c e l l [ i 2 , j 3 ] at the top to c e l l [ i + 2 , j 3 ] at the bottom. These five cells correspond to the crossed-out entries in column j 3 in Table 3.
On the other hand, we reason from the earliest row ( i δ m i n ( m ) ) and, respectively, the latest row ( i + δ m a x ( m ) ) toward row i:
ψ 2 l e f t = 0 < m < j q @ ( i , j ) s @ ( i δ m i n ( m ) , j m ) s @ ( i , j m ) ,
ψ 3 l e f t = 0 < m < j q @ ( i , j ) s @ ( i + δ m a x ( m ) , j m ) s @ ( i , j m ) ,
where δ m i n ( m ) is defined as the maximum (not the minimum) of the set:
{ δ | 0 δ m 1 and 1 i δ n k } .
Similarly, δ m a x ( m ) is defined as the maximum of the set:
{ δ | 0 δ m 1 and 1 i + δ n k } .
The satisfiability of ψ 3 l e f t ensures that if a specific cell, such as c e l l [ i + δ m a x ( m ) , j m ] for some fixed m, is filled with the tape symbol s * , then—through a chain reaction partially facilitated by ψ 1 l e f t —all crosses in column j m are replaced with the symbol s * . A similar observation applies to the satisfiability of ψ 2 l e f t , which affects the propagation from an earlier cell, i.e., c e l l [ i δ m i n ( m ) , j m ] .

3.3. The Right Part

Given the inherent symmetry of the problem, the formal definition of ψ e x t r a r i g h t closely mirrors that of ψ e x t r a l e f t and is therefore omitted from this paper.

3.4. Consolidation

In summary, ψ e x t r a η is indeed a Horn formula, with a size of O ( n 4 k ) , where the constant k corresponds to the running time n k of machine N. Furthermore, its satisfiability is trivially implied by the satisfiability of ψ . This last observation leads to the conclusion that if ψ is satisfiable, then ψ t r i m , with
ψ t r i m = ψ c e l l ψ r e s t η ψ e x t r a η ,
is also satisfiable. Moreover, if ψ t r i m is satisfiable without any holes, then ψ is also satisfiable, indicating that N accepts the input word w.

4. Tableau with Holes

We assume that ψ t r i m is satisfiable and that the tableau reflects this condition, typically containing several holes. A hole in the tableau, located at row index i and column index j, represents more than just an empty cell. To be conservative, we stipulate the following:
  • Single Hole: If c e l l [ i , j ] is the only hole in the tableau, it corresponds to at most c possible accepting computation paths, where c is the cardinality of C . (In fact, in this scenario, it contributes to representing at most one accepting path.)
  • Two Holes: If c e l l [ i , j ] is one of two holes in the tableau, it contributes to representing up to c × c possible accepting computation paths.
  • Three Holes: If c e l l [ i , j ] is one of three holes, it contributes to representing up to c × c × c possible accepting computation paths.
This pattern continues, with each additional hole multiplying the maximum number of possible accepting computation paths by c .
In the general case, the tableau, composed of a polynomial number of cells, indirectly represents an exponentially large number of paths for N on w, including paths that are syntactically inadmissible from the perspective of N’s step-by-step behavior. Among the syntactically admissible paths, there are both rejecting and accepting paths.
This flexibility is achieved by leaving most cells unfilled. The Horn clauses associated with ψ t r i m remain implicitly active in the background, waiting for an external user to fill in a hole via an additional specification, such as:
q * @ ( i * , j * ) .
Consequently, the solver H is called upon again, now tasked with satisfying
ψ t r i m q * @ ( i * , j * ) ,
which stands for ψ t r i m x i * , j * , q * . After two more user interventions, the solver is tasked with satisfying the following type of formula:
ψ t r i m q * @ ( i * , j * ) q * * @ ( i * * , j * * ) q * * * @ ( i * * * , j * * * ) .
However, when the user’s guess, such as q * @ ( i * , j * ) , leads the solver H to determine that the formula is unsatisfiable, backtracking becomes necessary. For instance, the user may replace q * @ ( i * , j * ) with q * @ ( i * , j * ) , where q * q * . Fortunately, as will be demonstrated by Claim 3 in this section, filling any hole in the center row of a convex polygon of holes scales the space for binary choices by a factor Δ , with 0 Δ < 1 .
The remainder of this section is divided into three parts. First, we give examples to build intuition (Section 4.1). Next, we increase the symmetry in our “tableau with holes” (Section 4.2). Third, we leverage this symmetry to establish three claims (Section 4.3).

4.1. Examples

The reader may compare Table 3 with Table 4, where the state symbol q 5 is positioned two rows lower (row i 2 ). In this example, filling a hole closer to the center horizontal line of the tableau proves slightly more effective, resulting in 59 crossed-out cells compared to 57 for the original position. However, this is not universally the case, as Table 5 illustrates.
To deepen intuition, three more observations can be made:
  • Regardless of the specific placement of q 5 in row i 2 in Table 4, at least 50 out of the 110 cells will always be crossed out. This lower bound is illustrated in Table 5.
  • Transitioning from Table 5 to a higher-resolution tableau of 15 by 16 cells, as depicted in Table 6, highlights a steady approach toward the limit of 50 % crossed-out cells.
  • A second intervention in row 4 is shown in Table 7, where the external user enforces q 9 @ ( 4 , 12 ) . This action results in 41 additional crossed-out cells.
Remark 7.
To simplify our exposition, the leftmost columns in our depicted tableaux do not contain the boundary marker ⊢. However, strictly speaking, column 1 should contain the boundary marker ⊢, while state and tape symbols appear only from column 2 onward.
A previously unmentioned detail regarding Table 5, Table 6 and Table 7 is that, due to the satisfiability of ψ s t a r t , the state symbol q 0 must be positioned in the upper-left corner of the tableau. Consequently, all other cells in row 1 must be crossed out, and the additional crossed-out cells in Table 8 must also be accounted for.
We now discuss some specific base cases, where all rows but one contain a state symbol. Without loss of generality, the nondeterminism associated with Turing machine N consists solely of binary choices. For each such choice, say, between t 1 and t 2 , the movement of t 1 is to the left (−), while the movement of t 2 is to the right (+).
The first base case is shown in Table 9. Although the state q 11 @ ( 6 , 11 ) , with the value v stored in c e l l [ 6 , 12 ] , presents a binary choice between t 1 to the left and t 2 to the right, the presence of q 5 @ ( 8 , 9 ) ensures that only t 1 can lead to an accepting tableau. Thus, this base case can be resolved automatically by the HORNSAT solver H , without requiring any external user intervention. We realistically assume that ψ s t e p η addresses this deterministic scenario.
An initial true base case is depicted in Table 10. Since the path from row 1 to row 6 is fully determined, we can assume, without loss of generality, that a specific symbol, say, the symbol b, is stored in c e l l [ 6 , 12 ] . The binary choice in row 7 is then defined by, say, the following two instructions:
  • t 1 : q 11 , b q 2 , b , .
  • t 2 : q 11 , b q 3 , c , + .
As a result, either c e l l [ 7 , 10 ] or c e l l [ 7 , 12 ] must contain the symbol q 2 or q 3 , respectively. This problem features three holes and exhibits symmetry. Assuming the user selects t 1 , he fills the hole in c e l l [ 7 , 10 ] with the symbol q 2 . Consequently, the other two holes are automatically filled in as well. Thus, in this base case, we achieve a filling factor of 100 % .
What if we consider Table 11 instead? The only difference between this table and Table 10 lies in the indexing of the rows. Since the top row begins with index 100, there is no guarantee that the values of the crossed cells in this row are already determined. In this scenario, there could be multiple possible ways for N to transition from state q 6 to state q 7 , each involving a movement of one unit to the right. As a result, the values of the crossed cells in the immediate vicinity of q 11 also remain undetermined. However, this situation is tangential to the main point. For, ultimately, there are at most c 0 ways to resolve the binary choices (plural) in row 107, where c 0 denotes the cardinality of Q. For example, in addition to t 1 and t 2 as specified earlier, suppose N also includes t 3 and t 4 as instructions originating from state q 11 :
  • t 3 : q 11 , c q 8 , a , .
  • t 4 : q 11 , c q 55 , c , + .
Consequently, either c e l l [ 107 , 10 ] will eventually hold q 2 or q 8 , or c e l l [ 107 , 12 ] will eventually hold q 3 or q 55 . The external user selects one of c 0 possibilities, and the solver H automatically crosses out the remaining two holes accordingly, once again achieving a 100 % filling factor, regardless of whether H concludes with “satisfiable” or “unsatisfiable”.

4.2. Enhancing Symmetry

Let us now adopt a more rigorous approach. A tableau with holes can be viewed geometrically as a collection of one or more convex polygons, each representing a maximum pocket of holes within the tableau.
When a straight line cuts a convex polygon, it divides the polygon into two smaller convex polygons. We assume familiarity with the following definition and lemma:
Definition 3.
A polygon is a closed, two-dimensional geometric figure made up of a finite number of straight line segments. These segments, called edges or sides, are joined pairwise at their endpoints, known as vertices. The sides of a polygon do not cross each other, and the figure encloses a region in a plane. A convex polygon is a polygon in which all interior angles are less than 180 , and every line segment drawn between any two points inside the polygon lies entirely within the polygon.
Lemma 1 (Cutting a Convex Polygon with a Straight Line).
A straight line that intersects a convex polygon will divide the polygon into exactly two convex polygons, provided the line does not pass solely through one vertex or lie entirely along an edge.
Example 2.
Consider an initially empty 15 × 16 tableau, constituting a convex polygon P. Suppose, for illustrative purposes, that it is the user who injects q 0 @ ( 1 , 1 ) into the tableau. As shown in Table 8, this action results in a straight line of crosses spanning from c e l l [ 1 , 2 ] to c e l l [ 15 , 16 ] that intersects P. This line forms a 45 angle with both the horizontal and vertical edges of P.
To further refine the symmetry of our geometric perspective, we introduce a few additional assumptions about the Turing machine N and its tableau representation. These assumptions are made without loss of generality.
First, we disregard boundary markers in our geometric considerations. As a result, column 1 directly contains state and tape symbols, while the rightmost column is indexed as n k + 1 . Formally, boundary markers can be included in our discourse if needed, but they are omitted here for simplicity.
Second, we assume that machine N processes only inputs w of even length. This condition can be ensured by designing the encoding function from natural numbers to strings w to enforce this property [10]. The implication is that n k and n k 2 are always even and n k + 1 and n k 2 + 1 are always odd, thereby simplifying our forthcoming case analysis.
Third, we emphasize that, after performing at most O ( n k ) steps, an accepting Turing machine N does not halt upon reaching the q a c c e p t state (see Definitions A4 and A5). Moreover, we now generalize as follows: the machine need not remain in the q a c c e p t state, as long as it does not enter the q r e j e c t state (recall the definition of ψ a c c e p t in Section 2.2). Going forward, we assume that the satisfiability of ψ a c c e p t ensures that N roams in the q a c c e p t state around the central column n k 2 + 1 , moving towards the bottommost rows of the tableau. Specifically, the condition
q a c c e p t @ ( n k ϵ , n k 2 + 1 ) ,
must hold for some ϵ { 0 , 1 } . In fact, we aim to assert shortly that ϵ = 0 .
Remark 8.
Just like machine N with ϵ { 0 , 1 } , it is possible to design nondeterministic Turing machine N , which operates in O ( n k ) time for some constant k , such that ϵ = 0 . Suppose nondeterministic Turing machine N , running in O ( n k ) time for some constant k , with k > k , operates similarly to our original machine N, but with two tapes instead of one. The second (auxiliary) tape contains n k strokes before the computation of N on w begins. We can make this assumption because any reasonable encoding function that maps natural numbers to string representations on the Turing machine’s tapes is of our choosing. As N processes the input word w on its first tape, it simultaneously erases one stroke per step on the auxiliary tape. Once N has finished processing w on the first tape and has entered the q a c c e p t state, it ignores the first tape altogether and uses the remaining strokes on the auxiliary tape to determine how to enter or re-enter the q a c c e p t state at c e l l [ n k , n k 2 + 1 ] . The two-tape machine N is converted into the equivalent one-tape Turing machine, N , with a polynomial overhead. Thus, we now have a nondeterministic one-tape Turing machine N , operating in O ( n k ) time, ensuring that
q a c c e p t @ ( n k , n k 2 + 1 )
holds if and only if N accepts w within O ( n k ) time.
Building on the insights provided from Remark 8, and with a harmless abuse of notation, we assume that for machine N the satisfiability of ψ a c c e p t guarantees ϵ = 0 . In other words, the condition
q a c c e p t @ ( n k , n k 2 + 1 )
is satisfied if and only if N on w accepts.
The caveat, however, is that encoding a natural number as an input string on the tape of N does not necessarily comply with the stipulations defined by ψ s t a r t earlier in this paper (see Section 2.2). Simulating a two-tape Turing machine with a one-tape Turing machine requires a setup different from the assumptions made thus far. Furthermore, to enhance geometric symmetry, we aim for the satisfiability of ψ s t a r t to ensure that the state symbol q 0 is placed at the center of the first row, rather than in the leftmost cell.
This implies the following: the symbol q 0 in row 1 is flanked by alternating stroke symbols and half of the input to its immediate left, while the other half of the input is interspersed with strokes on its immediate right. All other cells, with the exception of the boundary markers, contain the blank symbol □. The precise details of this arrangement are not central to our discussion. More important is that the input word w has an even length n (as noted earlier), which in turn ensures that both n k and n k 2 are also even. Specifically, the satisfiability of ψ s t a r t guarantees that the following condition is met:
q 0 @ ( 1 , n k 2 + 1 ) .
To enhance symmetry one final time, we add an extra row at the bottom, forming a square grid with n k + 1 rows and n k + 1 columns, as shown in Figure 1. The top cross corresponds to ψ s t a r t , while the bottom cross represents ψ a c c e p t . Consequently, for accepting w, machine N remains in the q a c c e p t state or re-enters it upon visiting c e l l [ n k + 1 , n k 2 + 1 ] , instead of making this stipulation for c e l l [ n k , n k 2 + 1 ] . Table 12 illustrates this, with n k = 16 .
The result is a diamond-shaped polygon spanning n k 1 rows and n k + 1 columns. See all the blank cells in Table 12 to visualize this polygon, P o l d . A sketch of P o l d can be found in the top-left part of Figure 2, where the center row, indexed at n k 2 + 1 , is highlighted with a dotted horizontal line.

4.3. Reasoning with Symmetry

We continue with the top-right part of Figure 2. The external user selects the center row of the tableau, which is the longest row in the polygon P o l d , and then chooses an arbitrary cell in that row to place the center of the cutting cross, effectively injecting an arbitrary state symbol, such as q 5 . Two illustrations are provided in Table 13 and Table 14, with the center row indexed as 9. Later, in rows 5 and 13, the user’s interventions will amount to even smaller polygons within the two depicted polygons.
It is unnecessary to treat each of the two smaller polygons inside polygon P o l d separately. Indeed, given the symmetry of our geometric problem, we may transition from the top-right part to the bottom-right part of Figure 2.
We are now prepared to formally introduce the geometric claims related to a tableau with holes. After performing m cross-cuts in the top half of the original tableau, let P o l d represent one of the resulting polygons. Now, consider P n e w , a smaller polygon contained within P o l d formed by introducing an additional cut, bringing the total number of cross-cuts to m + 1 . If at most two rows in P n e w lack a state symbol, the problem becomes trivial to solve. The analysis in this section focuses on P n e w , assuming it contains at least three rows.
Specifically, we aim to establish the following three claims regarding P o l d and P n e w , where the relevant measurements are expressed in terms of the number of cells.
Claim 1.
The center row of P n e w is the longest, yet other rows within P n e w may be as long.
Remark 9.
We use the symbols H and D to denote, respectively, the length of a horizontal row and the dotted area of a polygon (see, for example, Table 15).
Claim 2.
The length of the center row of P n e w is at most 1 2 + δ 1 times the length of the center row of P o l d , where 1 2 δ 1 1 2 . That is, H n e w ( 1 2 + δ 1 ) · H o l d .
Claim 3.
We distinguish between a strong Claim 3 and a weak Claim 3:
1.
The total area of P n e w is at most 1 2 + δ 2 times the area of P o l d , where 1 2 δ 2 < 0 . That is, D n e w ( 1 2 + δ 2 ) · D o l d .
2.
Filling any hole in the center row of the convex polygon P o l d of holes scales the space for binary choices within P o l d by a factor Δ, where 0 Δ < 1 .
Remark 10.
The strong claim (1). implies the weak claim (2). as follows:
Δ = 2 · D n e w D o l d 1 + 2 · δ 2 < 1 .
We shall only rely on the weak claim in Section 5 and simply call this “Claim 3”.
To establish Claims 1–3, we conduct a case analysis in the remainder of this section. We begin with the most symmetric case (Section 4.3.1), proceed to a slightly less symmetric case (Section 4.3.2), and conclude with the least symmetric case (Section 4.3.3). Throughout, we rely on lemmas proved in Appendix B.
In the final case (Section 4.3.3), which encompasses the previous two cases, we are unable to prove the strong version of Claim 3. However, we establish the weak version via a geometric proof in Appendix C, where we take a broader perspective on P o l d . We therefore encourage the reader to view this section as an intuitive buildup to the final case, which naturally leads to the comprehensive proof presented in Appendix C.

4.3.1. The Symmetry-to-Symmetry Transition Case

Rather than immediately analyzing the bottom-right portion of Figure 2, we shift the cut to the middle of the center line, as depicted in the bottom-left portion of Figure 2. Hereby, we examine the most symmetric scenario, specifically when the two state symbols are located in the same column. Readers are encouraged to compare the sketch in the lower left part in Figure 2 with the first nine rows of Table 14.
Transitioning from the top half of Table 14 to Table 15, we observe that the crosses have been removed, with the holes now represented by dots. Collectively, these dots form the convex polygon P n e w .
We define H, the length of the center row of P n e w , as:
H = 2 · N + 1 ,
when H is odd, and as:
H = 2 · N ,
when H is even. For example, in Table 12, we have N o l d = 8 and H o l d = 17 . Similarly, in Table 15, we have N n e w = 4 and H n e w = 9 .
The symmetry of the current case implies that the center row is the longest and that
N o l d = 2 · N n e w .
Therefore, Claim 1 is automatically confirmed.
Turning to the second claim, we differentiate between the cases where H o l d is even and where it is odd. In the even case, we would have:
H n e w = H o l d 2 ,
which would imply δ 1 = 0 . In the odd case, we begin with the following:
  • H o l d = 2 · N o l d + 1 = 4 · N n e w + 1 .
  • H n e w = 2 · N n e w + 1 .
  • H n e w = ( 1 2 + δ 1 ) · H o l d .
From these, we derive the equation:
2 · N n e w + 1 = ( 1 2 + δ 1 ) · ( 4 · N n e w + 1 ) .
Solving for δ 1 , we find:
δ 1 = 1 2 · ( 4 · N n e w + 1 ) .
As N n e w , it follows that δ 1 0 . More significantly, as N n e w 1 , δ 1 1 10 . This establishes Claim 2.
Next, we define D, the number of cells constituting the polygon, in terms of N and H:
D = H + 2 · i = 1 N 1 ( H 2 · i ) .
For example, in Table 12, we have
D o l d = 17 + 2 · ( 15 + 13 + 11 + 9 + 7 + 5 + 3 ) = 143 .
Similarly, in Table 15, we have
D n e w = 9 + 2 · ( 7 + 5 + 3 ) = 39 .
We want to calculate the ratio, D n e w D o l d , given that
N o l d = 2 · N n e w ,
H o l d = 4 · N n e w + 1 .
On the one hand, we have:
D n e w = 2 · N n e w + 1 + 2 · i = 1 N n e w 1 ( 2 · N n e w + 1 2 · i ) .
On the other hand, we can express D o l d fully in terms of N n e w , as follows:
D o l d = 4 · N n e w + 1 + 2 · i = 1 2 · N n e w 1 ( 4 · N n e w + 1 2 · i ) .
Based on some elementary algebra, we can prove the following two lemmas:
Lemma 2.
D n e w = 2 · N n e w 2 + 2 · N n e w 1 .
Proof. 
See Appendix B.    □
Lemma 3.
D o l d = 8 · N n e w 2 + 4 · N n e w 1 .
Proof. 
See Appendix B.    □
By applying Lemmas 2 and 3, we obtain
D n e w D o l d = 2 · N n e w 2 + 2 · N n e w 1 8 · N n e w 2 + 4 · N n e w 1
This ratio serves two purposes. First, readers can substitute small values of N n e w to verify the data points presented in Figure 3. Second, by evaluating the limit of the ratio as N n e w , one finds that it is 1 4 .
Coming now to an actual confirmation of the third claim, we start thus:
D n e w = ( 1 2 + δ 2 ) · D o l d ,
and we note that as N n e w , δ 2 1 4 . Also, as N n e w 1 , we have 1 2 + δ 2 0.273 . More significantly, 1 2 + δ 2 < 0.285 holds for all nonzero values of N n e w . This establishes the strong version of Claim 3.

4.3.2. The Symmetry-to-Skew Transition Case

We now consider the transition from an outer, symmetric polygon P o l d to a smaller, skewed polygon P n e w , as shown in the bottom-right portion of Figure 2. This transition is further illustrated in the shift from Table 12 to the top half of Table 13.
The three claims can be readily established, as follows:
  • Since the larger polygon P o l d is being cut with two straight lines, each of which is either orthogonal or parallel to P o l d ’s longest sides, the longest rows of P n e w must be situated at the center. The row lengths remain the same or decrease as one moves away from the center toward either the top or the bottom of P n e w . This confirms Claim 1.
  • The length of the center row of P n e w is even shorter than that of the center row in the polygon examined in the previous section (the Symmetry-to-Symmetry Transition Case). Thus, Claim 2 is readily established.
  • The total area of P n e w is even smaller than that of the polygon considered in the previous section. Consequently, Claim 3 is also confirmed.

4.3.3. The Skew-to-Skew Transition Case

We now examine the transition from an outer, skewed polygon P o l d to a smaller, skewed polygon P n e w . An example of P o l d is shown in Table 16, while an example of P n e w appears, again as a collection of dots, in the top nine rows of Table 17.
Regarding Table 17, note that if symbol q 6 is placed in the same column as symbol q 0 —specifically, in c e l l [ 9 , 17 ] —rather than in column 12, no crosses will appear in row 5, the center row of P n e w . However, in this stringent case, we do have a diamond-shaped polygon P n e w again. This situation is depicted in Table 18.
The straight lines of the cutting cross are either parallel or orthogonal to the two longest edges of the skewed polygon P o l d . As a result, the longest rows of P n e w must be positioned at the center. The row lengths either remain constant or decrease as one moves away from the center toward the top or bottom of P n e w , thereby confirming Claim 1.
Regarding the length of the center row in P n e w , as shown in row 5 in Table 17, we only need to consider the most stringent case, as shown in row 5 in Table 18. We have δ 1 = 1 2 , thereby confirming Claim 2.
Concerning the third claim, we begin by noting that
D n e w + C r o s s < D o l d < 2 · ( D n e w + C r o s s ) ,
where D n e w denotes all the dots in rows 1 9 of Table 18 and C r o s s represents all the crosses depicted in those same rows. D o l d refers to all the dots in Table 16.
Recall that:
H n e w = 2 · N n e w + 1 ,
D n e w = 2 · N n e w + 1 + 2 · i = 1 N n e w 1 ( 2 · N n e w + 1 2 · i ) .
We also have:
C r o s s = 2 · i = 0 N n e w 1 ( N n e w i ) .
In Table 18, we specifically have:
N n e w = 4 ,
D n e w = 9 + 2 · ( 7 + 5 + 3 ) = 39 ,
C r o s s = 2 · ( 4 + 3 + 2 + 1 ) = 20 ,
39 + 20 = 59 < D o l d < 2 · 59 = 118 .
To understand the ratio D n e w D o l d in the general case, we express it as follows:
D n e w 2 · ( D n e w + C r o s s ) < D n e w D o l d < D n e w D n e w + C r o s s = D n e w D o l d max .
Lemma 4.
C r o s s = N n e w 2 + N n e w .
Proof. 
See Appendix B.    □
Lemma 5.
From Lemmas 2 and 4, we obtain
D n e w + C r o s s = 3 · N n e w 2 + 3 · N n e w 1 .
Proof. 
See Appendix B.    □
From Lemmas 2 and 5, we obtain
D n e w D o l d max = 2 · N n e w 2 + 2 · N n e w 1 3 · N n e w 2 + 3 · N n e w 1 .
As N n e w , the ratio D n e w D o l d | max 2 3 . Some more results are presented in Table 19. In our running example, this yields:
39 118 < D n e w D o l d < 39 59 .
Alas, these results do not validate the strong version of Claim 3. However, Table 18 does suggest a compensation of crossed-out cells in the lower half of P o l d . This observation, which brings us to the weak version of Claim 3, requires a more comprehensive geometric proof, which is presented in Appendix C.

5. Filling Holes with Backtracking (FHB)

On the one hand, we have assumed the existence of the compact Horn formula ψ s t e p η . On the other hand, we have validated (the weak version of) Claim 3, which asserts that filling any hole in the center row of a convex polygon scales the space for binary choices within the polygon by a factor Δ , where 0 Δ < 1 . With these specifics established, we now turn our attention to filling holes with backtracking (FHB)—an automatable process. Efficiency is achieved by relying on a refined version of the FHB algorithm, as outlined in Section 6.
Conceptually, the FHB algorithm hinges upon the HORNSAT solver H and integrates the actions of the external user, automating her interventions and incorporating backtracking as a built-in feature. We stipulate that H operates in polynomial time. While this polynomial can be replaced by a nearly linear function [9], such details are irrelevant here.
Recall that n is the length of input w. The initial formula ψ t r i m ,
ψ t r i m = ψ c e l l ψ r e s t η ψ e x t r a η ,
is O ( n κ 0 ) literals long for some constant κ 0 . For example, if ψ e x t r a η is the longest formula of all three conjuncts, it follows that κ 0 = 4 k , as explained in Section 3.4.
Furthermore, we will have at most O ( n k ) extra stipulations of the form q @ ( i , j ) , namely, one per row. Hence, an upper bound on the total cost of our HORNSAT instance,
ψ t r i m q * @ ( i * , j * ) ,
can be expressed as
p ( n ) = κ 1 · n κ 2 ,
for some constants κ 1 and κ 2 .
The FHB algorithm begins with ψ t r i m , an instance of size < p ( n ) , and thus p ( n ) , and runs the solver H on it, resulting in a trivial “satisfiable” as a tentative outcome. (If N’s computation on w is deterministic, then the outcome is permanent and either satisfiable or unsatisfiable.) Next, the algorithm selects the center row of the tableau and injects the first state symbol q in Q = { q 0 , q 1 , q 2 , } into the leftmost hole in that row. If backtracking is required, subsequent iterations will use different state symbols, and if this does not suffice, the next hole (from left to right) in the row will be filled instead, starting again with the first symbol in Q, and so on.
For a row containing holes, there are at most n k + 1 ways to inject some specific q Q into that row. This leads to our key observation:
There are at most c 0 · ( n k + 1 ) ways to inject any q Q into a row, where c 0 denotes the cardinality of Q.
The first user intervention results in scaling the space of binary choices by Δ , shrinking from size p ( n ) to size Δ · p ( n ) . In the next two interventions, our algorithm selects the middle row of the first and second convex polygons of holes, read from top to bottom in the tableau. In the next four interventions, our algorithm selects the middle row of each of the four smaller convex polygons of holes, moving sequentially from top to bottom. This pattern continues in subsequent steps.
Immediately after each intervention, the FHB algorithm directs the solver H to check the entire tableau for unsatisfiability and, in the process, simplify the underlying Horn clauses as much as possible, taking into account all constraints specified by ψ t r i m , where the dots refer to the cumulative intervention stipulations made up to that point.
After each stage of interventions—one intervention in stage 1, two interventions in stage 2, four interventions in stage 3, eight interventions in stage 4, and so on—the solver H runs on an instance that has been shrunk in size by Δ . To be technically precise, the solver H continues operating on the entire instance, but the space of binary choices has been shrunk by a factor of Δ after each stage. As a result, we are intrinsically dealing with an instance of size Δ m · p ( n ) after m stages, where 0 Δ < 1 . Hence, m is bounded from above by O ( l o g ( n ) ) . Additionally, the bookkeeping for backtracking itself incurs at most a polynomial cost. A runtime stack with a constant overhead per recursive call is sufficient in practice [11].
Remark 11.
In future work, the engineer could reduce the exponent κ 2 in
p ( n ) = κ 1 · n κ 2 ,
by considering the on-the-fly generation of the Horn constraints associated with either ψ e x t r a η in Section 3 and/or the constraints associated with ψ s t e p η in Section 2.3.
For instance, the tailored constraints related to ψ e x t r a η would be added only when a guess q * @ ( i * , j * ) is made, causing the formula ψ e x t r a η to grow incrementally with each additional guess and shrinking during backtracking. Similarly, the formula ψ s t e p η could expand and contract based on the placement of the q symbols in the tableau, rather than conservatively accounting for all possibilities in advance.

5.1. Recurrence Relation

To analyze the running cost of the FHB algorithm, we set Δ = 1 2 in conformity with the result proved in Appendix C. We begin by considering the following recurrence relation:
T ( a · b ) = c 0 · 2 · min ( a , b ) · T a · b 4 · T a · b 4 ,
where min ( a , b ) denotes the smaller of the two lengths, a and b. This relationship is illustrated in Figure 4, a simplified version adapted from Appendix C, specifically for the case a b .
The recurrence relation expresses that there are 2 · min ( a , b ) possible positions to place the crossing cut along the dashed horizontal line in Figure 4. When a b , the parameter c ranges from 0 to 2 · a , which is equivalent to 2 · min ( a , b ) . Similarly, when b a , the parameter c ranges from 0 to 2 · b , again spanning from 0 to 2 · min ( a , b ) . In total, there are c 0 · 2 · min ( a , b ) possible ways to fill a hole in the middle dashed row, where the constant c 0 represents the cardinality of the set Q.
The recurrence relation also specifies that the original search space, consisting of a · b cells, is reduced to two smaller, equally sized search spaces of a · b 4 each. This formulation explicitly excludes scenarios like the following one:
T a · b 8 · T 3 · a · b 8 .
This exclusion may seem problematic at first. After all, the only requirement we know for certain is that the sum of the two smaller search spaces must equal half of the original search space, since we set Δ = 1 2 in this discussion. Specifically,
a · b 8 + 3 · a · b 8 = a · b 2 .
Despite this, the exclusion is justified, as we will now explain. In fact, the definition of T ( a · b ) can be further simplified without loss of generality.

5.2. The Devil’s Advocate

A recurrence relation for the FHB algorithm, regardless of its specific form, must begin with a = b , as depicted by the diamond shape in Table 12. During the first user intervention involving the center row of the tableau, the most favorable scenario occurs when the crossing cut is positioned at the leftmost or rightmost edge of the diamond. In either of these two extreme cases, only a single computation path remains, with all other paths discarded from further consideration: the search space is immediately reduced to a single computation path, starting from the top center, passing through either the leftmost or rightmost cell in the middle row, and ending at the bottom center. Conversely, the worst-case scenario arises when the crossing cut is placed exactly halfway along the center row. This results in the formation of two smaller diamond shapes, as illustrated in Table 14.
The devil’s advocate naturally assumes the worst-case scenario at every user intervention. This assumption leads to a = b at each stage of the worst-case run of the FHB algorithm, as illustrated by the transition from Table 12, Table 13 and Table 14. With the invariant a = b , the devil’s advocate proposes the following simplified recurrence relation:
T ( a 2 ) = c 0 · 2 · a · T a 2 4 2 .
Consequently, we change variables with m = a 2 , as follows:
T ( m ) = c 0 · 2 m · T m 4 2 .
Lemma 6.
The dominant behavior of T ( m ) is exponential in m . Specifically,
T ( m ) = ( c 0 · c 1 · 2 5 / 2 ) m c 0 · 2 5 / 2 · m ,
where constant c 0 denotes the size of the state set Q and the constant c 1 = T ( 1 ) depends on the size of the tape alphabet Φ.
Proof. 
See Appendix D.    □
Corollary 1.
T ( m ) C m ,
with constant 1 < C < c 0 · c 1 · 2 5 .
Remark 12.
Corollary 1 is unsurprising, as dividing by 2 instead of 4 (in the recurrence relation) would lead to an exhaustive exploration, as follows:
T ^ ( m ) = c 0 · 2 m · T ^ m 2 2 C ^ m
for some constant C ^ . A standard derivation is omitted from this paper.
Before running the FHB algorithm, as illustrated by the diamond shape in Table 12, we have the following equation:
n k × n k = 2 · a 2 .
Again, the scalar 2 arises from Δ = 1 2 .
Now, let R ( n ) denote the asymptotic runtime cost of the FHB algorithm. Then, we can express it as:
R ( n ) T ( a 2 ) = T n 2 k 2 C n k 2 = 2 ( log C ) · n k 2 .
Theorem 1.
The runtime R ( n ) of the  FHB  algorithm satisfies the upper bound
R ( n ) C ϵ · n k ,
where C > 1 is a constant and ϵ = 1 2 .
Proof. 
The bound follows from the analysis in the preceding discussion.    □
Theorem 1 suggests a prohibitive asymptotic runtime (with log C > 2 in practice). Fortunately, a refinement of the method yields a tighter upper bound.

6. Refining the FHB Algorithm

Even the devil’s advocate will concede that the previous analysis takes an overly pessimistic view by assuming that every cell in the tableau has the potential to contain a (binary) nondeterministic guess. In reality, the situation is far more favorable. Only a small part of the tableau involves binary choices, and more importantly, the outcome of each guess (i.e., the transition to either state q a or q b ) also determines the presence of a specific state symbol (e.g., q c ) in a particular cell elsewhere—typically further down—in the tableau.
To see this, let us analyze a 3-SAT solver N * . Notably, because any nondeterministic polynomial time Turing machine N (running on some input) can be reformulated in terms of the input for N * with only polynomial overhead, our discussion remains fully general.
Suppose the machine N * runs on an input word w of length n, where w encodes a 3-SAT formula ϕ with l propositional variables ( x 1 , , x l ) and a number of clauses. Each clause consists of three literals—for example, x 2 ¬ x 7 x 92 .
Remark 13.
We may assume that every variable x i appears in at least two literals across the formula ϕ; otherwise, such a variable (appearing only once) can be eliminated through preprocessing.

6.1. Coin Tossing

The machine N * stores the encoded formula w on its tape, following the conditions outlined in Section 4.2. During an initial sequence of moves, the tape head shifts to the right, stopping at the first blank symbol immediately following w. The machine then generates l bits, proceeding from left to right and writing each bit—either 0 or 1—into a separate tape cell. This sequence, which is supposed to represent the outcome of l independent coin tosses, is enclosed at both ends by a special marker #.
One outcome of any coin toss must correspond to a rightward movement (+) and the other to a leftward movement (−). To enforce this constraint—consistent with the previous sections in this paper—we implement the following behavior, starting in the q ^ 1 tossing state:
  • If a coin toss yields bit 1, the machine moves its head one cell to the right and re-enters the q ^ 1 state.
  • If a coin toss yields bit 0, the machine first moves its head one cell to the left and enters state q ^ 0 , and then it performs two deterministic moves to the right, ending up in state q ^ 1 again.
Upon completing this process, the machine will have generated l bits, where the j-th bit ( 1 j l ) represents the truth assignment for propositional variable x j . All remaining operations performed by the machine N * are deterministic.
Assigning the truth value 1 to the variable x j entails that, later on, the machine will set each encoded occurrence of x j in the word w to 1 and each encoded occurrence of ¬ x j to 0. (A similar remark holds for the truth value 0.) By implementing the proper FHB-procedures, filling holes with state symbols in the coin-tossing section of the tableau will automatically propagate to filling corresponding holes with state symbols in lower sections of the tableau. Moreover, once all l coins have been tossed, the remaining tableau—and therefore the entire tableau—is fully determined. Even the devil’s advocate would expect this property to be reflected in a worst-case analysis of the FHB algorithm or a refinement thereof.

6.2. Four Coin Tosses

Table 20 illustrates the structure of a coin-tossing process for l = 4 . The hyphens and dots in the figure represent potential positions of the tape head (i.e., state symbols), with the distinction between the two serving only for visual clarity. The two extreme computation runs are depicted solely with hyphens: the diagonal run at the top (consisting of five hyphens) produces all four bits as 1, while the zigzagging run takes longer to complete and results in all four bits being 0.
Specifically, the hyphen in c e l l [ 1 , 2 ] means that the cell contains the symbol pair q ^ 1 . Elsewhere in this paper, we represent this pair as
q ^ 1
which occupies two cells instead of one. These notational variations are inconsequential and can be regarded as equivalent.
As Table 20 illustrates, the coin-tossing process is represented by a table with 3 l + 2 rows and l + 2 columns. This table can be embedded within a ( 3 l + 2 ) × ( 3 l + 2 ) mini tableau—and more generally, within a ( κ · l ) × ( κ · l ) mini tableau, for some constant κ . The recurrence relation and Theorem 1 in Section 5.2 apply to this mini tableau.
Now, if the 3-SAT solver N * were solely responsible for tossing l coins, no further improvement in the worst-case runtime of the FHB algorithm would be possible. In reality, however, the tossed coins are made to correlate through the word w, which encodes the 3-SAT formula ϕ . For not all sequences of l coin tosses are valid—if any at all.

6.3. Properties of Computation

Appreciating that there is a correlation between the tosses amounts to recognizing the following two properties regarding the computation runs of N * on w:
  • The mini tableau captures all nondeterminism (coin tossing) inherent to N * , while also including subsequent deterministic computations.
    • Example 1: If four 1 bits are tossed consecutively, N * ’s tape head lands on c e l l [ 5 , 6 ] of Table 20 and immediately begins deterministic computation from row 6.
    • Example 2: If four 0 bits are tossed instead, N * uses almost the entire mini tableau to complete the coin tossing, reaching c e l l [ 13 , 6 ] , before starting deterministic computation in rows 14 onward.
  • The subsequent deterministic computation does not revisit column 6 or any column to its right. See Table 20. More generally, the rightmost column of the mini tableau, which is of length O ( l ) , contains exactly one state symbol (namely, q ^ 1 ).
    (a)
    Although the two hyphens and three dots in column 6 of Table 20 indicate multiple possible positions for a state symbol, only one state symbol can appear in any given computation. (Moreover, that symbol must be q ^ 1 .)
    (b)
    For each input formula ϕ and each placement of q ^ 1 in the rightmost column, we can determine (and thus preprogram) the position of the machine’s head—though not its state—in every subsequent row of the entire tableau. In other words, except for a significant portion of the mini tableau, every row of the tableau consists of a single empty cell with all other cells filled by crosses.

6.4. A Conservative but Insightful Theorem

Our thought experiment—initiated by the hypothesis that the compact Horn formula ψ s t e p η exists—combined with Theorem 1 from our initial cost analysis leads to a refined version of the FHB algorithm. This improved algorithm (rFHB) relies on the two properties discussed above. We introduce rFHB in the proof of the following theorem:
Theorem 2.
The runtime of rFHB, a refined version of the FHB algorithm, is bounded from above:
R ( n ) K f ( n , k ) ,
where K is a constant and
f ( n , k ) n 2 k 4 1 3 = n 2 k 3 1.59 .
Remark 14.
Arguably, we even have:
f ( n , k ) n 2 k 8 1 4 = n k 2 1.68 .
  • Proof Outline
Suppose N * runs in n k time. (Typically, k = 2 for an unsophisticated 3-SAT solver, and k = 1 otherwise.) Consider the corresponding n k × n k tableau. Based on the above discussion, we can refine the original FHB algorithm as follows:
  • Guess a row r ^ such that q ^ 1 @ ( r ^ , c ^ ) holds, where c ^ is the index of the rightmost column in the mini tableau—with c ^ = 6 in Table 20.
    • The guess results in crossing out many cells in the remainder of the tableau, as described previously in item 2 ( b ) .
    • The associated cell crossings are revoked when backtracking from the guess.
  • Let the original FHB algorithm operate in the ( 3 l + 2 ) × ( 3 l + 2 ) mini tableau, yet in adherence to guess q ^ 1 @ ( r ^ , c ^ ) , starting with the center row of that mini tableau. (Take one of the two center rows when 3 l + 2 is even).
  • For each state symbol injected by the FHB algorithm within the mini tableau, now also inject the corresponding state symbols outside the mini tableau (within the n k × n k tableau).
  • Backtracking in the FHB algorithm triggers backtracking of the corresponding state symbols injected outside the mini tableau.
The inferences from state symbols inside to outside the mini tableau must be pre-programmed. For example, if coin x 2 has been tossed to 1 early in the tableau, then—due to the preprogramming—the propagation’s state symbol (used when updating x 2 ’s truth value in w) is already known, deep down in the tableau. (Recall Remark 13 to grasp the underlying structure at work. After the coin-tossing stage—mostly beyond the confines of the mini tableau—the machine propagates the truth value of each propositional variable to the encoded 3-SAT formula w on the tape’s left side.)
A minor caveat is that, for any coin index j (where 1 j l ), there are O ( l ) ways to specify that coin x j was tossed to 1 (or alternatively, to 0). For instance, coin x 2 in Table 20 can land on 1 in two ways:
q ^ 1 @ ( 3 , 4 ) q ^ 1 @ ( 5 , 4 ) .
Each such case requires the symbol q s a t to be activated in a predetermined cell c * further down in the tableau:
q ^ 1 @ ( 3 , 4 ) q s a t @ c * q ^ 1 @ ( 5 , 4 ) q s a t @ c * ,
where the contents of cell c * encode the state of N * after scanning the first clause containing the literal x 2 .
Remark 15.
If multiple clauses in ϕ contain the literal x 2 , analogous Horn implications apply to each such clause. The total number of Horn constraints scales polynomially with l and the number of clauses in ϕ. Note: q s a t and q a c c e p t are distinct state symbols.
For a conservative cost analysis of the rFHB algorithm, it is important to note that the free hole-filling outside the mini tableau occurs in an area at least as large as the mini tableau. This implies that, at the very least, Δ = 1 4 rather than 1 2 . Consequently, we solve the following recurrence relation:
T ( m ) = c 0 · 2 m · T m 8 2 K m 1 3 ,
for some constant K. Finally, by substituting n 2 k 4 for m, we obtain the result:
K f ( n , k ) ,
with
f ( n , k ) n 2 k 4 1 3 = n 2 k 3 1.59 .
Remark 16.
While overly conservative, Theorem 2 with the exponent f ( n , k ) already demonstrates genuine compression compared to Theorem 1. Furthermore, if we set Δ = 1 8 —a choice the devil’s advocate might readily accept—the exponent of m decreases further from 1 3 to 1 4 , which leads to the improved definition of f ( n , k ) in Remark 14. The iterative application of the rFHB algorithm will be discussed in a forthcoming article.

7. Conclusions

In this paper, we depart from the classical top-down interpretation of a nondeterministic computation of N on an input w of length n, which runs in at most n k steps. In the worst case, this classical approach requires making a binary choice at each step, resulting in a deterministic time complexity of essentially 2 n k . Instead, we abstract away the complexity of enforcing N’s step-by-step behavior, hypothesizing that it can be succinctly represented by a Horn formula ψ s t e p η .
As a result, our focus shifts to a timeless tableau (with approximately n k rows and n k columns), in which the contents of each cell must be guessed. Now, we have increased the deterministic time complexity to 2 n 2 k . However, by leveraging a compression result related to the tableau and the behavior of the Turing machine’s head within it (recall formula ψ e x t r a η , which leads to Δ = 1 2 in Claim 3), we significantly reduce the search space. This ultimately results in a deterministic time complexity that is only slightly worse than the classical 2 n k result (see Theorem 1).
Next, we distinguish between a pure coin-tossing machine, to which the previously discussed time complexities apply, and an actual 3-SAT solver—a nondeterministic polynomial time Turing machine N * that generates not truly random bits but rather correlated bits. In other words, the computational behavior of N * within a tableau can be further compressed, achieving a reduction factor of at least Δ = 1 4 instead of Δ = 1 2 , leading to a strong compression result (Theorem 2). In future work, we will apply this result iteratively.
The core idea behind Δ = 1 2 can be summarized as follows. Consider an n k × n k tableau, initially empty. By selecting two specific cells, c * above and c * multiple rows below, where N’s head should be located, we can force a binary choice to collapse into a deterministic move. This contrasts with the scenario where only one of these cells is filled with a state symbol, or where two nearby cells are each filled with a state symbol, allowing for greater nondeterminism. Specifically, if only the top cell, c * , is filled with a state symbol, the machine can move both left and right. However, if a second cell, c * , is filled at an extreme relative position later in time, various movements earlier in time become restricted—only several rightward moves, for instance, remain feasible for the machine to go from cell c * to the lower cell c * .
To further improve the reduction factor from Δ = 1 2 to Δ = 1 4 , we leverage the fact that the nondeterministic Turing machines involved in NP computations are not pure coin-tossing machines. Instead, their state transitions exhibit structured dependencies across the tableau. For instance, if the state symbol in cell c * indicates that the machine has just tossed the second coin to 1 (in one of multiple ways) and is about to toss the third coin, this constrains the state symbol in a later cell c * . Due to several dependencies—embedded in the tableau’s deterministic substructure—the machine may then be forced to toss the next coin to 1 rather than 0. This long-range interaction preserves the computation’s satisfiability, though the underlying mechanism is very subtle. Crucially, N * ’s computation on w does not develop top-down but grows in an interleaved fashion across the tableau’s rows.
To recapitulate, an accepting tableau provides a framework for demonstrating the satisfiability of ψ , confirming that the nondeterministic polynomial time Turing machine N accepts the input word w. The propositional formula ψ consists of two components: ψ c e l l and ψ r e s t , both in 3cnf. Since ψ r e s t appears more challenging for satisfiability, this raises the question of whether distinguishing between 3cnf and 2cnf for ψ c e l l is consequential. In this paper, we have proven that if ψ r e s t can be compactly represented as a Horn formula, the gap between 3cnf and 2cnf for ψ c e l l becomes small: ψ can be satisfied efficiently in K f ( n , k ) steps, with f ( n , k ) n 2 3 k , where N operates in O ( n k ) steps and both k and K are constants.

Funding

There is no attached funding for this research.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Acknowledgments

Special thanks to Kurt De Grave for valuable discussions on parts of this paper and to Karel Dekimpe for initiating the geometric proof presented in Appendix C. I am also grateful to Jan Friso Groote for demanding more rigor in the cost analysis of a late version of this work. Additionally, I extend my appreciation to the three anonymous reviewers whose feedback over multiple rounds of review drastically improved this paper. Any remaining errors or omissions are solely my responsibility. For further updates, please visit https://dijkstrascry.com/pnp (accessed on 4 April 2025).

Conflicts of Interest

The author declares no conflicts of interest.

Appendix A

Definition A1.
Cf. [1] (p. 259, 271). Variables that can take on the values TRUE and FALSE are called Boolean variables. We represent TRUE by 1 and FALSE by 0. The Boolean operations  AND , OR , and NOT , represented by the symbols,, and ¬, respectively, are described in the standard manner. We use the overbar as a shorthand for the ¬ symbol, so x ¯ means ¬ x . A Boolean formula is an expression involving Boolean variables and operations. It is satisfiable if some assignment of 0s and 1s to the variables makes the formula evaluate to 1. We say the assignment satisfies ϕ . The satisfiability problem is to test whether a Boolean formula is satisfiable. Let SAT = ϕ ϕ is a satisfiable Boolean formula , where ϕ refers to a standard encoding of ϕ.
Definition A2.
Cf. [1] (p. 273). A literal is a Boolean variable or a negated Boolean variable, as in x or x ¯ . The former is called a positive literal, while the latter is called a negative literal. A clause is several literals connected withs, as in x 1 x 2 ¯ x 3 ¯ x 4 . A Boolean formula is in conjunctive normal form, called a cnf formula, if it comprises clauses with ∧s, as in x 1 x 2 ¯ x 3 ¯ x 4 x 3 x 5 ¯ x 6 x 3 x 6 ¯ . The Boolean formula is a 3cnf formula if each clause has three literals, as in x 1 x 2 ¯ x 3 ¯ x 3 x 5 ¯ x 6 x 3 x 6 ¯ x 4 . A 2cnf formula is an AND of clauses, where each clause is an OR of at most two literals.
Definition A3.
Cf. [7] (p. 34–35). A (propositional) Horn formula is a cnf formula where every disjunction contains at most one positive literal.
  • Also, HORNSAT = ϕ ϕ is a satisfiable Horn formula .
Remark A1.
Horn clauses can be written as implications by the following equivalence (≡):
x 1 ¯ x k ¯ x x 1 x k x
Theorem A1.
Cf. [7] (p. 35). HORNSAT P .
Definition A4.
Cf. Sipser [1] (p. 140). A deterministic Turing machine is an 8-tuple Q ,   Γ ,   Φ ,   δ ,   T ,   q 0 ,   q a c c e p t ,   q r e j e c t , with Q ,   Γ ,   Φ , T finite sets:
Q is the set of states, and Γ is the input alphabet not containing the blank symbol□.
Φ is the tape alphabet, where Φ and Γ Φ .
δ : Q × Φ Q × Φ × + , is the transition function.
Every transition in δ is accompanied by a distinct labelt.
T is the label set, containing all such labels.
q 0 Q is the start state.
q a c c e p t Q is the accept state. q r e j e c t Q is the reject state, with q r e j e c t q a c c e p t .
As a Turing machine computes, changes occur in the current state, the current tape contents, and the current head location. A setting of these three items is called a configuration of the Turing machine. The tape of the Turing machine is one-way infinite, from left to right. Specifically, for each input w 0 w 1 w n 1 of length n, machine M starts in configuration q 0 , for n = 0 , and in configuration w 0 q 0 w 1 w n 1 , for n > 0 . In both cases, the notation s q 0 , with s Φ , signifies that the head is located at the tape cell containing symbol s, while the machine resides in state q 0 . Machine M neither starts in q a c c e p t or q r e j e c t , nor progresses beyond either one of these states. Specifically, once M reaches q a c c e p t , it remains active solely in that state. Likewise for q r e j e c t . We take q a c c e p t to be some q m with m > 0 and similarly for q r e j e c t . Input word w is considered accepted when M on w reaches q a c c e p t . We write L M to denote the language accepted by M. We use notation t : q 1 , x q 2 , y , μ when referring to some transition in δ with label t T and movement μ + , . The plus sign (minus sign) signifies a movement to the right (to the left).
Definition A5.
Cf. Sipser [1] (p. 150). A nondeterministic Turing machine is an 8-tuple, Q , Γ , Φ , δ , T , q 0 , q a c c e p t , q r e j e c t . At any point in a computation, the machine may proceed according to several possibilities. The transition function for the machine has the form δ : Q × Φ P Q × Φ × + , , where P denotes the power set. The computation of the machine is a tree whose branches correspond to different possibilities for the machine. If some branch of the computation leads to the state q a c c e p t , the machine accepts its input.
In conformity with Definition A4, each transition in set δ is accompanied by a distinct label t, and T is now called the general label set, containing all such labels. For instance, consider notation t : q , x q 1 , y 1 , μ 1 , q 2 , y 2 , μ 2 , with label t T , states q , q 1 , q 2 Q , symbols x , y 1 , y 2 Φ , movements μ 1 , μ 2 + , , and with tuple q 1 , y 1 , μ 1 different from q 2 , y 2 , μ 2 . This notation captures the nondeterministic transition encompassing the deterministic transitions t 1 : q , x q 1 , y 1 , μ 1 and t 2 : q , x q 2 , y 2 , μ 2 . We define the basic label set, denoted as T [ ] , as the set that encompasses the labels of all deterministic transitions, such as t 1 and t 2 .

Appendix B

We present proofs of Lemmas 2–5—from Section 4.3. For compactness, we write a instead of N n e w . Furthermore, we assume the reader is familiar with the following formula:
i = 1 m i = m · ( m + 1 ) 2 .

Appendix B.1. Proof of Lemma 2

It is given that:
D n e w = 2 · a + 1 + 2 · i = 1 a 1 ( 2 · a + 1 2 · i ) .
We evaluate the big sum as follows:
i = 1 a 1 ( 2 · a + 1 2 · i ) = i = 1 a 1 ( 2 · a + 1 ) i = 1 a 1 ( 2 · i ) = ( a 1 ) · ( 2 · a + 1 ) ( a 1 ) · a = ( a 1 ) · ( a + 1 ) = a 2 1 .
Hence, we have:
D n e w = 2 · a + 1 + 2 · ( a 2 1 ) = 2 · a 2 + 2 · a 1 .

Appendix B.2. Proof of Lemma 3

It is given that:
D o l d = 4 · a + 1 + 2 · i = 1 2 · a 1 ( 4 · a + 1 2 · i ) .
We evaluate the big sum as follows:
i = 1 2 · a 1 ( 4 · a + 1 2 · i ) = i = 1 2 · a 1 ( 4 · a + 1 ) i = 1 2 · a 1 ( 2 · i ) = ( 2 · a 1 ) · ( 4 · a + 1 ) 2 · 1 2 · ( 2 · a 1 ) · 2 · a = ( 2 · a 1 ) · ( 2 · a + 1 ) = 4 · a 2 1 .
Hence, we have:
D o l d = 4 · a + 1 + 2 · ( 4 · a 2 1 ) = 8 · a 2 + 4 · a 1 .

Appendix B.3. Proof of Lemma 4

C r o s s = 2 · i = 0 a 1 ( a i ) = 2 · i = 0 a 1 a i = 0 a 1 i = 2 · a 2 ( a 1 ) · a 2 = 2 · a 2 a 2 + a = a 2 + a .

Appendix B.4. Proof of Lemma 5

D n e w + C r o s s = 2 · a 2 + 2 · a 1 + a 2 + a = 3 · a 2 + 3 · a 1 .

Appendix C

Concerning the general case discussed in Section 4.3.3, we present a proof in the continuous domain. Detailed figures are introduced progressively throughout this section.
We begin with an arbitrary rectangle rotated 45 clockwise, as shown in Figure A1. Readers are encouraged to verify that the lengths x, y, a, and b are appropriately assigned in the figure. Importantly, a b .
Remark A2.
If the reader considers a > b , a vertical mirror image of Figure A1 applies. Consequently, a symmetric counterpart to our proof also holds.
Figure A1. The slanted rectangle represents a maximum pocket of holes, which we enclose within a square to facilitate proving its properties.
Figure A1. The slanted rectangle represents a maximum pocket of holes, which we enclose within a square to facilitate proving its properties.
Symmetry 17 00677 g0a1
In Figure A2, the center row of the polygon (i.e., the slanted rectangle) is represented by a dashed horizontal line. The lengths z and c are introduced into our discussion, with c serving as a parameter ranging from 0 to M a x , where M a x will be specified shortly. The parameter c specifies the position of the crossing-cut along the dashed horizontal line. Note that all sharp angles depicted are either 45 or 90 . Specifically, we have:
2 · z 2 = c 2 .
Figure A2. Introducing z and c.
Figure A2. Introducing z and c.
Symmetry 17 00677 g0a2
In Figure A3, the cut is explicitly shown, with its center positioned c units from the left along the dashed horizontal line. This introduces two new lengths, d and e, related by the equation:
d = e + z .
Figure A3. Showing the cut.
Figure A3. Showing the cut.
Symmetry 17 00677 g0a3
Less straightforward is the first of the following equations:
e 2 = 2 · y x 2 2 = 1 2 · ( x 2 2 x y + y 2 ) ,
which can be derived from Figure A4. The two shaded triangles are congruent, with the length of the hypotenuse equal to e.
Furthermore, we can express x and y in terms of a and b, respectively, via:
a 2 = 2 · x 2 ,
b 2 = 2 · y 2 .
Hence, we can express e solely in terms of a and b. With some elementary algebra, we write:
e 2 = 1 2 · a 2 2 + b 2 2 2 a 2 · b 2 = 1 4 · a 2 + b 2 2 a b ,
and, due to a b , we obtain:
e = b a 2 .
Figure A4. Two congruent triangles (shaded).
Figure A4. Two congruent triangles (shaded).
Symmetry 17 00677 g0a4
Remark A3.
The reader can draw a right-angled triangle, with the dashed horizontal line in Figure A4 representing the hypotenuse of length M a x and two smaller sides, each of length a. Thus, we have M a x = 2 · a . So, we now know that parameter c ranges from 0 to 2 · a .

Appendix C.1. Outline

In the remainder of this appendix, we aim to express the area A of the shaded region in Figure A5 in terms of a, b, and c. Next, we will determine c m i n such that A [ c m i n ] is minimized. Finally, we calculate the ratio
A [ c m i n ] a · b ,
where a · b denotes the area of the slanted rectangle. Our goal is to derive a constant factor.

Appendix C.2. Calculate the Area

We calculate the area A as follows:
A = d · z + ( b d ) · ( a z )
A = ( a · b ) ( b · z ) + d · ( 2 · z a )
Since z = c 2 and d = e + z , we have:
A = ( a · b ) b · c 2 + e + c 2 · 2 · c 2 a
Since e = b a 2 , we have:
A = ( a · b ) b · c 2 + b a 2 + c 2 · 2 · c 2 a
Recall that area A is expressed in terms of parameter c for some fixed a and b. Hence, with some elementary algebra, we simplify the previous expression, resulting in:
A [ c ] = a 2 · ( a + b ) 2 · a · c + c 2 .
Figure A5. Area A is shaded.
Figure A5. Area A is shaded.
Symmetry 17 00677 g0a5

Appendix C.3. Identify cmin

We calculate A [ c ] , the derivative of A [ c ] , and obtain:
A [ c ] = 2 · c 2 · a .
Furthermore,
A [ c ] = 0 c = a 2 ,
and the second derivative is positive:
A [ c ] = 2 > 0 .
Hence, we have a local minimum of A [ c ] when c = c m i n = a 2 .
Remark A4.
Notably,
c m i n = M a x 2 ,
which, in retrospect, was to be expected.

Appendix C.4. Calculate A[cmin] and the Ratio

We compute A [ c m i n ] , as follows:
A a 2 = a 2 · ( a + b ) a 2 + a 2 2 = a · b 2 .
Next, we calculate the ratio, which confirms that it is indeed a constant:
A [ c m i n ] a · b = 1 2 .

Appendix D

We solve the following recurrence relation:
T ( m ) = c 0 · 2 m · T m 4 2

Appendix D.1. Step 1: Taking the Logarithm

Let S ( m ) = ln T ( m ) . The recurrence becomes:
S ( m ) = ln c 0 + 1 2 ln ( 2 m ) + 2 S m 4

Appendix D.2. Step 2: Solving the Linear Recurrence

Assume m = 4 k and define S k = S ( 4 k ) . The recurrence becomes:
S k = 2 S k 1 + ln c 0 + 1 2 ln 2 + k ln 2

Appendix D.3. Homogeneous Solution

The homogeneous solution is:
S k ( h o m ) = C · 2 k

Appendix D.4. Particular Solution

Assume a particular solution of the form S k ( p a r t ) = A + B k . Substituting:
A + B k = 2 ( A + B ( k 1 ) ) + ln c 0 + 1 2 ln 2 + k ln 2
Solving gives:
B = ln 2
A = 5 2 ln 2 ln c 0
Thus, the general solution is:
S k = C · 2 k 5 2 ln 2 ln c 0 k ln 2

Appendix D.5. Initial Condition

Using T ( 1 ) = c 1 , so S 0 = ln c 1 :
ln c 1 = C 5 2 ln 2 ln c 0
C = ln c 1 + 5 2 ln 2 + ln c 0

Appendix D.6. Step 3: Reverting Back to T(m)

Express S k in terms of m, where k = log 4 m :
S ( m ) = ln c 1 + 5 2 ln 2 + ln c 0 m 5 2 ln 2 ln c 0 ln m 2
Exponentiating to obtain T ( m ) :
T ( m ) = e ln c 1 + 5 2 ln 2 + ln c 0 m e 5 2 ln 2 + ln c 0 · m
T ( m ) = ( c 1 · 2 5 / 2 · c 0 ) m 2 5 / 2 · c 0 · m

Appendix D.7. Simplified Form

Let K = c 1 · c 0 · 2 5 / 2 . Then:
T ( m ) = K m c 0 · 2 5 / 2 · m

Appendix D.8. Verification

For m = 1 :
T ( 1 ) = K c 0 · 2 5 / 2 = c 1
which matches the initial condition.

Appendix D.9. Conclusions

The solution to the recurrence relation is:
T ( m ) = ( c 0 · c 1 · 2 5 / 2 ) m c 0 · 2 5 / 2 · m
where c 1 = T ( 1 ) is the initial condition. The dominant behavior is exponential in m .

References

  1. Sipser, M. Introduction to the Theory of Computation; Thomson Course Technology: Sydney, Australia, 2006. [Google Scholar]
  2. Papadimitriou, C. Computational Complexity; Addison Wesley Longman: Boston, MA, USA, 1994. [Google Scholar]
  3. Hopcroft, J.; Motwani, R.; Ullman, J. Introduction to Automata Theory, Languages, and Computation; Addison Wesley/Pearson Education: London, UK, 2007. [Google Scholar]
  4. Aaronson, S. Quantum Computing since Democritus; Cambridge University Press: Cambridge, UK, 2013. [Google Scholar]
  5. Cook, S. The Complexity of Theorem-Proving Procedures. In Proceedings of the 3rd Annual ACM Symposium on Theory of Computing. Association for Computing Machinery, Shaker Heights, OH, USA, 3–5 May 1971; pp. 151–158. [Google Scholar]
  6. Dean, W. Computational Complexity Theory. In The Stanford Encyclopedia of Philosophy; The Metaphysics Research Lab: Stanford, CA, USA, 2016. [Google Scholar]
  7. Grädel, E. Complexity Theory: WS 2009/10; Mathematische Grundlagen der Informatik, RWTH Aachen: Aachen, Germany, 2009. [Google Scholar]
  8. Daylight, E. Capturing Nondeterminism with Accepting Observer Systems. To appear. Available online: https://dijkstrascry.com/pnp (accessed on 4 April 2025).
  9. Dowling, W.; Gallier, J. Linear-Time Algorithms for Testing the Satisfiability of Propositional Horn Formulae. J. Log. Program. 1984, 1, 267–284. [Google Scholar] [CrossRef]
  10. Shapiro, S. Acceptable notation. Notre Dame J. Form. Log. 1982, 23, 14–20. [Google Scholar] [CrossRef]
  11. Daylight, E. Dijkstra’s Rallying Cry for Generalization: The Advent of the Recursive Procedure, late 1950s–early 1960s. Comput. J. 2011, 54, 1756–1772. [Google Scholar] [CrossRef]
Figure 1. A square of ( n k + 1 ) × ( n k + 1 ) cells constitutes the tableau. We use the straight lines from the two crosses—one in the top row and the other in the bottom row—to cut the tableau.
Figure 1. A square of ( n k + 1 ) × ( n k + 1 ) cells constitutes the tableau. We use the straight lines from the two crosses—one in the top row and the other in the bottom row—to cut the tableau.
Symmetry 17 00677 g001
Figure 2. Workflow: We approach the problem conceptually, proceeding in a clockwise direction. By leveraging symmetry, we reduce the problem by half and then further refine by seeking additional symmetry within the remaining portion.
Figure 2. Workflow: We approach the problem conceptually, proceeding in a clockwise direction. By leveraging symmetry, we reduce the problem by half and then further refine by seeking additional symmetry within the remaining portion.
Symmetry 17 00677 g002
Figure 3. Plot of the ratio D n e w D o l d in function of N n e w .
Figure 3. Plot of the ratio D n e w D o l d in function of N n e w .
Symmetry 17 00677 g003
Figure 4. Pay close attention to the lengths a and b of the slanted rectangle, as well as the parameter c, which ranges from 0 to 2 · a and determines the position of the crossing cut along the dashed horizontal line.
Figure 4. Pay close attention to the lengths a and b of the slanted rectangle, as well as the parameter c, which ranges from 0 to 2 · a and determines the position of the crossing cut along the dashed horizontal line.
Symmetry 17 00677 g004
Table 1. A tableau: an n k × n k + 3 matrix.
Table 1. A tableau: an n k × n k + 3 matrix.
q 0 w 0 w 1 w 2 w n 1
Table 2. The effect of instruction t a b is shown on the left, while the effect of instruction t a c is displayed on the right, with both figures read from top to bottom. Column indices range from j 1 to j + 1 .
Table 2. The effect of instruction t a b is shown on the left, while the effect of instruction t a c is displayed on the right, with both figures read from top to bottom. Column indices range from j 1 to j + 1 .
a q 1 a a q 1 a
q 2 ab ac q 3
j 1 j j + 1 j 1 j j + 1
Table 3. Crossing out 57 cells out of a total of 10 × 11 = 110 cells.
Table 3. Crossing out 57 cells out of a total of 10 × 11 = 110 cells.
×××××
××××××
××××××× ×
i×××××××× q 5 ××
××××××× ×
××××××
×××××
××××
×××
××
j
Table 4. Crossing out 59 cells out of a total of 10 × 11 = 110 cells.
Table 4. Crossing out 59 cells out of a total of 10 × 11 = 110 cells.
×××
××××
×××××
i××××××
××××××× ×
i 2 ×××××××× q 5 ××
××××××× ×
××××××
×××××
××××
j
Table 5. Crossing out 50 cells out of a total of 10 × 11 = 110 cells.
Table 5. Crossing out 50 cells out of a total of 10 × 11 = 110 cells.
× ×
×× ××
i××× ×××
×××× ××××
i 2 ××××× q 5 ×××××
×××× ××××
××× ×××
×× ××
× ×
j
Table 6. Crossing out 113 cells out of 15 × 16 = 240 cells.
Table 6. Crossing out 113 cells out of 15 × 16 = 240 cells.
1×
×× ×
××× ××
×××× ×××
5××××× ××××
×××××× ×××××
××××××× ××××××
8×××××××× q 5 ×××××××
××××××× ××××××
10×××××× ×××××
××××× ××××
×××× ×××
××× ××
×× ×
15×
12345678910111213141516
Table 7. Second intervention in row 4: crossing out 41 boldfaced cells out of 63 cells in rows 1–7.
Table 7. Second intervention in row 4: crossing out 41 boldfaced cells out of 63 cells in rows 1–7.
1×××××××× ×
××××××××× ××
×××××××××× ×××
××××××××××× q 9 ××××
5×××××××××× ××××
××××××××× ×××××
×××××××× ××××××
8×××××××× q 5 ×××××××
××××××× ××××××
10×××××× ×××××
××××× ××××
×××× ×××
××× ××
×× ×
15×
12345678910111213141516
Table 8. A total of 120 crossed-out cells out of 240 cells due to ψ s t a r t .
Table 8. A total of 120 crossed-out cells out of 240 cells due to ψ s t a r t .
1 q 0 ×××××××××××××××
××××××××××××××
×××××××××××××
××××××××××××
5 ×××××××××××
××××××××××
×××××××××
8 ××××××××
×××××××
10 ××××××
×××××
××××
×××
××
15 ×
12345678910111213141516
Table 9. Base case, resolved deterministically.
Table 9. Base case, resolved deterministically.
1××××××××× q 6 ××××××
×××××××××× q 7 ×××××
××××××××××× q 8 ××××
×××××××××××× q 9 ×××
5××××××××××× q 10 ××××
×××××××××× q 11 ×××××
×××××××× ××××××
8×××××××× q 5 ×××××××
12345678910111213141516
Table 10. Base case: a true binary choice, resolved by an external user.
Table 10. Base case: a true binary choice, resolved by an external user.
1××××××××× q 6 ××××××
×××××××××× q 7 ×××××
××××××××××× q 8 ××××
×××××××××××× q 9 ×××
5××××××××××× q 10 ××××
×××××××××× q 11 ×××××
××××××××× ××××
8×××××××××× q 5 ×××××
12345678910111213141516
Table 11. Base case: true binary choices, resolved by an external user.
Table 11. Base case: true binary choices, resolved by an external user.
100××××××××× q 6 ××××××
×××××××××× q 7 ×××××
××××××××××× q 8 ××××
×××××××××××× q 9 ×××
105××××××××××× q 10 ××××
×××××××××× q 11 ×××××
××××××××× ××××
108×××××××××× q 5 ×××××
12345678910111213141516
Table 12. Symmetry in full display, where “ q a c c ” is an abbreviation for “ q a c c e p t ”.
Table 12. Symmetry in full display, where “ q a c c ” is an abbreviation for “ q a c c e p t ”.
1×××××××× q 0 ×××××××
2××××××× ×××××××
3×××××× ××××××
4××××× ×××××
5×××× ××××
6××× ×××
7×× ××
8× ×
9
10× ×
11×× ××
12××× ×××
13×××× ××××
14××××× ×××××
15×××××× ××××××
16××××××× ×××××××
17×××××××× q a c c ××××××××
1234567891011121314151617
Table 13. Injecting symbol q 5 towards the left in row 9.
Table 13. Injecting symbol q 5 towards the left in row 9.
1×××××××× q 0 ×××××××
2××××××× ×××××××
3×××××× ×××××××
4××××× ××××××××
5×××× ×××××××××
6××× ××××××××××
7×× ×××××××××××
8×× ××××××××××××
9××× q 5 ×××××××××××××
10×× ××××××××××××
11×× ×××××××××××
12××× ××××××××××
13×××× ×××××××××
14××××× ××××××××
15×××××× ×××××××
16××××××× ×××××××
17×××××××× q a c c ××××××××
1234567891011121314151617
Table 14. Injecting symbol q 5 in the center of row 9.
Table 14. Injecting symbol q 5 in the center of row 9.
1×××××××× q 0 ×××××××
2××××××× ×××××××
3×××××× ××××××
4××××× ×××××
5×××× ××××
6××××× ×××××
7×××××× ××××××
8××××××× ×××××××
9×××××××× q 5 ××××××××
10××××××× ×××××××
11×××××× ××××××
12××××× ×××××
13×××× ××××
14××××× ×××××
15×××××× ××××××
16××××××× ×××××××
17×××××××× q a c c ××××××××
1234567891011121314151617
Table 15. A diamond, consisting of dots and state symbols.
Table 15. A diamond, consisting of dots and state symbols.
1 q 0
2 ···
3 ·····
4 ·······
5 ·········
6 ·······
7                     ·····
8 ···
9              q 5                                 
1234567891011121314151617
Table 16. The dots constitute skewed polygon P o l d .
Table 16. The dots constitute skewed polygon P o l d .
1 q 0
2 ···
3 ·····
4 ·······
5 ·········
6 ·········
7 ·········
8 ·········
9 ·········
10 ·········
11 ·········
12 ·········
13·········
14 ·······
15 ·····
16 ···
17 q 5
56789101112131415161718192021
                                                                    
Table 17. A skewed intervention in row 9 with regard to skewed polygon P o l d .
Table 17. A skewed intervention in row 9 with regard to skewed polygon P o l d .
1 q 0
2 ···
3 ····×
4 ····×××
5 ····×××××
6 ····×××××
7 ····×××××
8 ×···×××××
9 ××× q 6 ×××××
10 ×××···×××
11 ×××·····×
12 ×××······
13×××······
14 ×······
15 ·····
16 ···
17 q 5
56789101112131415161718192021
                                                                    
Table 18. A symmetric intervention in row 9 with regard to skewed polygon P o l d .
Table 18. A symmetric intervention in row 9 with regard to skewed polygon P o l d .
1 q 0
2 ···
3 ·····
4 ·······
5 ·········
6 ××·······
7 ××××·····
8 ××××××···
9 ×××××××× q 6
10 ××××××××·
11 ××××××××·
12 ××××××××·
13××××××××·
14 ××××××·
15 ××××·
16 ××·
17 q 5
56789101112131415161718192021
                                                                    
Table 19. An upper bound on the ratio D n e w D o l d in function of N n e w .
Table 19. An upper bound on the ratio D n e w D o l d in function of N n e w .
N n e w D n e w D n e w D o l d max
130.600
2110.647
3230.657
4390.661
208390.666
3018590.667
Table 20. Tossing four coins from left to right.
Table 20. Tossing four coins from left to right.
1# #
2
3
4
5 ·
6 ·
7 ·
8 ·
9 ·
10
11 ·
12
13
14# #
123456
                                                            
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Daylight, E.G. Tableau with Holes: Clarifying NP-Completeness. Symmetry 2025, 17, 677. https://doi.org/10.3390/sym17050677

AMA Style

Daylight EG. Tableau with Holes: Clarifying NP-Completeness. Symmetry. 2025; 17(5):677. https://doi.org/10.3390/sym17050677

Chicago/Turabian Style

Daylight, Edgar Graham. 2025. "Tableau with Holes: Clarifying NP-Completeness" Symmetry 17, no. 5: 677. https://doi.org/10.3390/sym17050677

APA Style

Daylight, E. G. (2025). Tableau with Holes: Clarifying NP-Completeness. Symmetry, 17(5), 677. https://doi.org/10.3390/sym17050677

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop