[Paper Review] Sharpening "Primes is in P" for a large family of numbers
This paper presents deterministic primality tests for integers n ≡ 1 (mod 4) with a given a satisfying (a|n) = −1, and n ≡ −1 (mod 4) with a given a satisfying (a|n) = (1−a|n) = −1. The algorithms exploit algebraic structures in finite fields and reduce verification complexity using monomial congruences modulo (n, x^{2s} − a), achieving up to ˜O(log n)^4 time when k = ν₂(n−1) or ν₂(n+1) exceeds 2 log log n, significantly improving on the AKS algorithm’s ˜O(log n)^12 runtime in favorable cases.
We give Deterministic Primality tests for large families of numbers. These tests were inspired in the recent and celebrated Agrawal-Kayal-Saxena (AKS) test. The AKS test has proved polynomial complexity O ((log n)^12) and they expect it to be O ((log n)^6) . Our tests have proved complexity O ((log n)^6). The complexity decreases to O ((log n)^4) as the power of 2 dividing n + 1 or n - 1 increases. On large enough primes, our tests, in their worst case, run at least 2^9 times faster than the AKS test.
Motivation & Objective
- To develop faster deterministic primality tests than the AKS algorithm for a large, dense family of integers.
- To address the limitation of AKS’s high polynomial degree by exploiting structural properties of numbers where ν₂(n±1) is large.
- To generalize and improve upon existing tests like the Proth and Lucas-Lehmer tests by relaxing the requirement on ν₂(n−1) or ν₂(n+1).
- To reduce the number of polynomial congruence verifications by leveraging automorphisms in finite fields and monomial symmetry.
- To provide a framework that adapts complexity based on the 2-adic valuation k = ν₂(n−1) or ν₂(n+1), achieving near-optimal performance when k is large.
Proposed method
- Use of monomial congruences (1 + mx)^n ≡ 1 + mx^n (mod n, x^{2s} − a) for s = ⌈2 log log n⌉, replacing the AKS-style (m + x)^n ≡ m + x^n (mod n, x^r − 1).
- Reduction of the number of required m values from 2√r log n to 2^{max(s−k,0)} by exploiting field automorphisms that preserve monomial structure.
- Leveraging the fact that conjugates of 1 + mx^n under Galois automorphisms also satisfy the same congruence, enabling batch verification.
- Defining s as the minimal integer such that |G_n| > n^{2s/2}, where G_n is a group of monomials closed under Frobenius, improving efficiency over fixed r in AKS.
- Using the Jacobi symbol condition (a|n) = −1 or (a|n) = (1−a|n) = −1 to ensure the existence of suitable algebraic structures in Z_n[i] or Z_n[√a].
- Introducing parameterized tests A_u and B_u for n ≡ 1 and n ≡ −1 (mod 4), respectively, with complexity depending on k and u.
Experimental results
Research questions
- RQ1Can primality testing be accelerated for numbers with high 2-adic valuation ν₂(n−1) or ν₂(n+1) while remaining deterministic?
- RQ2How can the number of polynomial congruence checks in AKS-like algorithms be reduced using algebraic symmetries?
- RQ3To what extent can the AKS algorithm’s complexity be improved when the order of n modulo r is known to be large, without requiring r to be prime?
- RQ4Can the complexity of primality tests be made adaptive to the structure of n, particularly its 2-adic valuation?
- RQ5Is it possible to construct a primality test that runs in ˜O(log n)^4 time for a dense family of integers, matching the best-case performance of AKS but with a much smaller constant factor?
Key findings
- The algorithm for n ≡ 1 (mod 4) runs in 2^{−min(k, [2 log log n])} ˜O(log n)^6 time, improving to ˜O(log n)^4 when k ≥ 2 log log n.
- For large primes with k = ν₂(n−1) ≥ 2 log log n, the algorithm is at least 2^11 times faster than the best-case AKS algorithm.
- The algorithm for n ≡ −1 (mod 4) achieves the same ˜O(log n)^4 complexity with a 2^9 speedup over AKS in the worst case.
- When k > 1/2 log n, the algorithm runs in ˜O(log n)^2 time, approaching the optimal complexity for such number families.
- The complexity of the test A_u is approximately 2^{4(u−1)} 2^{−min(max(k−s,0), 2(u−1))} ˜O(log n)^6, showing exponential dependence on u and k.
- The authors conjecture that the algorithm can be further optimized to achieve ˜O(log n)^2 complexity for all k from 2 to 1/2 log n, by adapting s and the group structure.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.