LINEAR ALGORITHM AND DENSITY ASYMPTOTICS FOR HUANG'S QUADRATIC FORM
Let $G = \mathbb{N} \setminus \langle a, b \rangle$ be the gap set of the numerical semigroup generated by coprime $a < b$, and $N = |G|$. Yifeng Huang (2026) defined the quadratic form $Q(n) = \sum K(j-i) n_i n_j$ on $\mathbb{R}^G$, where $K(d) = 1_{d \geq 0} - 1_{d \geq a} - 1_{d \geq b} + 1_{d \geq a+b}$, and showed that it recovers the dinv statistic on rational Dyck paths. The naive evaluation of $Q$ requires $O(N^2)$ operations. This paper extends these findings in two main directions: Linear-Time Evaluation ($O(N)$ Algorithm): We prove that the interval structure of $K$ allows one to reduce $Q$ to a linear combination of sliding-window sums, yielding an $O(N)$ algorithm (Theorem 1.1). Generalization to $n$ Generators: We generalize the framework to semigroups $\langle p_1, ..., p_n \rangle$ with $n$ generators. The generalized kernel $K^{(n)}$, defined by inclusion-exclusion with $2^n$ terms, has at most $w(n) \leq \sigma_n$ active windows due to parity cancellation. These windows are computable incrementally in time $O(n \cdot \sigma_n)$ (Theorem 1.2). Empirically, $w(n) \sim \sigma_n$ while $w(n) \ll 2^n$: exponential combinatorics reduces to a sparse interval structure. For a sequence of pairwise distinct integers $p_i \geq 2$ satisfying $\log p_n = o(n)$, we prove that the density of active windows becomes asymptotically negligible relative to the semigroup density (Theorem 1.5): $$\frac{w(n)}{2^n - 1} = o\left(\prod_{i=1}^{n} \left(1 - \frac{1}{p_i}\right)\right), \qquad n \to \infty$$
Authors
- ARTUR FLAMANDZKI
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-05-17
- DOI
- https://doi.org/10.5281/zenodo.20261426
- Primary Topic
- Commutative Algebra and Its Applications
- Type
- preprint