\documentclass[11pt]{article} \usepackage[letterpaper,hmargin=1in,vmargin=0.9in]{geometry} \usepackage{amsmath,amssymb,amsthm} \usepackage[hidelinks]{hyperref} \hypersetup{ pdftitle={Exact Deletion Thresholds for Equality in 1-Factorized Not-All-Equal Gadgets}, pdfsubject={Version 0.2 for public mathematical audit}, pdfauthor={Roberto Montegu} } \newtheorem{theorem}{Theorem} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{proposition}[theorem]{Proposition} \newcommand{\NAE}{\operatorname{NAE}} \title{Exact Deletion Thresholds for Equality\\ in 1-Factorized Not-All-Equal Gadgets} \author{Roberto Montegu} \date{Version 0.2 \quad December 2, 2026} \begin{document} \maketitle \begin{abstract} A 1-factorization of a complete graph on an even number \(t\) of vertices gives a ternary not-all-equal gadget. Each perfect matching is assigned a separate Boolean terminal, which is used as the third site of every constraint in the matching. We compute the minimum number of violated constraints for each prescribed terminal assignment. If \(q\) of the \(t-1\) terminals are negative, the minimum is \(q(t-1-q)/2\), independently of the factorization. It follows that \(t/2-2\) is the sharp worst-case deletion tolerance for terminal equality. For partial matchings the exact violation count also depends on a cut in the graph of unused pairs. This gives polynomial-time feasibility at the critical deletion budget and for each fixed amount by which it is exceeded. At the first budget that can destroy equality we classify the destructive deletion sets of a complete factorization. We also give a recognition and verification procedure for isolated signed components and supply executable checks. \end{abstract} \noindent\textbf{Keywords.} 1-factorization, hypergraph bicoloring, not-all-equal constraints, deletion, equality gadget. \section{Introduction} A ternary not-all-equal constraint, written \(\NAE(x,y,z)\), requires its three Boolean values to include both colors. Such constraints connect Boolean satisfiability and hypergraph bicoloring \cite{Schaefer,LinearNAE}. The Fano plane with one line removed gives a classical three-terminal equality gadget. Every bicoloring of the six retained lines must make the removed line monochromatic. This argument is part of the more general NAE-backbone lemma of Porschen et al.\ \cite[Lemma~2]{LinearNAE}. The incidence structure considered here is also familiar from the doubling construction for Steiner triple systems. In that construction, one labels the perfect matchings of a complete graph by the old vertices and makes triples from each matching edge and its label \cite{Doubling}. We study precisely this layer of triples, with terminal colors prescribed and without imposing any triples among the terminals. The resulting questions concern how many constraints a boundary condition must violate, and how arbitrary deletions change the exact relation on the terminals. The pair-count balance for extended bicolorings in \cite[Theorem~1]{Doubling} has a direct relation to our complete case. Substituting the two internal color counts \((a,t-a)\) and the terminal color counts \((t-1-q,q)\) into their equation~(1) makes the left-hand side minus the right-hand side equal to \(4[D(q)+G(a-q)]\), four times our complete-case violation count. We obtain the exact correction for an incomplete layer by counting the crossing pairs left unused by its triples. This works even when a partial family of matchings cannot be completed to a 1-factorization. \section{Setup} Let \(t\ge 4\) be even, let \(b=t-1\), and let \(I\) and \(P\) be disjoint sets of \(t\) internal sites and \(b\) terminals. A \emph{matching system} is a family \((M_p)_{p\in P}\) of matchings of the complete graph on \(I\). No internal edge belongs to two matchings. Each edge \(\{u,v\}\in M_p\) gives the constraint \(\NAE(u,v,p)\). Write \[ r=\binom{t}{2}-\sum_{p\in P}|M_p|. \] We call the system \emph{complete} if \(r=0\). In that case each \(M_p\) is perfect and the family is a 1-factorization. More generally \(r\) counts the unused internal edges, regardless of whether the current matchings admit a completion. Use the colors \(+\) and \(-\). For an assignment, let \(a\) be the number of positive internal sites and \(q\) the number of negative terminals. Define \[ D(q)=\frac{q(b-q)}2,\qquad G(z)=\frac{z(z-1)}2 . \] Both are nonnegative integers for the arguments used here. In particular, \(b\) is odd, so \(q(b-q)\) is even. Let \(F\) be the graph on \(I\cup P\) consisting of all pairs with at least one internal site. For every retained triple, remove its three edges from \(F\). The remaining graph \(H\) is the \emph{unused-pair graph}. The triple edge sets are disjoint: an internal pair occurs in at most one matching, and an internal site occurs at most once in a given matching. Since \(|E(F)|=\binom{t}{2}+tb=3\binom{t}{2}\), the graph \(H\) has \(3r\) edges. \section{The exact violation identity} \begin{theorem}\label{thm:formula} Let \(A\subseteq I\cup P\) be the positive sites of an assignment and let \(U\) be the number of violated retained constraints. Then \begin{equation}\label{eq:formula} U=D(q)+G(a-q)-r+\frac{|\delta_H(A)|}{2}, \end{equation} where \(\delta_H(A)\) is the set of unused pairs with endpoints of different colors. All degrees in \(H\) are even. \end{theorem} \begin{proof} The degrees in \(F\) are \(2t-2\) at internal sites and \(t\) at terminals. Removing the three pairs of a triple reduces the degree of each of its sites by two. This proves the degree claim, which also implies that every cut of \(H\) has even size. The edges of \(F\setminus H\) are partitioned into triangles, one for each retained triple. A monochromatic triangle contributes no crossing edges. Every other triangle contributes exactly two. Thus \[ U=\binom{t}{2}-r-\frac{|\delta_F(A)|-|\delta_H(A)|}{2}. \] The cut size in \(F\) is \(a(t-a)+aq+(t-a)(b-q)\). Substituting \(b=t-1\) and collecting terms gives \eqref{eq:formula}. \end{proof} \begin{corollary}\label{cor:complete} In a complete system, for a prescribed terminal word with \(q\) negative terminals, the minimum violation count is \(D(q)\). The minimum is attained precisely by assignments with \(a=q\) or \(a=q+1\). In fact, the polynomial counting internal assignments by their violation count is \[ \sum_{a=0}^{t}\binom{t}{a}\,z^{D(q)+G(a-q)}. \] \end{corollary} \begin{proof} Set \(r=0\) in \eqref{eq:formula}. The term \(G(a-q)\) vanishes exactly at the two indicated values of \(a\), both in \([0,t]\). The identity depends only on \(a\) and \(q\). There are \(\binom{t}{a}\) internal assignments of weight \(a\). \end{proof} Consequently a complete block has exactly \(2(t+1)\) satisfying assignments. Its optimal boundary cost is half the size of the cut determined by the terminal word in the complete graph on \(P\). \section{Sharp deletion bounds} \begin{corollary}\label{cor:budget} If a matching system with deficit \(r\) admits a terminal word with \(q\) negative terminals, then \(r\ge D(q)\). Conversely, given any complete system and any prescribed terminal word of that weight, deleting \(D(q)\) constraints suffices for the word to become admissible. In particular, deleting any \(t/2-2\) constraints preserves terminal equality, and \(t/2-1\) deletions can destroy it in every complete system. \end{corollary} \begin{proof} The first statement follows from \eqref{eq:formula} because \(U=0\) and both \(G(a-q)\) and the cut term are nonnegative. For the converse, take an optimal internal assignment from Corollary~\ref{cor:complete} and delete exactly its violated constraints. For a nonconstant word, the minimum of \(D(q)\) for \(1\le q\le b-1\) is \(D(1)=t/2-1\). The two constant words always admit an extension by coloring all internal sites oppositely to the terminals. \end{proof} The same lower bound applies to arbitrary partial systems. In the encoding by two complementary CNF clauses per triple, each monochromatic triple violates exactly one clause. From a complete system, the minimum number of individual CNF clauses that must be deleted to admit a prescribed word is therefore also \(D(q)\). For the upper bound, delete one falsified clause from each triple violated by a minimizing assignment. \begin{proposition}\label{prop:classification} Write \(n=t/2\). In a complete system, delete exactly \(n-1\) triples. A nonconstant terminal assignment is possible exactly for deletion sets of at least one of the following forms: \begin{enumerate} \item Delete \(n-1\) edges of a single matching \(M_p\). \item Delete \(n-2\) edges of a matching \(M_p\), leaving two edges there. Also delete a triple from another matching whose internal edge joins an endpoint of one retained edge of \(M_p\) to an endpoint of the other. \end{enumerate} Here deleting an edge from a matching refers to deleting its corresponding triple. For \(t=4\), the second form gives no additional deletion sets. \end{proposition} \begin{proof} Up to reversing all colors, a nonconstant word admissible at this budget has one negative terminal \(p\). Indeed, for \(2\le q\le b/2\), \(D(q)\ge D(2)=t-3>n-1\) when \(t\ge6\), and \(q=1\) is the only minority size when \(t=4\). In the complete system the assignment violates at least \(n-1\) triples. Every violation must be among the \(n-1\) deletions. Corollary~\ref{cor:complete} therefore gives \(a=1\) or \(a=2\). If \(a=1\), the only violated triples belong to \(M_p\). They are all its edges except the one incident to the positive internal site. If \(a=2\) and the two positive internal sites are matched in \(M_p\), all edges of \(M_p\) except their common edge are violated. If they belong to two separate edges in \(M_p\), exactly the other \(n-2\) edges of \(M_p\) are violated there. Their common edge is in a different matching, whose terminal is positive. It gives the only additional violation. Conversely, choose one endpoint of the retained edge as the sole positive internal site in the first form. In the second form choose the two endpoints of the cross edge as the positive internal sites. These assignments realize the specified violations. \end{proof} For \(n\ge4\), the number of destructive sets at this budget is \[ bn+4b\binom{n}{2}=nb^2. \] In the second form the matching with \(n-2\) deletions is uniquely identified. Its two retained edges offer four cross pairs. For \(n=3\), a deletion set of the second form consists of two disjoint edges from distinct matchings. It is counted twice by the expression \(4b\binom{n}{2}\), once from either matching. Including the first form gives \(45\) destructive sets. For \(n=2\), all six singleton deletions are destructive. \section{Deciding feasibility near a critical budget} \begin{proposition}\label{prop:algorithm} Given a matching system and \(q\in\{0,\ldots,b\}\), one can decide whether a satisfying assignment with \(q\) negative terminals exists in polynomial time whenever \(r-D(q)\) is a fixed nonnegative constant. This also holds with a prescribed terminal word. At \(r=D(q)\) the decision reduces to a component count in \(H\) and a dynamic program over at most two cardinalities. \end{proposition} \begin{proof} Write \(k=r-D(q)\). At \(k=0\), \eqref{eq:formula} requires \(a\in\{q,q+1\}\) and \(\delta_H(A)=\varnothing\). Thus components of \(H\) are monochromatic. With a prescribed word, a component containing terminals of opposite signs is impossible. Other terminal-containing components have a fixed sign. For each remaining component record its internal size. Subset sum with target \(a\le t\), after subtracting the forced positive size, determines feasibility. If the terminal word is free, use two coordinates for each component, its internal size and its terminal size. The desired total number of positive terminals is \(b-q\). A table of \(O(t^2)\) size for \(O(t)\) components suffices. If \(k>0\), enumerate edge subsets \(J\subseteq E(H)\) of size at most \(2k\). Force each component of \(H-J\) to have one color as above. Check all internal weights \(a\) with \[ G(a-q)+|J|/2\ \le\ k . \] A resulting assignment has \(\delta_H(A)\subseteq J\), so \eqref{eq:formula} gives \(U\le0\), hence \(U=0\). Conversely, every satisfying assignment appears in the case \(J=\delta_H(A)\) and meets the displayed bound with equality. Thus the algorithm is complete. The number of enumerated subsets is at most \(\sum_{j=0}^{\min(2k,3r)}\binom{3r}{j}\). This is polynomial for fixed \(k\). The exponent of this bound is allowed to depend on \(k\). \end{proof} At the first potentially destructive deletion budget, \(r=t/2-1\), Proposition~\ref{prop:algorithm} decides whether equality survived even for a partial system supplied without a completion. One tests minority size one and uses the connected components of \(H\). \section{Recognition and certificates from signed clauses} A signed NAE constraint can be represented by two clauses whose literals are complementary. The signs of the three literals are determined up to negating all three. For a collection of these pairs, a single sign choice for each site normalizes all of its triples precisely when the corresponding relative sign equations on pairs are consistent. A graph traversal solves the sign equations. The results above then apply to the normalized colors. To recognize an isolated matching system within the robust budget, first extract opposite clause pairs and form their graph on sites, joining sites that appear in a common triple. Suppose each triple of the system has one opposite pair and \(r\le t/2-2\). All sites of such a system lie in one connected component. Indeed, the internal graph is a complete graph with \(rt/2\) triples. The incidence counts therefore identify both sets without guessing an interface. The certificate specifies the signed sites and the triples of each matching. A verifier checks the size conditions, the presence of both clauses for every selected triple, membership in matchings, disjointness of internal edges, and the bound on \(r\). Its checks are polynomial in the explicit input size. A verified block implies equality of its signed terminals even in the presence of other constraints. When the block's internal sites occur only in those selected clauses, the block can be replaced by equality exactly. An extension assigns the opposite normalized color to all its internal sites. Recognition described here is guaranteed for the indicated isolated components. A provided certificate can also be verified within a larger component. \section{Reproducibility and scope} The \href{https://github.com/robertomontegu/nae-equality-gadgets/tree/v0.2}{versioned GitHub artifact} contains a dependency-free Python implementation and a deterministic audit in \texttt{auditoria/}. Run \texttt{python3 -B audit.py} there to regenerate the recorded JSON results. The audit checks \(34{,}944\) assignments of complete systems with \(t\in\{4,6,8\}\) and \(104{,}704\) assignments of selected partial systems. It compares all \(424\) small deletion sets within the universal tolerance and checks the classification at the first destructive budget. Direct enumeration also corroborates \(11{,}318\) queries at the critical budget and \(216\) at one deletion above it. In the largest signed recognition test, the verifier accepts a block with \(64\) internal sites, \(63\) terminals, and \(30\) deleted triples. The deductions for all \(t\) use the proofs above. The results concern the stated matching systems and the certificates they yield when recognized. The recognition and cut identity are local components of constraint reasoning. They give a polynomial-time decision procedure for the stated feasibility problem near a critical budget. \paragraph{Provenance and use of generative AI.} Roberto Montegu directed the investigation and requested the successive tests. \mbox{OpenAI} Codex produced the English manuscript and contributed substantially to the mathematical derivations, proof checks, Python implementation, and computational audit. The contributor reports that human review of the proofs is pending. The manuscript and audit are available for independent scrutiny. \paragraph{License.} The manuscript is licensed under \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons Attribution 4.0 International}. The audit code is distributed under the MIT License. \begin{thebibliography}{9} \bibitem{Schaefer} T.~J. Schaefer. The complexity of satisfiability problems. \emph{Proceedings of the 10th ACM Symposium on Theory of Computing}, 216--226, 1978. \href{https://doi.org/10.1145/800133.804350}{doi:10.1145/800133.804350}. \bibitem{LinearNAE} S.~Porschen, T.~Schmidt, E.~Speckenmeyer, and A.~Wotzlaw. XSAT and NAE-SAT of linear CNF classes. \emph{Discrete Applied Mathematics}, 167:1--14, 2014. \href{https://doi.org/10.1016/j.dam.2013.10.030}{doi:10.1016/j.dam.2013.10.030}. \href{https://kups.ub.uni-koeln.de/55020/1/zaik632.pdf}{Author manuscript}. \bibitem{Doubling} M.~Gionfriddo, E.~Guardo, and L.~Milazzo. Extending bicolorings for Steiner triple systems. \href{https://arxiv.org/abs/1106.1762v3}{arXiv:1106.1762v3}, 2013. \end{thebibliography} \end{document}