  The notion of Online State Complexity, introduced by Karp in 1967, quantifies
the amount of states required to solve a given problem using an online
algorithm, which is represented by a deterministic machine scanning the input
from left to right in one pass. In this paper, we extend the setting to
alternating machines as introduced by Chandra, Kozen and Stockmeyer in 1976:
such machines run independent passes scanning the input from left to right and
gather their answers through boolean combinations. We devise a lower bound
technique relying on boundedly generated lattices of languages, and give two
applications of this technique. The first is a hierarchy theorem , stating that
the polynomial hierarchy of alternating online state complexity is infinite,
and the second is a linear lower bound on the alternating online state
complexity of the prime numbers written in binary. This second result
strengthens a result of Hartmanis and Shank from 1968, which implies an
exponentially worse lower bound for the same model.
