Rate-Optimal Polynomial-Time Prediction
of Stationary Renewal Processes
Abstract
Han, Jiang, and Wu [11] established the minimax one-step Kullback–Leibler (KL) prediction rate for stationary binary renewal processes and left polynomial-time attainment open. We resolve this computational question under only a finite-mean gap law, without a known uniform mean bound, higher-moment condition, or mixing assumption. Our exact multiset dynamic program evaluates a queried prefix continuation mass of a renewal likelihood envelope in integer operations. With , the full batch required by a compression-to-prediction reduction takes integer operations and polynomial bit time, yielding the optimal risk averaged over stationary histories. A computable mixture over occupied gap types retains this worst-case rate and adapts to simpler gap laws: it achieves for -point support, for exponential tails, and when with . The block assignment also gives pathwise log-loss regret at a known horizon; dyadic restarting yields a horizon-free polynomial-time predictor with minimax-order cumulative KL risk. A matching fixed-time lower bound holds even for aperiodic finite-support laws satisfying . Finally, we distinguish the genuine stationary conditional on an all-zero history from the ordinary post-renewal hazard, whose substitution changes the integrated minimax risk to the nonvanishing value .
Note. This paper was generated entirely by AI, including MiMo, using an automated research pipeline developed by Chenghua Liu and Hanyu Li.
1 Introduction
Renewal processes are simple enough to expose the computational content of prediction, yet their unbounded age and countably supported gap law make them genuine infinite-memory models. We ask whether their optimal fixed-time prediction rate can be attained by one exact polynomial-time algorithm under only a pointwise finite-mean assumption.
We study excess one-step logarithmic loss. For the true stationary conditional and a prediction , this excess is the stationary-history average of . The link between log-loss prediction and universal compression is classical [22, 6, 13]. For stationary renewal processes, Han et al. [11] proved the minimax rate and left polynomial-time attainment open. Classical renewal coding already gives block redundancy [5, 7]; the missing step is to evaluate a queried prefix continuation mass without enumerating exponentially many future renewal patterns.
Contributions.
This paper gives a constructive, rate-optimal answer.
- •
An exact multiset recurrence evaluates one arbitrary queried prefix continuation mass in integer operations. A specified batch of queries, including the suffix batch used for fixed-time prediction, takes operations on polynomial-bit integers. The resulting predictor answers the polynomial-time question of Han et al. [11].
- •
We refine the assignment by mixing over the number of distinct completed gaps. The resulting data-dependent pointwise regret is the minimum of the worst-case term and an term, where is the observed gap-type count. This gives distribution-adaptive fixed-time rates without knowing a support size or tail exponent.
- •
The block assignment also gives pathwise cumulative log-loss regret. Restarting it on dyadic epochs yields a single horizon-free predictor with cumulative KL risk and a rate-matching lower bound.
- •
We strengthen the fixed-time lower bound while retaining both stationary censoring factors. The hard laws are uniform on points, aperiodic, and satisfy almost surely. Thus the worst-case rate is not caused by heavy tails or extreme standardized moments.
We also separate a boundary issue from this computational question. The formal risk of Han et al. [11] uses the genuine stationary conditional, as do our main results. The informal all-zero use of their Eq. (5), p. 4, instead substitutes the ordinary post-renewal hazard for the equilibrium residual hazard. This observation does not concern their formal minimax risk or Theorem 1.4. If the substituted hazard is made the target, its integrated minimax KL risk is exactly .
Section 2 defines the stationary model and criteria. Sections 3 and 4 give the construction, algorithm, and statistical guarantees, followed by related work and limitations in Section 5. The technical appendices after the references give the boundary propositions, block assignment, exact query recurrence, compression bridge, adaptive analysis, lower bounds, anytime construction, and a bounded-support comparison.
2 Model, boundary condition, and main result
This section defines the stationary (equilibrium) renewal model, distinguishes the genuine all-zero conditional from an auxiliary hazard substitution, and states the fixed-time minimax result. It also fixes the probability and computational quantifiers used below.
Let be positive-integer-valued with law and finite mean
Write
A stationary binary renewal process is obtained by taking an iid sequence and an initial wait independent of that sequence, and setting exactly at the times . Stationarity is equivalent to the equilibrium-delay law
| (2.1) |
Let denote the induced process law, its marginal on , and its block pmf. For , write , and similarly for ; write , and interpret a slice with as the empty string. All logarithms are natural. Products indexed by gap lengths are over positive counts unless stated otherwise. We use and for . For , abbreviate
If a renewal has been observed and the current age is , then every positive-probability such history has , and its true next-step probability is the ordinary hazard
| (2.2) |
The all-zero history has a different boundary law. Put
Whenever , equivalently , (2.1) gives
| (2.3) |
which is generally not when the latter ratio is defined. Conditional probabilities are defined on -positive histories; their values on null histories are arbitrary and do not affect the integrated risks below. Thus, on every positive-probability history,
| (2.4) |
A possibly randomized statistical predictor is a probability kernel from to an output in . Its stationary conditional KL risk is
| (2.5) |
where the expectation includes private randomness. Let be the infimum of over these kernels. A deterministic family is uniform polynomial-bit-time if one Turing machine, given , outputs an exact rational encoded as a binary integer pair , with and , using bit operations. The pair need not be reduced. Requiring one machine for all horizons rules out fixed-horizon hard-coding.
For the auxiliary formulation, let
when a renewal is visible, and set on . The ordinary-hazard substitution uses on every history, including , whenever the denominator in (2.2) is positive; on a null history where it vanishes, define arbitrarily. Denote the corresponding minimax integrated risk by
| (2.6) |
This auxiliary target formalizes the informal all-zero substitution; it is not the formal conditional risk of Han et al. [11].
Question 2.1 (Following Han–Jiang–Wu (paraphrased)).
Can a polynomial-time predictor attain the information-theoretically optimal fixed-time KL risk for every stationary renewal process under only the pointwise condition ?
The efficient context-tree route discussed in this literature incurs an additional logarithmic factor; see Garivier [8] for the corresponding pointwise redundancy bound.
For later use, set
| (2.7) |
The boundary substitution and the genuine conditional loss lead to different answers.
Theorem 2.2 (Fixed-time minimax rate and polynomial-time attainment).
For every integer , even with randomized and computationally unrestricted predictors,
| (2.8) |
For the stationary conditional KL risk, a single deterministic uniform polynomial-bit-time family satisfies, for every ,
| (2.9) |
Conversely, for every ,
| (2.10) |
Thus the fixed-time minimax rate is , and one uniform polynomial-bit-time algorithm attains it.
Proof architecture. A completed-gap likelihood envelope has normalization . A first-renewal mixture converts it into a stationary block assignment, and a multiset recurrence computes each queried prefix mass exactly. The compression-to-prediction bridge then yields the upper bound. For the lower bound, a random-support prior leads from a visible good event to posterior membership uncertainty and then to a Bernoulli KL radius. Separate two-point laws establish the exact value for the auxiliary hazard substitution.
3 Construction and exact query algorithm
We first build a block assignment with pointwise redundancy, then describe the multiset dynamic program that evaluates its queried prefix masses. The construction separates the two stationary boundaries from the ordinary renewal segment between them.
Suppose a renewal is known at time zero and is observed. Let count its completed gaps of length , let , and let the final zero run be censored. Define
with . The ordinary-renewal likelihood is at most , while an integer-partition argument gives
To handle the left boundary, mixes uniformly over the first visible renewal and a no-renewal component. Given , it emits followed by ; the last component emits . Thus uses , and has full support. For every finite-mean and every -positive word,
| (3.1) |
It remains to answer prefix queries without enumerating extensions. For a prefix of the ordinary block, let count its completed gaps, set , , , and . The continuation mass is . The two DP aggregates have the following invariants; and are fixed during a run.
| State | Invariant |
|---|---|
| Number and total length of future completed gaps using lengths at most . | |
| Weighted mass of all such future multisets, including their orderings. | |
| The same mass, marked by the number of gap copies whose length exceeds the current censored age . |
For and , put , all other , and all ; states outside this domain are zero. With , the transitions are
Writing for the unique extension with no future renewal, the multiset-ordering identity in Appendix C gives
For , is an integer: it counts ordered future gap sequences after marking the first gap copy that can exceed . If the first one of a queried -prefix is at , set and ( when ); then
An all-zero prefix has conditional .
The interface is deliberately query based. One arbitrary queried conditional takes integer operations; any specified -query batch takes . This covers both the suffix-prefix batch used by the fixed-time predictor and the forward on-path batch used to evaluate regret on a supplied block; it does not enumerate an exponential prefix tree. Pascal recurrences, exact integer exponentiation, and exact division suffice. Operands have polynomial length, rolling workspace is bits, and a safe schoolbook bound for the compression-averaged predictor is bit operations. Complete invariants, divisibility, and operand-growth details appear in Appendix C.
4 Statistical guarantees
We next connect block regret to one-step prediction, refine the assignment to the observed occupied-gap complexity, and state the lower and online results. The key bridge is conditional information carried by the unobserved part of a stationary past.
For , define
| (4.1) |
For any stationary binary process law , conditional KL decomposition and convexity yield
For a renewal process, let be the inclusive countdown from position to the next renewal. If the first renewal lies inside the suffix, regeneration removes the earlier past; if it lies beyond the suffix, the suffix is all zero and the next bit is determined by the countdown. Hence . Conditional data processing, stationarity, and the mutual-information chain rule give
Together with (3.1), this proves the upper half of Theorem 2.2; Appendix D gives the complete conditional-law argument.
For adaptation, let be the number of distinct completed gap lengths after the first visible renewal, and define the population proxy
| (4.2) |
This quantity controls expected occupied gap types in a stationary block; it is neither support cardinality nor parameter dimension. Restricting the envelope to at most occupied lengths and mixing over gives an exactly computable full-support assignment . A single -refined table gives every restriction level by prefix sums in ; the DP is not rerun for each . A specified -query batch takes integer operations, polynomial bit time, and rolling bit space. Its fixed-time predictor satisfies
Consequently, while never exceeding the worst-case order, the risk is
- •
for -point laws;
- •
if ; and
- •
if with .
Appendix E proves the pointwise oracle, refined-DP projection identities, and Jensen step. The logarithmic finite-support endpoint is necessary even for an unknown deterministic period; see Proposition E.6.
The fixed-time lower bound uses a random support of size in . Every hard law is aperiodic and satisfies . The proof follows five explicit steps:
Both stationary boundary factors are retained in the exact likelihood. On a good event of probability at least , membership and nonmembership of the candidate next gap each have posterior mass bounded below by a universal constant, which gives the lower half of Theorem 2.2. The posterior stability lemma and its constants are proved in Appendix F.
Finally, let be a sequential predictor, with , and define
At a known horizon, the on-path conditionals of have pathwise log-loss regret at most . Restarting on dyadic epochs gives one horizon-free uniform polynomial-bit-time predictor with
A separate occupancy prior gives the matching-order lower bound, including randomized horizon-aware predictors. Thus the anytime minimax cumulative KL risk is as . Appendix G supplies the dependence and randomization arguments.
5 Related work, scope, and limitations
This section positions the contribution against renewal coding and efficient prediction, then records what the results do and do not claim. The distinction between existence, exact query computation, and practical scalability is important here.
5.1 Coding, prediction, and renewal models
The coding–prediction connection goes back at least to the universal coding program of Rissanen [22] and to universal sequential prediction for individual sequences [6, 13]. Normalized maximum likelihood and context-tree weighting are canonical probability assignments for pointwise log loss [23, 25]. More recently, Han et al. [10] developed fixed-time KL prediction for finite-order Markov chains, and Han et al. [11] treated infinite-memory hidden Markov and renewal models. The latter work proves the renewal rate and explicitly identifies efficient attainment as open.
The underlying redundancy of renewal processes is classical [5]. The completed-gap multinomial envelope and its reduction to integer partitions are explicit in the analytic coding work of Flajolet and Szpankowski [7]; those ingredients are not new. Garivier’s context-tree weighting construction is efficient but has pointwise redundancy on renewal sources [8]. Its logarithm comes from the tradeoff between a finite-memory approximation and context estimation, rather than from a known computational barrier. Enumerative coding [4] and exact multinomial stochastic-complexity recurrences [15] provide nearby algorithmic precedents. The step missing for the rate-optimal renewal assignment is an exact computation of arbitrary prefix continuation masses, including the stationary left boundary; our multiset recurrence supplies it. To our knowledge, the cited methods do not provide the same combination of a uniform finite-time stationary conditional-KL guarantee, the minimax rate, and exact polynomial-bit-time queried conditionals.
The adaptive result is related in spirit to universal coding over unknown or countably infinite alphabets [21, 3, 2]. Distinct-symbol counts and expected occupancy are classical complexity measures in that literature [14, 1]. Here the observed objects are not an iid sample of gaps: the initial and terminal gaps are censored, and which internal gaps are completed depends on their lengths. Our occupied-gap complexity is therefore a renewal-weighted occupancy count, and the new claim is a stationary fixed-time KL oracle inequality whose restricted assignments retain exact polynomial-time prefix marginals.
There is also a substantial literature on estimating interarrival or residual waiting-time laws under length-biased and censored renewal sampling [24, 9]. Morvai and Weiss [16], Morvai and Weiss [17], Morvai and Weiss [18], Morvai and Weiss [19] establish several asymptotic, intermittent, or residual-time guarantees for binary renewal and more general stationary processes. The random-context method of Oliveira [20] is adaptive and efficient, and for renewal processes gives rates under a uniformly bounded -moment condition. These results target different losses or asymptotic modes of convergence. To our knowledge, they do not provide the present uniform finite-time KL guarantee over the entire finite-mean class.
5.2 Scope and limitations
The upper bounds assume only pointwise finite mean; they do not require a known uniform mean bound, a higher moment, tail decay, mixing time, support bound, or lower-hazard condition. The guarantee is averaged over stationary histories. A uniform guarantee over every positive-probability history is impossible, and the auxiliary ordinary-hazard substitution on an all-zero block has minimax value . The polynomial exponents are conservative Turing-model existence bounds, not claims of practical scalability or computational lower bounds. Faster exact convolution and reuse across overlapping suffixes remain open algorithmic directions. For comparison, Appendix H gives a direct add-one hazard estimator under a known support bound , with risk at most .
The construction therefore answers a computational question rather than an information-theoretic one: rate-optimal renewal assignments were known, but their queried conditionals were not known to be polynomial-time computable in this setting. Dyadic restarting preserves the order with a constant-factor increase in the leading redundancy term and an additional lower-order dependence term. Extensions to projectively consistent adaptive assignments and Markov-renewal models are natural next steps.
References
- [1] A. Ben-Hamou, S. Boucheron, and M. I. Ohannessian. Concentration inequalities in the infinite urn scheme for occupancy counts and the missing mass, with applications. Bernoulli, 23(1):249–287, 2017. doi:10.3150/15-BEJ743.
- [2] D. Bontemps, S. Boucheron, and E. Gassiat. About adaptive coding on countable alphabets. IEEE Transactions on Information Theory, 60(2):808–821, 2014. doi:10.1109/TIT.2013.2288914.
- [3] S. Boucheron, A. Garivier, and E. Gassiat. Coding on countably infinite alphabets. IEEE Transactions on Information Theory, 55(1):358–373, 2009. doi:10.1109/TIT.2008.2008150.
- [4] T. M. Cover. Enumerative source encoding. IEEE Transactions on Information Theory, 19(1):73–77, 1973. doi:10.1109/TIT.1973.1054929.
- [5] I. Csiszár and P. C. Shields. Redundancy rates for renewal and other processes. IEEE Transactions on Information Theory, 42(6):2065–2072, 1996. doi:10.1109/18.556596.
- [6] M. Feder, N. Merhav, and M. Gutman. Universal prediction of individual sequences. IEEE Transactions on Information Theory, 38(4):1258–1270, 1992. doi:10.1109/18.144706.
- [7] P. Flajolet and W. Szpankowski. Analytic variations on redundancy rates of renewal processes. IEEE Transactions on Information Theory, 48(11):2911–2921, 2002. doi:10.1109/TIT.2002.804115.
- [8] A. Garivier. Redundancy of the context-tree weighting method on renewal and Markov renewal processes. IEEE Transactions on Information Theory, 52(12):5579–5586, 2006. doi:10.1109/TIT.2006.885484.
- [9] R. D. Gill and N. Keiding. Product-limit estimators of the gap time distribution of a renewal process under different sampling patterns. Lifetime Data Analysis, 16(4):571–579, 2010. doi:10.1007/s10985-010-9156-y.
- [10] Y. Han, S. Jana, and Y. Wu. Optimal prediction of Markov chains with and without spectral gap. IEEE Transactions on Information Theory, 69(6):3920–3959, 2023. doi:10.1109/TIT.2023.3239508.
- [11] Y. Han, T. Jiang, and Y. Wu. Prediction from compression for models with infinite memory, with applications to hidden Markov and renewal processes. In Proceedings of the 37th Conference on Learning Theory, volume 247 of Proceedings of Machine Learning Research, pages 2270–2307, 2024. PMLR:han24a.
- [12] G. H. Hardy and S. Ramanujan. Asymptotic formulae in combinatory analysis. Proceedings of the London Mathematical Society, s2-17(1):75–115, 1918. doi:10.1112/plms/s2-17.1.75.
- [13] D. Haussler, J. Kivinen, and M. K. Warmuth. Sequential prediction of individual sequences under general loss functions. IEEE Transactions on Information Theory, 44(5):1906–1925, 1998. doi:10.1109/18.705569.
- [14] S. Karlin. Central limit theorems for certain infinite urn schemes. Indiana University Mathematics Journal, 17(4):373–401, 1967. doi:10.1512/iumj.1968.17.17020.
- [15] P. Kontkanen and P. Myllymäki. A linear-time algorithm for computing the multinomial stochastic complexity. Information Processing Letters, 103(6):227–233, 2007. doi:10.1016/j.ipl.2007.04.003.
- [16] G. Morvai and B. Weiss. On universal estimates for binary renewal processes. The Annals of Applied Probability, 18(5):1970–1992, 2008. doi:10.1214/07-AAP512.
- [17] G. Morvai and B. Weiss. Inferring the residual waiting time for binary stationary time series. Kybernetika, 50(6):869–882, 2014. doi:10.14736/kyb-2014-6-0869.
- [18] G. Morvai and B. Weiss. A versatile scheme for predicting renewal times. Kybernetika, 52(3):348–358, 2016. doi:10.14736/kyb-2016-3-0348.
- [19] G. Morvai and B. Weiss. On universal algorithms for classifying and predicting stationary processes. Probability Surveys, 18:77–131, 2021. doi:10.1214/20-PS345.
- [20] R. I. Oliveira. Stochastic processes with random contexts: A characterization and adaptive estimators for the transition probabilities. IEEE Transactions on Information Theory, 61(12):6910–6925, 2015. doi:10.1109/TIT.2015.2496200.
- [21] A. Orlitsky, N. P. Santhanam, and J. Zhang. Universal compression of memoryless sources over unknown alphabets. IEEE Transactions on Information Theory, 50(7):1469–1481, 2004. doi:10.1109/TIT.2004.830761.
- [22] J. Rissanen. Universal coding, information, prediction, and estimation. IEEE Transactions on Information Theory, 30(4):629–636, 1984. doi:10.1109/TIT.1984.1056936.
- [23] Y. M. Shtarkov. Universal sequential coding of single messages. Problems of Information Transmission, 23(3):175–186, 1987.
- [24] Y. Vardi. Nonparametric estimation in the presence of length bias. The Annals of Statistics, 10(2):616–620, 1982. doi:10.1214/aos/1176345802.
- [25] F. M. J. Willems, Y. M. Shtarkov, and T. J. Tjalkens. The context-tree weighting method: Basic properties. IEEE Transactions on Information Theory, 41(3):653–664, 1995. doi:10.1109/18.382012.
Appendix A The auxiliary ordinary-hazard substitution at the boundary
This appendix computes the minimax risk of the auxiliary all-zero hazard substitution and then contrasts it with the genuine history-wise criterion. Neither proposition changes the formal stationary integrated risk used in Theorem 2.2.
Proposition A.1 (Auxiliary integrated boundary value).
For every , the ordinary-hazard substitution satisfies .
Proof.
The constant predictor gives the upper bound because , where .
For the converse, fix and . Let denote the point mass at , and consider
On the common history , the substituted targets are
The equilibrium-delay formula gives
| (A.1) |
For fixed , both probabilities tend to one as .
Let be the predictor’s possibly random output on the deterministic input ; its law is the same under the two models. If is the smaller probability in (A.1), then the larger of the two risks is at least
The part of the last objective that depends on is
Its derivative vanishes only at , and strict convexity on makes this the unique minimizer. The resulting value is the binary Jensen–Shannon divergence
| (A.2) |
First let , and then let . The expression in (A.2) tends to . Since the supremum over finite-mean gap laws dominates every member of this family, the lower bound follows. The argument is pointwise in the realized output, so private randomization cannot improve the value. ∎
The proposition concerns only the substituted target. For example, the genuine conditionals on above are and , respectively, and stationary probability downweights difficult all-zero blocks. The following complementary fact shows why that integration over histories cannot be removed.
Proposition A.2 (Genuine conditional under a history-wise criterion).
Let
Then for every .
Proof.
Again gives the upper bound. On , the genuine conditional for is one, whereas for it is . Both histories have positive probability. Letting reduces the lower bound to the minimax KL radius of the two Bernoulli endpoints, which is , also for randomized outputs by the same averaging argument as in Proposition A.1. ∎
Appendix B A rate-optimal assignment for stationary renewal blocks
This appendix proves the envelope normalization and stationary first-renewal mixture claims summarized in Section 3. We first treat an ordinary renewal block and then add the left boundary.
B.1 Completed-gap envelope
Suppose a renewal is known at time , and observe . Let
be its renewal times, let be the completed gaps, and put . The terminal censored age is , with when . Let denote the length- law conditional on the renewal at time zero. Its exact likelihood is
| (B.1) |
Define the completed-gap envelope
| (B.2) |
Since the survival factor in (B.1) is at most one and the multinomial likelihood is maximized at ,
| (B.3) |
Thus is an upper envelope based on completed gaps; it is not the maximum likelihood of the censored model in (B.1).
Set
| (B.4) |
with .
The next lemma controls the normalization penalty that becomes the block-redundancy term.
Lemma B.1 (Partition bound).
For , . For every ,
| (B.5) |
where is the integer-partition number and . Moreover, is nondecreasing in .
Proof.
The case consists only of the all-zero word and contributes one. Now fix a total completed-gap length . Each count vector is a partition of , with . Its distinct gap orderings contribute in total
because the expression is a single multinomial point probability. Once the ordered gaps are fixed, the remaining symbols form the unique terminal zero run. Summing first over count vectors and then over gives the first inequality. For completeness, the classical partition bound [12]
| (B.6) |
follows directly from Euler’s product. Indeed, for every ,
Optimizing at proves (B.6). Monotonicity of the exponential now gives
where the last line follows after setting and bounding . Finally, the injection preserves all completed-gap counts and hence preserves , proving . ∎
B.2 A first-renewal mixture for stationary blocks
The stationary left boundary is handled by mixing over the location of the first visible renewal. Conditional on , the suffix after that renewal is an ordinary renewal block, whereas an additional no-renewal component emits the all-zero word. Equal weights on these cases uniformly dominate the two stationary boundary factors.
Fix a block length . Define by choosing uniformly among the cases
In the last case output . In case , output , followed by a length- word drawn from . In particular, uses . Equivalently,
| (B.7) |
when the first one of occurs at . This is a normalized, full-support assignment. No consistency between different horizons is required.
This pointwise guarantee is the input to both the fixed-time compression reduction and the known-horizon sequential result.
Proposition B.2 (Pointwise block-regret bound).
For every ,
| (B.8) |
The same bound therefore holds for .
Proof.
Appendix C Exact prefix marginals in polynomial bit complexity
The regret proof alone does not make the predictor efficient: it remains to evaluate conditionals of without summing exponentially many extensions. For an ordinary-renewal prefix , , define its unnormalized continuation mass
| (C.1) |
Parse the completed observed gaps in . For , let be their counts, and set outside this range. Put
| (C.2) |
Here is the current censored age and is the remaining horizon. The unique extension with no future renewal contributes
| (C.3) |
The main simplification is to sum over the entire multiset of future completed gaps at once and mark how many gap copies can occur first. Throughout this DP, and are fixed. For , let
| (C.4) | ||||
| (C.5) |
We use . The valid state domain is
States outside this domain are zero. The base cases are , for , and for all .
Lemma C.1 (Multiset prefix recurrence).
For ,
| (C.6) | ||||
| (C.7) |
Moreover,
| (C.8) |
For every integer and every , is a nonnegative integer.
Proof.
Separating in (C.4) and using
gives (C.6). In (C.5), the marked count is the previous marked count plus ; this gives (C.7).
It remains to justify (C.8). Fix a future completed-gap multiset , and write
An ordering of this multiset can follow the currently censored age exactly when its first future completed gap has length greater than and . The number of such orderings is
| (C.9) |
After an ordering is fixed, the unused positions form one terminal zero run. The resulting envelope value is
Conversely, every extension with a future renewal has one such multiset and ordering. Summing (C.9) over all and , and then adding , proves (C.8). The left side of (C.9) is an integer for each multiset. Hence the aggregated numerator is divisible by , as claimed. ∎
Proposition C.2 (Block conditionals).
Each queried conditional of is exactly computable from two child continuation masses in (C.8). More precisely, for ,
| (C.10) |
If the first one of is at , put and , with when . Then
| (C.11) |
Proof.
For an all-zero prefix, the compatible mixture components in (B.7) are “no renewal” and , altogether equally weighted cases. Only has next symbol one, proving (C.10). Once the first renewal is visible, its mixture component is known. Both child masses contain the same factors , which cancel and give (C.11). The denominator is positive because is positive on every word. ∎
C.1 The explicit predictor
For clarity, the fixed-time algorithm obtained from these identities is the following.
Algorithm . Set . For each , regard the suffix as a length- prefix of . If , set . Otherwise locate its first one , put and , and compute and by (C.6)–(C.8). Set
and return .
Proposition C.3 (Arithmetic and bit complexity).
For a fixed prefix, is exactly evaluable with integer arithmetic operations and rolling table entries. All conditionals in any specified -query batch require arithmetic operations. This includes both the suffix batch used by and the forward on-path batch for a supplied block; it does not enumerate all prefixes. Every intermediate integer has bits, so the algorithm is deterministic uniform polynomial-bit-time, with rolling bit space.
Proof.
Tabulate , for , by Pascal’s recurrence, and tabulate , for , by repeated squaring, with . Fill (C.6) and (C.7) in increasing . The four indices are at most , so one continuation mass uses updates. Only layers and are needed, giving table space. There are two child masses for each of suffixes.
For bit lengths, feasibility gives
because every completed gap has length at least one and hence . A fixed state aggregates at most ordered positive-gap sequences. If and , then
Thus , , and both have bits. By Lemma C.1, divide by exactly before forming (C.8). Every remaining denominator is for some , and hence divides
| (C.12) |
Within one evaluation, putting all terms over gives a numerator and denominator of bits. Averaging the resulting rational conditionals uses at most -bit integers; component ratios and the final average are retained as unreduced integer pairs and need not have denominators dividing . Pascal’s recurrence, exact integer exponentiation, addition, multiplication, comparison, and the exact divisions certified by Lemma C.1 are the only arithmetic primitives. Standard exact integer algorithms therefore give polynomial Turing time; the deliberately crude schoolbook bound bit operations already suffices. Releasing the previous -layer and reusing the workspace across queries gives the stated rolling bit-space bound. ∎
Corollary C.4 (Efficient rate-optimal sequential assignment).
For every , each requested value , block mass , or queried sequential conditional of is exactly computable in polynomial bit complexity. A supplied path’s on-path conditionals form a specified -query batch covered by Proposition C.3. Moreover, for every and every -positive word ,
| (C.13) |
Proof.
The identity computes every normalizer. Equations (B.7) and (C.11) then compute the mass and conditionals of . The chain rule gives the equality in (C.13), and Proposition B.2 gives the inequality. ∎
Appendix D Compression to prediction
This appendix makes the compression-to-prediction bridge self-contained. It first separates the loss due to a block assignment from the information in the unobserved past, then bounds the latter by a truncated renewal countdown.
Let be the law of a stationary binary process, let be its length- marginal, where , and let be any full-support assignment. Define
| (D.1) |
For a stationary renewal process, define the inclusive countdown
Finite positive-integer gaps imply almost surely.
Lemma D.1 (Suffix regeneration).
For , with , , and ,
Proof.
If , a renewal occurs inside the suffix; conditional on its location and the observed suffix after it, regeneration makes the later process independent of . If , then and , so is determined once the countdown is given. These two cases prove the conditional independence. ∎
Lemma D.2 (Compression-to-prediction).
For every stationary process law , the predictor (D.1) satisfies
| (D.2) |
For the class of stationary renewal processes, the second term is at most , uniformly over .
Proof.
Convexity of KL in its second argument bounds the left side by the average loss against the conditionals appearing in (D.1). Fix , and write
Let be the conditional of that treats the realized length- suffix as its prefix. Conditional KL has the exact Pythagorean decomposition
| (D.3) |
Indeed, on each positive-probability conditioning event, expand both KL terms on the common binary outcome space and cancel the logarithm of . Null-event versions are arbitrary, and full support of makes the predictor terms finite. By stationarity, the second term in (D.3) has the same law as
Summing over and using the KL chain rule gives
where is the first-coordinate marginal of . This proves (D.2).
For a renewal process, Lemma D.1 and conditional data processing give the first line below; stationarity gives the equality:
Summing, then applying the mutual-information chain rule and nonnegativity, gives
Set . On , this truncation retains exactly; on its remaining value , there is no renewal in the block , where , and hence . The conditional law of given therefore depends only on , proving the Markov chain . Hence
as claimed. ∎
Combining pointwise block regret, exact queried conditionals, and the preceding information bound gives the promised fixed-time algorithm.
Theorem D.3 (Polynomial-time rate-optimal predictor).
Proof.
Apply Lemma D.2 and Proposition B.2 with . Polynomial-bit computability follows from Propositions C.2 and C.3. For the explicit constant, . Also, and for every . Thus the square-root term contributes at most , and the two normalizer logarithms plus the memory logarithm contribute at most , proving the last inequality in (2.9). ∎
Corollary D.4 (The all-zero contribution is lower order).
Let . On the all-zero input, the predictor in Theorem D.3 outputs
| (D.5) |
Uniformly over , the contribution of to is .
Proof.
Equation (C.10) gives
If , the event has probability zero and its contribution vanishes. Assume henceforth that , and write and . The tail-sum identity and monotonicity give
Consequently,
Using , , and ,
This is precisely the stationary weighting absent from the ordinary-hazard substitution in Proposition A.1. ∎
Appendix E Adaptation to stationary occupied-gap complexity
The worst-case envelope must allow arbitrarily many gap lengths. On an individual block, however, only a small number of distinct completed gaps may appear. We now exploit this fact without asking the predictor to know a support size or tail class.
For , using the completed-gap parse from Appendix B, let
be its number of distinct completed-gap lengths, with and . For , define
| (E.1) |
For , set . Let be the first-renewal mixture (B.7) with in place of . Although need not have full support when , .
Lemma E.1 (Restricted normalization).
For and , , and for ,
| (E.2) |
Proof.
The case is the stated convention. Assume . As in Lemma B.1, all orderings associated with one completed-gap count vector have total envelope mass at most one. A vector using exactly gap lengths is specified by choosing those lengths from and then assigning each a positive count at most , giving at most possibilities. The all-zero vector contributes one. For the second inequality, each summand is at most , there are at most of them, and when ; if , replace by in the first bound. ∎
For , set
| (E.3) |
The weights sum to one by telescoping, and the component makes full support. If has first renewal , define
and set and .
Theorem E.2 (Data-dependent pointwise oracle).
For every , every finite-mean renewal law , and every with ,
| (E.4) |
Proof.
The component has weight at least , so Proposition B.2 gives the first branch. For the second, take . For , this choice satisfies : if , then ; otherwise the distinct positive completed gap lengths have sum at least and fit within a block of length . The case follows directly from the universal component. If the word is nonzero, the likelihood domination (B.9) and Lemma E.1 give
The all-zero word satisfies the same bound because its ratio is at most . For , . Taking the better component proves (E.4); the universal branch covers the remaining case. ∎
E.1 Exact adaptive prefix masses
The restricted assignments remain polynomial-time computable. Refine (C.4)–(C.5) by adding a state equal to
Write the resulting tables as and , and let . Their recurrences are
| (E.5) | ||||
| (E.6) |
where , out-of-range states are zero, , all other entries are zero, and every entry is zero. If , then
| (E.7) |
This follows from the same multiset bijection as Lemma C.1, now sorting the final count vectors by their number of occupied coordinates. Summing over that coordinate projects the refined tables onto the ordinary ones:
| (E.8) |
All entries are nonnegative, so each refined entry inherits the ordinary table’s bit-length bound.
For a zero prefix of length , every has prefix mass . Once its first one is visible, with and suffix prefix ,
| (E.9) |
The conditional of is obtained by first mixing these prefix masses and then taking the ratio of its two child masses. It is not, in general, the prior-weighted average of the component conditionals. The universal component guarantees that the mixed denominator is positive.
The five recurrence indices are bounded by , so one refined table takes integer operations. Prefix sums in extract for every from that single table; the DP is not rerun separately for each . The fixed-time suffix batch uses at most child-prefix tables and normalizer tables, for integer operations in total. By (E.8), table entries have the bit lengths from Proposition C.3. Unreduced component ratios and mixtures remain polynomial length. A safe schoolbook bound is bit operations and rolling bit space. We have proved:
Proposition E.3 (Computability of the adaptive assignment).
Each queried prefix mass or conditional of , any specified -query suffix or forward-path batch, and the compression-averaged predictor formed from the suffix batch are exactly computable by a deterministic uniform polynomial-bit-time algorithm.
E.2 Distribution-dependent fixed-time rates
Define the stationary occupied-gap complexity at block length by
| (E.10) |
This quantity controls the expected number of distinct completed gap types in a stationary block: long gaps have fewer opportunities to be completed inside it. It is neither the support cardinality nor an estimated parameter dimension.
Theorem E.4 (Adaptive fixed-time prediction).
Let be (D.1) with in place of . For every and every finite-mean ,
| (E.11) |
The predictor receives none of , a support size, or a tail parameter as input.
Proof.
Set . Let count completed gaps of length lying wholly in a stationary block of length . A renewal occurs at each possible start with intensity , and its following gap has law , so
Therefore
| (E.12) |
Take expectations in (E.4). Define, for ,
The function is increasing and concave. At its intersection with the constant , the slope drops from a nonnegative value to zero, so is also increasing and concave. Since , (E.12) and Jensen’s inequality give
where the last step uses . Substitution in the pointwise oracle inequality yields
| (E.13) |
Apply Lemma D.2 with and add its memory term . ∎
Corollary E.5 (Automatic tail adaptation).
The predictor in Theorem E.4 has the following rates, with constants allowed to depend on the displayed tail parameters:
- 1.
if , then
- 2.
if , then the risk is ;
- 3.
if for , then the risk is .
Proof.
The first statement uses . Since , the other two follow from
Splitting the exponential sum at gives . Splitting the power-law sum at gives . Substitute these bounds into (E.11). ∎
The logarithmic finite-support endpoint is not merely an artifact of the upper bound, even for a deterministic gap law.
Proposition E.6 (Unknown deterministic period).
Let . For all sufficiently large ,
| (E.14) |
where the infimum permits randomized predictors.
Proof.
The upper bound is the case of Corollary E.5. For the lower bound take , , and . Explicitly,
For a deterministic output , put , which is at most one for all sufficiently large . If , then
If , use and to obtain the same order from . Thus the sum of the two weighted losses is pointwise . The dichotomy holds for every realization of a privately randomized output; taking its expectation and using that the maximum risk dominates the two-point Bayes average proves the randomized lower bound. ∎
Appendix F A matching-order lower bound with both boundary factors
We give a self-contained Bayes lower bound that retains both stationary boundary factors. The proof passes from a random support to visible completed gaps, a positive-probability good event, posterior membership uncertainty, and finally a Bernoulli KL radius. The construction uses only finite-support laws, so it applies within the class of the theorem.
Theorem F.1 (Finite-support minimax lower bound retaining both boundaries).
For every , every possibly randomized predictor obeys
| (F.1) |
The displayed lower bound already holds when the supremum is restricted to aperiodic laws that are uniform on points in and satisfy almost surely.
Let and , and write . For , and . Independently choose
| (F.2) |
and let be uniform on . Let denote the resulting joint Bayes law of and the observations. Write
Here is even, , and . Moreover, , so every law is aperiodic, while implies almost surely. We also have , and the stationary initial wait satisfies
Lemma F.2 (Stationary cycle representation).
In a two-sided stationary renewal process, if is the length of the cycle containing a fixed time and is that time’s age, then
| (F.3) |
Thus is size biased, its conditional position is uniform, and the completed gaps strictly to its left are iid and independent of .
Proof.
Construct the process by choosing according to (F.3), attaching independent iid -gaps on both sides, and placing the origin at position . Every cycle-position pair has mass , which is invariant under a unit shift, while regeneration at the adjacent endpoints gives the stated independence. Restricting this two-sided construction to times has exactly the one-sided stationary law defined in Section 2. ∎
For the hard prior, let be the current age at time , plus one. Its stationary law is
| (F.4) |
When , the last renewal is visible. Since , it lies in , and
Write the visible renewals as
and let be the set of distinct internal completed gaps. Every quantity in the following event is therefore determined by :
| (F.5) |
Lemma F.3 (Visible good event).
For every support in (F.2), .
Proof.
Half of the support lies above , so
| (F.6) |
Stationary intensity gives
By Lemma F.2, the completed gaps to the left of the interval containing time are iid and independent of the current age. Denote them, backward from the current interval, by . Pathwise on , . Thus, for every , conditional on and ,
Consequently,
Combining this with (F.6) gives, for every ,
| (F.7) |
∎
Lemma F.4 (Exact two-boundary likelihood).
For every realized block with positive prior-predictive probability, its exact likelihood under is
| (F.8) |
Proof.
Indeed, the three factors are respectively the equilibrium initial wait , the internal gaps , and the terminal survival . In particular, the left-censoring factor is retained. ∎
Lemma F.5 (Posterior stability).
For every with positive prior-predictive probability, the posterior membership and nonmembership probabilities are both at least .
Proof.
Let be the support prior conditioned on . Under , the low and high supports remain independent. Put . Since , and since ,
| (F.9) |
Relative to this conditional prior, (F.8) weights a compatible support by
| (F.10) |
If , then and , so the ratio of the largest and smallest compatible weights is at most . If , first fix a compatible high support . Then is constant as varies, varies by at most a factor two, and varies by at most a factor two: indeed,
Thus the conditional weight ratio across low supports is at most four. More explicitly, for compatible low supports and every compatible , either , so both weights vanish, or
Since the conditional law of under is the same for every , define the marginalized weight
This quantity is positive for every compatible . Indeed, because has positive Bayes probability, some high support containing has . That high support has positive conditional prior mass for every compatible , while . Averaging the pointwise comparison gives for every pair of compatible low supports. Thus, when , the posterior marginal on is its -marginal reweighted by quantities with ratio at most four. The membership event in (F.9) depends only on .
In general, if an event has prior probability and the largest weight is at most times the smallest, its reweighted probability and complementary probability are at least
respectively. For , use and to obtain the bounds and . For , the marginalized comparison uses , giving the still stronger bounds and . Hence the uniform constant safely gives
| (F.11) |
∎
Lemma F.6 (Bernoulli posterior radius).
For , the true next-step parameter is
| (F.12) |
For every proposed output ,
| (F.13) |
Proof.
Because , the entire high half of the support contributes to . Hence when , while when .
If , the second event in (F.11), on which the parameter is zero, gives conditional risk at least This is stronger than the common lower bound used below. If , then on the positive-parameter event. Since decreases in ,
For the penultimate inequality, write the second logarithm as and use ; its contribution is at least . Thus, for every , the posterior conditional risk on is at least . The assertion is pointwise in , so private randomization cannot improve it. ∎
Proof of Theorem F.1.
Average Lemma F.6 over , use Lemma F.3, and then use . The Bayes risk is at least
The prior may depend on , as is standard in a fixed-horizon minimax lower bound. The maximum risk dominates this Bayes average. Every prior model has the aperiodicity and standardized-support properties stated in the theorem, so the restricted-class assertion follows as well. ∎
Proof of Theorem 2.2.
The hazard-substitution statement is Proposition A.1. The genuine upper bound is Theorem D.3, and Theorem F.1 supplies the matching lower bound from onward. Since is the infimum over all predictors, it is at most the worst-case risk of the displayed uniform polynomial-bit-time family. Together these statements give (2.9). ∎
Remark F.7 (Why conditioning on the high support matters).
When , the factor can vary substantially across different high supports. It cannot be discarded, nor can one compare all compatible complete supports by a single constant ratio. The proof above first fixes , compares only , and then marginalizes. This is the step that simultaneously preserves the stationary left boundary and keeps the event observable.
Appendix G Anytime cumulative log-loss prediction
The prefix algorithm also solves a different, genuinely online problem. For a sequential predictor , define its cumulative conditional KL risk through time by
| (G.1) |
For a randomized predictor, the expectation also averages over its private randomness. When a full binary conditional pmf is needed, write
At a known horizon, the sequential conditionals of satisfy the pathwise bound (C.13) by Corollary C.4. We next remove knowledge of the terminal horizon.
Partition the prediction times into epochs of lengths , , where epoch starts after observations. At its start, discard the earlier data for the purpose of choosing probabilities and use the sequential conditionals of on the within-epoch prefix. The schedule is fixed, so this defines one horizon-free predictor , with .
Theorem G.1 (Anytime cumulative KL risk).
The horizon-free predictor is uniform polynomial-bit-time and, for every ,
| (G.2) |
where . In particular, the bound is . Conversely,
| (G.3) |
even when the infimum allows horizon-aware randomized predictors.
Proof.
Consider an epoch of scheduled length for which only its first symbols have been observed by the terminal time. Write
where is the number of observations before the epoch, and let be the length- prefix marginal of . The expected cumulative conditional loss in this part of the epoch is exactly
| (G.4) |
where stationarity identifies the marginal law of with .
The full-block pointwise domination in Proposition B.2 can be summed over all length- extensions, giving
Hence the second term of (G.4) is at most . For the first term, let
be the inclusive countdown from the first position of the epoch to its next renewal; it is finite almost surely because the interarrival law is supported on the positive integers and has finite mean. Conditional on , the zeros before the renewal and the renewal at position are fixed, and regeneration makes the remaining part of independent of . Conditional on , . Hence , or equivalently . Moreover, with , the conditional law of given depends only on : the exact first-renewal position is retained when it lies in the epoch, and all values give the same zero word. Therefore
Every complete or final partial epoch consequently costs at most .
For , the inequality gives . The geometric sum obeys
and . Summing proves (G.2). By Proposition C.3, all conditionals in a length- epoch use arithmetic operations; summing the fifth powers of all complete epochs and the final partial epoch gives operations through time , because its scheduled length is at most .
Finally, every deterministic sequential predictor induces the assignment , and . Conversely, every full-support assignment factors into sequential conditionals.
For this cumulative problem, use a separate occupancy prior from the one in the fixed-time lower bound. Let , choose an -subset uniformly from , and let be uniform on it. Put . The equilibrium delay and every subsequent gap are at most , so reveals the first complete iid gaps following its first visible renewal. Given a realization , let be its number of distinct values. The posterior on is uniform over all compatible supports, and a direct entropy calculation gives
| (G.5) |
Indeed, a previously seen symbol has predictive mass , whereas each of the unseen candidates has mass . Since , the right-hand side of (G.5) is at least for every realized history. Averaging over and applying the mutual-information chain rule, for , , whence
For every assignment , the Bayes identity
therefore gives the required Bayes lower bound for every deterministic assignment. If a horizon-aware randomized predictor has private seed , set
Convexity of KL in its second argument, followed by the preceding deterministic assignment bound, gives
The maximum risk dominates this Bayes average, so private randomization cannot improve the order. Together with the upper bound, this also recovers the classical renewal redundancy rate [5, 7]. ∎
Appendix H Why direct hazard estimation is delicate
The coding construction avoids a stopping bias that complicates the more obvious empirical estimator. For an ordinary renewal process, set and . The number of completed sampled gaps of length by a time budget is
This definition excludes both censored boundary intervals. Let
be the renewal function, with for . For , direct summation over the index of the gap gives
| (H.1) |
The multiplier depends on , so ratios of completed-gap tail counts are biased. Incorporating the boundary-crossing gap as censored survival data corrects the corresponding likelihood contribution, but a sharp KL analysis under this outcome-dependent stopping rule remains nontrivial. A uniform pseudo-count over gap lengths also assigns artificial mass across long zero-hazard plateaus, so without a support or tail cutoff it does not directly give a uniform KL guarantee.
Proposition H.1 (Known bounded-support plug-in).
Suppose , where is known. There is a direct add-one hazard predictor satisfying
| (H.2) |
where is the age at time .
Proof.
Put . The last renewal satisfies , because the current gap has length at most and crosses time . If are its preceding gaps, then
The left side is an integer renewal time and hence is at least one; all gaps are therefore fully visible in . By (F.3), these backward gaps are iid and independent of the current age . Moreover, almost surely, so the all-zero history has probability zero and the genuine next-step conditional is . Let be their add-one estimator and let be its hazard sequence. For any law with full support on , the hazard chain rule gives
| (H.3) |
with zero-survival terms interpreted as zero. Indeed, the factors and are the transition probabilities in the sequential survival representation of a draw from the law, so (H.3) is the KL chain rule for that representation.
For completeness, if is the count of value among the backward gaps, then , and, for ,
| (H.4) |
This follows by writing and summing the binomial expansion. Jensen’s inequality and (H.4) yield
Since the stationary age law is , (H.3) therefore gives
| (H.5) |
Thus the direct empirical method reaches the worst-case benchmark whenever , and in particular whenever without using a lower bound on the mean. The assignment construction removes the known-support restriction entirely. ∎