Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.PolyTime.Nat.Factorial

Factorials in binary #

n ! is computable in binary from n in unary in polynomial time, by multiplying 1, 2, …, n: each factor has at most n bits, so the running product grows by at most n bits per step (Turing.MultiTapeTM.ComputableInPolyTime.foldlWith_of_bounded_growth).

Main results #

n ! in binary, from n in unary, by multiplying 1, 2, …, n.