Phatak Primality Test (PPT)
Total Page:16
File Type:pdf, Size:1020Kb
PPT : New Low Complexity Deterministic Primality Tests Leveraging Explicit and Implicit Non-Residues A Set of Three Companion Manuscripts PART/Article 1 : Introducing Three Main New Primality Conjectures: Phatak’s Baseline Primality (PBP) Conjecture , and its extensions to Phatak’s Generalized Primality Conjecture (PGPC) , and Furthermost Generalized Primality Conjecture (FGPC) , and New Fast Primailty Testing Algorithms Based on the Conjectures and other results. PART/Article 2 : Substantial Experimental Data and Evidence1 PART/Article 3 : Analytic Proofs of Baseline Primality Conjecture for Special Cases Dhananjay Phatak ([email protected]) and Alan T. Sherman2 and Steven D. Houston and Andrew Henry (CSEE Dept. UMBC, 1000 Hilltop Circle, Baltimore, MD 21250, U.S.A.) 1 No counter example has been found 2 Phatak and Sherman are affiliated with the UMBC Cyber Defense Laboratory (CDL) directed by Prof. Alan T. Sherman Overall Document (set of 3 articles) – page 1 First identification of the Baseline Primality Conjecture @ ≈ 15th March 2018 First identification of the Generalized Primality Conjecture @ ≈ 10th June 2019 Last document revision date (time-stamp) = August 19, 2019 Color convention used in (the PDF version) of this document : All clickable hyper-links to external web-sites are brown : For example : G. E. Pinch’s excellent data-site that lists of all Carmichael numbers <10(18) . clickable hyper-links to references cited appear in magenta. Ex : G.E. Pinch’s web-site mentioned above is also accessible via reference [1] All other jumps within the document appear in darkish-green color. These include Links to : Equations by the number : For example, the expression for BCC is specified in Equation (11); Links to Tables, Figures, and Sections or other arbitrary hyper-targets. Examples: Table2 ; Figure4 ; and Phatak’s Baseline Primality Conjecture (PBPC) . Following the usual web document conventions, most of the hyperlinks (except those to the references cited) are underlined. Overall Document (set of 3 articles) – page 2 Notation and symbols used For the most part the symbols are the same as those used in the literature. For the sake of clarity, we summarize those below. NUT ≡ Number Under Test (for primality) = input N s.t. ≡ such that w.r.t. ≡ with respect to l.h.s. or (LHS) ≡ left hand side r.h.s. or (LHS) ≡ right hand side gcd ≡ greatest common divisor lcm ≡ least common multiple lof(z) ≡ the Largest Odd Factor of integer z ) ←→ therefore * ←→ because (or since) x ⇒ y ≡ One-way implication : if x is true then y is true x ⇐⇒ y ≡ Both-way implication ≡ iff, i.e., x ⇒ y AND y ⇒ x bxc ≡ floor(x) = largest integer ≤ x ≡ round-toward −∞ dxe ≡ ceil(x) = smallest integer ≥ x ≡ round-toward +∞ =∆ ≡ Definition of a function of variable ≡ end of a proof; or a part thereof; or an analytic argument/derivation. 2222 QNR ≡ Quadratic Non Residue QR ≡ Quadratic Residue NR ≡ Non Residue of any order, i.e., a value that does not exist as an integer modulo-N. for example, root of a polynomial that has no integer solutions modulo-N Jacobi_Symbol( ) Jacobi_Symbol m m,n ≡ the of integer m, w.r.t. integer n = n or JS(m,n) Note that JS ∈ {−1,0,1}; the Jacobi_Symbol is evaluated using the quadratic-reciprocity-results and extended gcd-like computations; without factoring either m or n . N N×(N−1)×···×(N−k+1) ( Ck) ≡ Binomial Coefficient “N_choose_k” = 1×2×···×k Non trivial binomial coeff. ≡ any binomial coefficient whose value is > 1 N ≡ ( Ck) where k 6= 0 and k 6= N Overall Document (set of 3 articles) – page 3 ECC ≡ a function of two variables q and N that indicates whether q and N satisfy the “Euler-Criterion”; (hence the name “Euler-Criterion Check” and the abbreviation ECC ). A formulae/expression for ECC is specified below, in Eqn. (5). BCC ≡ Analogous function for the “Binomial-Congruence Check” (see Eqn. (11)) modexp(x,e,N) ≡ xe mod N ; wherein ; the modular exponentiation is done via repeated square–and–reduce_modulo_N operations. ∆ lgN = log 2 N O(·) =∆ “order of” metric for complexity of algorithms. polylog(x) =∆ A polynomial of the argument = (logx) Note that throughout this set of articles the argument of polylog(·) is always (logN), which is therefore tantamount to a polynomial of the argument = (log(logN)) Overall Document (set of 3 articles) – page 4 OVERALL ABSTRACT FOR THE SET OF 3 ARTICLES In this set of three companion manuscripts/articles, we unveil our new results on primality testing and reveal new primality testing algorithms enabled by those results. The results have been classified (and referred to) as lemmas/corollaries/claims whenever we have complete analytic proof(s); otherwise the results are introduced as conjectures. In Part/Article 1 , we start with the Baseline Primality Conjecture (PBPC) which enables deterministic primality detection with a low complexity = O (logN)2 (polylog(logN)) ; when an explicit value of a Quadratic NON Residue ( QNR ) modulo-N is available 11 (which happens to be the case for an overwhelming majority = 12 = 91.67% of all odd integers). We then demonstrate Primality Lemma1 , which reveals close connections between the state-of-the-art Miller-Rabin method and the renowned Euler-Criterion. This Lemma, together with the Baseline Primality Conjecture enables a synergistic fusion of Miller-Rabin iterations and our method(s), resulting in hybrid algorithms that are substantially better than their components. Next, we illustrate how the requirement of an explicit value of a QNR can be circumvented by using relations of the form: Polynomial(x) mod N ≡ 0 ; whose solutions implicitly specify NON-RESIDUEs modulo-N. We then develop a method to derive low-degree canonical polynomials that together guarantee implicit NON-RESIDUEs modulo-N ; which along with the Generalized Primality Conjectures enable algorithms that achieve a worst case deterministic polynomial complexity = O (logN)3 (polylog(logN)) ; unconditionally, for any/all values of N. In Part/Article 2 , we present substantial experimental data that corroborate all the conjectures3. For a striking/interesting example, wherein a combination of well-known state-of-the-art probabilistic primality tests applied together fail to detect a composite (which is easily/instantly detected correctly to be a composite number by the Baseline Primality Conjecture), see Section 23 in Part/Article 2. The data show that probabilistic primality tests in software platforms such as Maple are now extremely robust. I have not yet found a single composite number N that fools Maple’s Probabilistic primality tests; but gets correctly identified as a composite by our deterministic tests. Construction of (or a search for) such integers (assuming that those exist) is an interesting open problem which we plan to investigate in the future. Finally in Part/Article 3 , we present analytic proof(s) of the Baseline Primality Conjecture that we have been able to complete for some special cases (i.e. for particular types of inputs N). We are optimistic that full analytic proofs of all conjectures introduced herein will be generated in the near future. That will be a big step toward moving the problem of primality detection into the category of problems that have been “solved and retired”. 3 As repeatedly mentioned throughout the entire set of articles, No counter example has been found. Overall Document (set of 3 articles) – page 5 Contents Part/Article 1 1. Introduction ......................................... 13 2. New number theoretic result on which the ensuing algorithms are based . 16 3. Specification of Phatak’s Primality Testing Algorithm using Explicit QNR (PPTA_EQNR) . 18 4. Proof of correctness of PPTA_EQNR Algorithm assuming that PBP Conjecture is true . 21 5. Complexity of PPTA_EQNR .................................. 22 5.1 Complexity after an explicit QNR is available................... 22 5.2 Complexity of generating explicit Quadratic (or higher order) Non Residue . 23 5.3 Worst Case Overall Complexity of Baseline Method ............... 23 5.4 Why the Baseline Conjecture is extremely useful Nonetheless.......... 25 6. New Result Enabling Fusion of Baseline Conjecture with the Miller-Rabin Method . 28 7. Hybrid Algorithms ..................................... 31 7.1 PPTA_EQNR variant that includes Miller-Rabin Checks............. 31 7.2 Enhancing Miller-Rabin method with the PBP Conjecture ............ 33 8. Circumventing computation of explicit integer non–residue value in underlying number field . 35 8.1 Examples showing that Implicit Specification of non residues can also work . 35 8.2 Modular Binomial Congruence Check works with ANY/ALL Non-zero divisor polynomials .................................. 40 9. Auxiliary Results that lead to Generalized form of PBP Conjecture . 41 9.1 Derivation of Canonical Divisor Polynomials................... 41 9.2 Analogues of Euler’s Criterion for the Canonical Divisor Polynomials . 45 10. Phatak’s Generalized Primality Conjecture (PGPC) ...................... 51 6 11. Specification of Phatak’s Primality Testing Algorithm using Implicit Non-Residues (PPTA_INR) 52 12. Proof of Correctness of PPTA_INR Algorithm assuming that PGP Conjecture is true . 54 12.1 Analysis of Flow Control in Overall Algorithm ................. 54 12.2 Procedure Find_qnr_or_PGPC_parameter_m() analyzed. ............ 55 13. Derivation of Worst Case Computational Effort: Deterministic Low Complexity Achieved . 62 13.1 Furthermost Generalized Primality Conjecture (FGPC)............ 65 13.2 Cyclotomic and Υ polynomials can be fooled ................. 66 14.