Documentation

CslibFrontier.Computability.Complexity.BkSequencePolyTime

Polynomial-time constructibility of Sergeev's explicit B_k-sequence #

Sergeev ([Ser23], Abstract and pp. 2–3) shows that the size-n B_k-sequence H[n, k] (Cslib.sergeevBkSequence n k) is computable in time (n + k) ^ O(1) with output elements represented in binary:

  1. The first n odd primes (Cslib.firstOddPrimes n) lie below Cslib.primeSearchBound n = (n + 2) * (2 * ⌊log₂(n + 2)⌋ + 4) and are found in unary polynomial time by trial division (Cslib.Complexity.computableInPolyTime_firstOddPrimes).
  2. Given modulus exponent r in unary and odd input x in binary, the base-5 discrete logarithm Cslib.dlogFiveModTwoPow r x extracts r - 2 binary digits sequentially via modular exponentiation modulo 2 ^ r, maintaining an accumulator strictly below 2 ^ r (Cslib.Complexity.computableInPolyTime_dlogFiveModTwoPow).
  3. Combining the unary modulus exponent Cslib.sergeevModulusExp n k = O(k log(n + 2)) with dlogFiveModTwoPow over firstOddPrimes n certifies Cslib.sergeevBkSequence from unary (n, k) (encPair encUnary encUnary) to a framed list of binary naturals (encList encNat) (Cslib.Complexity.computableInPolyTime_sergeevBkSequence).

Main results #

References #

Computing the first n odd primes from unary n (encUnary) produces a framed list of unary primes (encList encUnary) in polynomial time.

Computing Sergeev's base-5 discrete logarithm dlogFiveModTwoPow r x from unary modulus exponent r and binary integer x (encPair encUnary encNat) produces a binary natural (encNat) in polynomial time ([Ser23], pp. 2–3).

Computing Sergeev's modulus exponent sergeevModulusExp n k from unary (n, k) (encPair encUnary encUnary) produces a unary exponent (encUnary) in polynomial time.

Explicitness of Sergeev's B_k-sequence ([Ser23], Abstract and pp. 2–3): given (n, k) in unary (encPair encUnary encUnary), sergeevBkSequence n k is computable in polynomial time ((n + k) ^ O(1) steps) as a framed list of binary naturals (encList encNat).