The Structure and Degrees of Polynomials Computing Square Roots $\mod p$
Foivos Chnaras, Noah Kupinsky
TL;DR
The paper analyzes polynomials over F_p that compute square roots on the set of nonzero squares, establishing tight degree bounds and revealing the structure of minimal-degree polynomials. It introduces Tonelli–Shanks polynomials, proves a monomial-structure criterion that guides degree limits, and develops a Fourier/Lagrange framework to encode coefficients via sign patterns. A central contribution is the precise description of TS-degree distribution, the exact top-degree counts, and a robust heuristic (rooted in signed half sums and Littlewood–Offord) that predicts minimal degrees, supported by computations. The results illuminate the algebraic-combinatorial landscape of square-root computations in finite fields and yield practical insights into constructing minimal-degree root-polynomials via a tree-based approach.
Abstract
For an odd prime $p$, we say a polynomial $f\in \mathbb F_p[X]$ computes square roots if $f(a)^2=a$ for all nonzero, perfect squares $a\in \mathbb F_p$. When $p\equiv 3 \mod 4$, it is easy to see that $f(X)=X^{\frac{p+1}{4}}$ is the smallest such polynomial. For $p\equiv 1 \mod 4$, the situation is less clear. Tonelli-Shanks offers an algorithm for constructing polynomials that compute square roots, but the question of whether their degree is minimal remains. In this paper, we study the various degrees and structures of polynomials computing square roots.
