Repository · Full text

Rate-Optimal Polynomial-Time Prediction
of Stationary Renewal Processes

Read PDF

HTML version 1 Added

Papers are listed without authors and are not intended for submission or formal publication.

Contents

Rate-Optimal Polynomial-Time Prediction
of Stationary Renewal Processes

Abstract

Han, Jiang, and Wu [11] established the minimax Θ(n−1/2) 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 O⁡(N4) integer operations. With N=n+1, the full batch required by a compression-to-prediction reduction takes O⁡(N5) integer operations and polynomial bit time, yielding the optimal O(n−1/2) 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 O⁡(s⁢log⁡n/n) for s-point support, O⁡(log2⁡n/n) for exponential tails, and O⁡(n−(1−1/α)⁢log⁡n) when μ⁡(d)≤C⁢d−α with α>2. The block assignment also gives O⁡(N) pathwise log-loss regret at a known horizon; dyadic restarting yields a horizon-free polynomial-time predictor with minimax-order O⁡(N) cumulative KL risk. A matching fixed-time lower bound holds even for aperiodic finite-support laws satisfying T≤4⁢E⁢T. 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 log⁡2.

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 pμ⁢(Xn) and a prediction q⁡(Xn), this excess is the stationary-history average of DKL(Bern(pμ(Xn))∥Bern(q(Xn))). 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 Θ(n−1/2) and left polynomial-time attainment open. Classical renewal coding already gives Θ⁡(N) 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 O⁡(N4) integer operations. A specified batch of O⁡(N) queries, including the suffix batch used for fixed-time prediction, takes O⁡(N5) 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 O⁡(N) term and an O⁡((VN+1)⁢log⁡N) term, where VN 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 O⁡(N+log2⁡N)=O⁡(N) 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 Θ⁡(n) points, aperiodic, and satisfy T≤4⁢E⁢T 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 log⁡2.

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 T be positive-integer-valued with law μ and finite mean

mμ:=Eμ⁢T<∞.

Write

F¯μ⁢(a):=Pμ⁢(T>a),a∈{0,1,…}.

A stationary binary renewal process is obtained by taking an iid sequence T1,T2,…∼μ and an initial wait T0 independent of that sequence, and setting Xt=1 exactly at the times T0,T0+T1,T0+T1+T2,…. Stationarity is equivalent to the equilibrium-delay law

Pμ⁢(T0=t)=Pμ⁢(T≥t)mμ=F¯μ⁢(t−1)mμ,t≥1.(2.1)

Let Pμ denote the induced process law, PμN its marginal on X1N, and Pμ⁢(xN):=PμN⁢({xN}) its block pmf. For 1≤i≤j, write Xij=(Xi,…,Xj), and similarly for xij; write Xj=X1j, and interpret a slice with i>j as the empty string. All logarithms are natural. Products indexed by gap lengths are over positive counts unless stated otherwise. We use 0⁢log⁡(0/q)=0 and p⁢log⁡(p/0)=+∞ for p>0. For p,q∈[0,1], abbreviate

d(p∥q):=DKL(Bern(p),Bern(q)).

If a renewal has been observed and the current age is a, then every positive-probability such history has F¯μ⁢(a)>0, and its true next-step probability is the ordinary hazard

hμ⁢(a):=μ⁡(a+1)F¯μ⁢(a).(2.2)

The all-zero history has a different boundary law. Put

Rn:=∑a≥nF¯μ⁢(a)=Eμ⁢[(T−n)+].

Whenever Pμ⁢(Xn=0n)>0, equivalently Rn>0, (2.1) gives

Pμ⁢(Xn+1=1∣Xn=0n)=Pμ⁢(T0=n+1∣T0>n)=F¯μ⁢(n)Rn,(2.3)

which is generally not hμ⁢(n)=μ⁡(n+1)/F¯μ⁢(n) when the latter ratio is defined. Conditional probabilities are defined on Pμ-positive histories; their values on null histories are arbitrary and do not affect the integrated risks below. Thus, on every positive-probability history,

pμ(xn):=Pμ(Xn+1=1∣Xn=xn)={hμ⁢(n−max⁡{1≤t≤n:xt=1}),xn≠0n,F¯μ⁢(n)/Rn,xn=0n.(2.4)

A possibly randomized statistical predictor is a probability kernel from xn∈{0,1}n to an output in [0,1]. Its stationary conditional KL risk is

Rn(q^n,μ):=EμDKL(Pμ(Xn+1∈⋅∣Xn),Bern(q^n(Xn))),(2.5)

where the expectation includes private randomness. Let Rn be the infimum of supμ:mμ<∞Rn over these kernels. A deterministic family q^=(q^n)n≥1 is uniform polynomial-bit-time if one Turing machine, given (n,xn), outputs an exact rational encoded as a binary integer pair (a,b), with 0≤a≤b and b>0, using poly⁡(n) 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

τn:=n−max⁡{1≤t≤n:Xt=1}

when a renewal is visible, and set τn=n on 0n. The ordinary-hazard substitution uses p~μ⁢(xn):=hμ⁢(τn) on every history, including 0n, whenever the denominator in (2.2) is positive; on a null history where it vanishes, define p~μ arbitrarily. Denote the corresponding minimax integrated risk by

Rnhaz:=infq^nsupμ:mμ<∞Eμd(p~μ(Xn)∥q^n(Xn)).(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 Θ(n−1/2) fixed-time KL risk for every stationary renewal process under only the pointwise condition mμ<∞?

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

cp:=π⁢23,BN:=cp⁢N+log⁡(N+1)+log⁡(1+2⁢Ncp).(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 n≥1, even with randomized and computationally unrestricted predictors,

Rnhaz=log⁡2.(2.8)

For the stationary conditional KL risk, a single deterministic uniform polynomial-bit-time family q^ satisfies, for every n≥1,

Rn≤supμ:mμ<∞Rn(q^n,μ)≤Bn+1+log⁡(n+2)n≤(2⁢π3+32)1n.(2.9)

Conversely, for every n≥600,

Rn≥11⁢(log⁡2−1/2)40600⁢n.(2.10)

Thus the fixed-time minimax rate is Θ(n−1/2), and one uniform polynomial-bit-time algorithm attains it.

Proof architecture. A completed-gap likelihood envelope has normalization exp⁡(O⁡(N)). 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 O⁡(N) 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 y∈{0,1}L is observed. Let cd count its completed gaps of length d, let K=∑dcd, and let the final zero run be censored. Define

ML(y)={1,K=0,∏d:cd>0(cd/K)cd,K>0,ZL=∑yML(y),qL=ML/ZL,

with M0⁢(∅)=Z0=q0⁢(∅)=1. The ordinary-renewal likelihood is at most ML, while an integer-partition argument gives

ZL≤(1+2⁢Lcp)⁢ecp⁢L,cp=π⁢2/3.

To handle the left boundary, QN mixes uniformly over the first visible renewal J=1,…,N and a no-renewal component. Given J, it emits 0J−1⁢1 followed by qN−J; the last component emits 0N. Thus J=N uses q0⁢(∅)=1, and QN has full support. For every finite-mean μ and every Pμ-positive word,

log⁡Pμ⁢(xN)QN⁢(xN)≤BN:=cp⁢N+log⁡(N+1)+log⁡(1+2⁢Ncp).(3.1)

It remains to answer prefix queries without enumerating extensions. For a prefix z∈{0,1}ℓ of the ordinary block, let ad count its completed gaps, set r=∑dad, s⋆=∑dd⁢ad, A=ℓ−s⋆, and R=L−ℓ. The continuation mass is WL⁢(z)=∑vML⁢(z⁢v). The two DP aggregates have the following invariants; a=(a1,…,aL) and A are fixed during a run.

Table 1: Multiset-DP states for one queried continuation mass.
State Invariant
(k,u) Number and total length of future completed gaps using lengths at most d.
Gd⁢(k,u) Weighted mass of all such future multisets, including their orderings.
Sd⁢(k,u) The same mass, marked by the number of gap copies whose length exceeds the current censored age A.

For 0≤d≤L and 0≤k≤u≤A+R, put G0⁢(0,0)=1, all other G0=0, and all S0=0; states outside this domain are zero. With Bd⁢(b,k)=(kb)⁢(ad+b)ad+b, the transitions are

Gd⁢(k,u)=∑b=0min⁡{k,⌊u/d⌋}Bd⁢(b,k)⁢Gd−1⁢(k−b,u−d⁢b),
Sd⁢(k,u)=∑b=0min⁡{k,⌊u/d⌋}Bd⁢(b,k)⁢Sd−1⁢(k−b,u−d⁢b)
+∑b=0min⁡{k,⌊u/d⌋}Bd(b;k)1{d>A}bGd−1(k−b,u−db).

Writing Mnf for the unique extension with no future renewal, the multiset-ordering identity in Appendix C gives

WL⁢(z)=Mnf+∑k=1A+R∑u=kA+RSL⁢(k,u)k⁢(r+k)r+k.

For k≥1, SL⁢(k,u)/k is an integer: it counts ordered future gap sequences after marking the first gap copy that can exceed A. If the first one of a queried QN-prefix yt is at J, set L=N−J and z=yJ+1t (z=∅ when J=t); then

QN⁢(Xt+1=1∣Xt=yt)=WL⁢(z⁢1)WL⁢(z⁢0)+WL⁢(z⁢1).

An all-zero prefix has conditional 1/(N−t+1).

The interface is deliberately query based. One arbitrary queried conditional takes O⁡(N4) integer operations; any specified O⁡(N)-query batch takes O⁡(N5). 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 O⁡(N3⁢log⁡N) bits, and a safe schoolbook bound for the compression-averaged predictor is O⁡(N11⁢log2⁢N) 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 N=n+1, define

q^n⁢(xn)=1n⁢∑t=1nQN⁢(Xt+1=1∣X1t=xn−t+1n).(4.1)

For any stationary binary process law P, conditional KL decomposition and convexity yield

Rn⁢(q^n,P)≤1n⁢DKL⁢(PN,QN)+1n⁢∑t=1nIP⁢(Xn+1;X1n−t∣Xn−t+1n).

For a renewal process, let Ci be the inclusive countdown from position i 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 Xn+1⟂X1n−t|(Xn−t+1n,Cn−t+1). Conditional data processing, stationarity, and the mutual-information chain rule give

∑t=1nIP⁢(Xn+1;X1n−t∣Xn−t+1n)≤IP⁢(C1,X1n+1)≤log⁡(n+2).

Together with (3.1), this proves the upper half of Theorem 2.2; Appendix D gives the complete conditional-law argument.

For adaptation, let VN⁢(xN) be the number of distinct completed gap lengths after the first visible renewal, and define the population proxy

vN⁢(μ)=∑d=1N−1min⁡{1,(N−d)⁢μ⁢(d)mμ}.(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 s occupied lengths and mixing over s=1,…,N gives an exactly computable full-support assignment QNad. A single j-refined table gives every restriction level s by prefix sums in j; the DP is not rerun for each s. A specified O⁡(N)-query batch takes O⁡(N6) integer operations, polynomial bit time, and O⁡(N4⁢log⁡N) rolling bit space. Its fixed-time predictor satisfies

Rn⁢(q^nad,μ)≤1n⁢[log⁡2+log⁡(n+2)+min⁡{Bn+1,(2⁢vn+1⁢(μ)+6)⁢log⁡(n+2)}].

Consequently, while never exceeding the worst-case order, the risk is

  • •

    O⁡(s⁢log⁡n/n) for s-point laws;

  • •

    O⁡(log2⁡n/n) if μ⁡(d)≤C⁢e−c⁢d; and

  • •

    O⁡(n−(1−1/α)⁢log⁡n) if μ⁡(d)≤C⁢d−α with α>2.

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 a=24⁢⌈n⌉ in [2⁢a]. Every hard law is aperiodic and satisfies T≤4⁢mμ. The proof follows five explicit steps:

random support⟶visible completed gaps⟶E
⟶posterior membership uncertainty⟶Bernoulli KL radius.

Both stationary boundary factors are retained in the exact likelihood. On a good event of probability at least 1/8, 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 π=(πt)t≥0 be a sequential predictor, with π0⁢(∅)=Q1⁢(X1=1)=1/2, and define

CN(π,μ)=∑t=0N−1Eμd(Pμ(Xt+1=1∣Xt)∥πt(Xt)).

At a known horizon, the on-path conditionals of QN have pathwise log-loss regret at most BN. Restarting on dyadic epochs gives one horizon-free uniform polynomial-bit-time predictor πany with

supμ:mμ<∞CN(πany,μ)≤cp(2+2)N+O(log2N).

A separate occupancy prior gives the matching-order Ω⁡(N) lower bound, including randomized horizon-aware predictors. Thus the anytime minimax cumulative KL risk is Θ⁡(N) as N→∞. 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 Θ(n−1/2) renewal rate and explicitly identifies efficient attainment as open.

The underlying Θ⁡(N) 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 Θ⁡(N⁢log⁡N) 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 n−1/2 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 (2+γ)-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 log⁡2. 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 B≤n/2, with risk at most 2⁢B2/(mμ⁢n).

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 N 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 n≥1, the ordinary-hazard substitution satisfies Rnhaz=log⁡2.

Proof.

The constant predictor q^n≡1/2 gives the upper bound because d(p∥1/2)=log2−H2(p)≤log2, where H2⁢(p)=−p⁢log⁡p−(1−p)⁢log⁡(1−p).

For the converse, fix δ∈(0,1) and M∈Z>n+1. Let δM denote the point mass at M, and consider

μ0=δM,μ1=(1−δ)⁢δn+1+δ⁢δM.

On the common history E={Xn=0n}, the substituted targets are

hμ0⁢(n)=0,hμ1⁢(n)=1−δ=:p.

The equilibrium-delay formula gives

Pμ0⁢(E)=M−nM,Pμ1⁢(E)=(1−δ)+δ⁡(M−n)(1−δ)⁢(n+1)+δ⁢M.(A.1)

For fixed δ, both probabilities tend to one as M→∞.

Let Q be the predictor’s possibly random output on the deterministic input 0n; its law is the same under the two models. If ρM is the smaller probability in (A.1), then the larger of the two risks is at least

ρMmax{Ed(0∥Q),Ed(p∥Q)}≥ρM⁢E⁢d(0∥Q)+d(p∥Q)2
≥ρM⁢infq∈[0,1]d(0∥q)+d(p∥q)2.

The part of the last objective that depends on q is

−p2⁢log⁡q−2−p2⁢log⁡(1−q).

Its derivative vanishes only at q=p/2, and strict convexity on (0,1) makes this the unique minimizer. The resulting value is the binary Jensen–Shannon divergence

H2⁢(p/2)−12⁢H2⁢(p).(A.2)

First let M→∞, and then let δ↓0. The expression in (A.2) tends to H2⁢(1/2)=log⁡2. 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 E above are 1/(M−n) and F¯μ1⁢(n)/Rn, 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

Rnpw:=infq^nsupμ:mμ<∞supxn:Pμ⁢(xn)>0Ed(pμ(xn)∥q^n(xn)).

Then Rnpw=log⁡2 for every n≥1.

Proof.

Again 1/2 gives the upper bound. On 0n, the genuine conditional for μ=δn+1 is one, whereas for μ=δM it is 1/(M−n). Both histories have positive probability. Letting M→∞ reduces the lower bound to the minimax KL radius of the two Bernoulli endpoints, which is log⁡2, 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 0, and observe y∈{0,1}L. Let

0=s0<s1<⋯<sK≤L

be its renewal times, let di=si−si−1 be the completed gaps, and put cd=|{i:di=d}|. The terminal censored age is A=L−sK, with sK=0 when K=0. Let Pμord,L denote the length-L law conditional on the renewal at time zero. Its exact likelihood is

Pμord,L⁢(y)=(∏i=1Kμ⁡(di))⁢F¯μ⁢(A).(B.1)

Define the completed-gap envelope

ML(y):={1,K=0,∏d:cd>0(cdK)cd,K>0.(B.2)

Since the survival factor in (B.1) is at most one and the multinomial likelihood is maximized at cd/K,

Pμord,L⁢(y)≤∏i=1Kμ⁡(di)≤ML⁢(y).(B.3)

Thus ML is an upper envelope based on completed gaps; it is not the maximum likelihood of the censored model in (B.1).

Set

ZL:=∑y∈{0,1}LML⁢(y),qL⁢(y):=ML⁢(y)ZL,(B.4)

with M0⁢(∅)=Z0=q0⁢(∅)=1.

The next lemma controls the normalization penalty that becomes the O⁡(L) block-redundancy term.

Lemma B.1 (Partition bound).

For L=0, Z0=1. For every L≥1,

ZL≤∑s=0Lp⁡(s)≤(1+2⁢Lcp)⁢exp⁡(cp⁢L),(B.5)

where p⁡(s) is the integer-partition number and p⁡(0)=1. Moreover, ZL is nondecreasing in L.

Proof.

The case s=0 consists only of the all-zero word and contributes one. Now fix a total completed-gap length s=∑dd⁢cd∈{1,…,L}. Each count vector (cd) is a partition of s, with K≥1. Its distinct gap orderings contribute in total

K!∏d:cd>0cd!∏d:cd>0(cdK)cd≤1,

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 s gives the first inequality. For completeness, the classical partition bound [12]

p⁡(s)≤exp⁡(cp⁢s),s≥1,(B.6)

follows directly from Euler’s product. Indeed, for every θ>0,

p⁡(s)⁢e−θ⁢s≤∏j≥1(1−e−θ⁢j)−1,
log∏j≥1(1−e−θ⁢j)−1=∑m≥11m⁡(eθ⁢m−1)≤1θ⁢∑m≥11m2=π26⁢θ.

Optimizing at θ=π/6⁢s proves (B.6). Monotonicity of the exponential now gives

∑s=0Lecp⁢s≤ecp⁢L+∫0Lecp⁢x⁢dx
≤(1+2⁢Lcp)⁢ecp⁢L,

where the last line follows after setting u=x and bounding u≤L. Finally, the injection y↦y⁢0 preserves all completed-gap counts and hence preserves ML, proving ZL+1≥ZL. ∎

B.2 A first-renewal mixture for stationary blocks

The stationary left boundary is handled by mixing over the location J of the first visible renewal. Conditional on J, 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 N+1 cases uniformly dominate the two stationary boundary factors.

Fix a block length N. Define QN by choosing uniformly among the N+1 cases

J=1,…,N,or no renewal in the block.

In the last case output 0N. In case J, output 0J−1⁢1, followed by a length-(N−J) word drawn from qN−J. In particular, J=N uses q0⁢(∅)=1. Equivalently,

QN⁢(0N)=1N+1,QN⁢(xN)=1N+1⁢qN−J⁢(xJ+1N)(B.7)

when the first one of xN occurs at J. This is a normalized, full-support assignment. No consistency between different horizons N 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 N≥1,

supμ:mμ<∞supxN:Pμ⁢(xN)>0logPμ⁢(xN)QN⁢(xN)≤BN.(B.8)

The same bound therefore holds for supμDKL⁢(PμN,QN).

Proof.

If xN≠0N has first renewal J, internal completed gaps d1,…,dK, and terminal age A, then

Pμ⁢(xN)=F¯μ⁢(J−1)mμ⁢(∏i=1Kμ⁡(di))⁢F¯μ⁢(A)≤MN−J⁢(xJ+1N).(B.9)

The two boundary factors are probabilities and hence at most one. From (B.7), Lemma B.1, and monotonicity of ZL,

Pμ⁢(xN)QN⁢(xN)≤(N+1)⁢ZN−J≤(N+1)⁢ZN.

For xN=0N, the ratio is at most N+1. Taking logarithms proves (B.8); expectation under PμN gives the KL redundancy bound. ∎

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 QN without summing exponentially many extensions. For an ordinary-renewal prefix z∈{0,1}ℓ, 0≤ℓ≤L, define its unnormalized continuation mass

WL⁢(z):=∑v∈{0,1}L−ℓML⁢(z⁢v).(C.1)

Parse the completed observed gaps in z. For d=1,…,L, let ad∈Z≥0 be their counts, and set ad=0 outside this range. Put

r:=∑dad,s⋆:=∑dd⁢ad,A:=ℓ−s⋆,R:=L−ℓ.(C.2)

Here A is the current censored age and R is the remaining horizon. The unique extension with no future renewal contributes

Mnf:={1,r=0,r−r⁢∏dadad,r>0.(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, a=(a1,…,aL) and A are fixed. For d=0,1,…,L, let

Gd⁢(k,u):=∑b1,…,bd≥0∑j≤dbj=k∑j≤dj⁢bj=uk!∏j≤dbj!⁢∏j=1d(aj+bj)aj+bj,(C.4)
Sd⁢(k,u):=∑b1,…,bd≥0∑j≤dbj=k∑j≤dj⁢bj=uk!∏j≤dbj!⁢∏j=1d(aj+bj)aj+bj⁢(∑A<j≤dbj).(C.5)

We use 00=1. The valid state domain is

0≤d≤L,0≤k≤u≤A+R=L−s⋆.

States outside this domain are zero. The base cases are G0⁢(0,0)=1, G0⁢(k,u)=0 for (k,u)≠(0,0), and S0⁢(k,u)=0 for all (k,u).

Lemma C.1 (Multiset prefix recurrence).

For d=1,…,L,

Gd⁢(k,u)=∑b=0min⁡{k,⌊u/d⌋}(kb)⁢(ad+b)ad+b⁢Gd−1⁢(k−b,u−d⁢b),(C.6)
Sd⁢(k,u)=∑b=0min⁡{k,⌊u/d⌋}(kb)⁢(ad+b)ad+b
×[Sd−1(k−b,u−db)+1{d>A}bGd−1(k−b,u−db)].(C.7)

Moreover,

WL⁢(z)=Mnf+∑k=1A+R∑u=kA+RSL⁢(k,u)k⁢(r+k)r+k.(C.8)

For every integer k≥1 and every u, SL⁢(k,u)/k is a nonnegative integer.

Proof.

Separating bd=b in (C.4) and using

(kb)⁢(k−b)!∏j<dbj!=k!b!⁢∏j<dbj!

gives (C.6). In (C.5), the marked count ∑j>Abj is the previous marked count plus 1{d>A}b; this gives (C.7).

It remains to justify (C.8). Fix a future completed-gap multiset b=(b1,…,bL), and write

k=∑dbd,u=∑dd⁢bd,sA⁢(b)=∑d>Abd.

An ordering of this multiset can follow the currently censored age A exactly when its first future completed gap has length greater than A and u−A≤R. The number of such orderings is

∑e>A:be>0(k−1)!(be−1)!⁢∏d≠ebd!=sA⁢(b)kk!∏dbd!.(C.9)

After an ordering is fixed, the unused positions form one terminal zero run. The resulting envelope value is

∏d(ad+bd)ad+bd(r+k)r+k.

Conversely, every extension with a future renewal has one such multiset and ordering. Summing (C.9) over all k≥1 and u≤A+R, and then adding Mnf, proves (C.8). The left side of (C.9) is an integer for each multiset. Hence the aggregated numerator SL⁢(k,u) is divisible by k, as claimed. ∎

Proposition C.2 (Block conditionals).

Each queried conditional of QN is exactly computable from two child continuation masses in (C.8). More precisely, for 0≤t<N,

QN⁢(Xt+1=1∣Xt=0t)=1N−t+1.(C.10)

If the first one of y∈{0,1}t is at J, put L=N−J and z=yJ+1t, with z=∅ when J=t. Then

QN⁢(Xt+1=1∣Xt=y)=WL⁢(z⁢1)WL⁢(z⁢0)+WL⁢(z⁢1).(C.11)
Proof.

For an all-zero prefix, the compatible mixture components in (B.7) are “no renewal” and J=t+1,…,N, altogether N−t+1 equally weighted cases. Only J=t+1 has next symbol one, proving (C.10). Once the first renewal J is visible, its mixture component is known. Both child masses contain the same factors (N+1)−1⁢ZL−1, which cancel and give (C.11). The denominator is positive because ML is positive on every word. ∎

C.1 The explicit predictor

For clarity, the fixed-time algorithm obtained from these identities is the following.

Algorithm PredictRenewal⁡(n,xn). Set N=n+1. For each t=1,…,n, regard the suffix y=xn−t+1n as a length-t prefix of QN. If y=0t, set qt=1/(N−t+1). Otherwise locate its first one J, put L=N−J and z=yJ+1t, and compute WL⁢(z⁢0) and WL⁢(z⁢1) by (C.6)–(C.8). Set

qt=WL⁢(z⁢1)WL⁢(z⁢0)+WL⁢(z⁢1)

and return n−1⁢∑t=1nqt.

Proposition C.3 (Arithmetic and bit complexity).

For a fixed prefix, WL⁢(z) is exactly evaluable with O⁡(N4) integer arithmetic operations and O⁡(N2) rolling table entries. All conditionals in any specified O⁡(N)-query batch require O⁡(N5) arithmetic operations. This includes both the suffix batch used by PredictRenewal and the forward on-path batch for a supplied block; it does not enumerate all prefixes. Every intermediate integer has poly⁡(N) bits, so the algorithm is deterministic uniform polynomial-bit-time, with O⁡(N3⁢log⁡N) rolling bit space.

Proof.

Tabulate (kb), for 0≤b≤k≤N, by Pascal’s recurrence, and tabulate cc, for 0≤c≤N, by repeated squaring, with 00=1. Fill (C.6) and (C.7) in increasing d. The four indices d,k,u,b are at most N, so one continuation mass uses O⁡(N4) updates. Only layers d−1 and d are needed, giving O⁡(N2) table space. There are two child masses for each of n suffixes.

For bit lengths, feasibility gives

r+k≤r+A+R=r+L−s⋆≤L≤N,

because every completed gap has length at least one and hence r≤s⋆. A fixed state aggregates at most 2N ordered positive-gap sequences. If cj=aj+bj and Kd=∑j≤dcj≤N, then

∏j≤dcjcj≤KdKd≤NN.

Thus Gd⁢(k,u)≤2N⁢NN, Sd⁢(k,u)≤N⁢Gd⁢(k,u), and both have O⁡(N⁢log⁡N) bits. By Lemma C.1, divide SL⁢(k,u) by k exactly before forming (C.8). Every remaining denominator is KK for some K≤N, and hence divides

DN:=∏K=1NKK,log2⁡DN=O⁡(N2⁢log⁡N).(C.12)

Within one WL evaluation, putting all terms over DN gives a numerator and denominator of O⁡(N2⁢log⁡N) bits. Averaging the n resulting rational conditionals uses at most O⁡(N3⁢log⁡N)-bit integers; component ratios and the final average are retained as unreduced integer pairs and need not have denominators dividing DN. 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 O⁡(N11⁢log2⁢N) bit operations already suffices. Releasing the previous d-layer and reusing the workspace across queries gives the stated O⁡(N3⁢log⁡N) rolling bit-space bound. ∎

Corollary C.4 (Efficient rate-optimal sequential assignment).

For every N, each requested value ZL, block mass QN⁢(xN), or queried sequential conditional of QN is exactly computable in polynomial bit complexity. A supplied path’s N on-path conditionals form a specified O⁡(N)-query batch covered by Proposition C.3. Moreover, for every μ and every Pμ-positive word xN,

∑t=0N−1log⁡Pμ⁢(xt+1∣xt)QN⁢(xt+1∣xt)=log⁡Pμ⁢(xN)QN⁢(xN)≤BN.(C.13)
Proof.

The identity ZL=WL⁢(∅) computes every normalizer. Equations (B.7) and (C.11) then compute the mass and conditionals of QN. 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 P be the law of a stationary binary process, let PN be its length-N marginal, where N=n+1, and let QN be any full-support assignment. Define

q^n⁢(xn):=1n⁢∑t=1nQN⁢(Xt+1=1∣X1t=xn−t+1n).(D.1)

For a stationary renewal process, define the inclusive countdown

Ci:=min⁡{j≥1:Xi+j−1=1}.

Finite positive-integer gaps imply Ci<∞ almost surely.

Lemma D.1 (Suffix regeneration).

For 1≤t≤n, with Y=Xn+1, Ot=X1n−t, and St=Xn−t+1n,

Y⟂Ot|(St,Cn−t+1).
Proof.

If Cn−t+1≤t, a renewal occurs inside the suffix; conditional on its location and the observed suffix after it, regeneration makes the later process independent of Ot. If Cn−t+1>t, then St=0t and Y=1{Cn−t+1=t+1}, so Y 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 P, the predictor (D.1) satisfies

EPDKL(P(Xn+1∈⋅∣Xn),Bern(q^n(Xn)))
≤1n⁢DKL⁢(PN,QN)+1n⁢∑t=1nIP⁢(Xn+1;X1n−t∣Xn−t+1n).(D.2)

For the class of stationary renewal processes, the second term is at most log⁡(n+2)/n, uniformly over μ.

Proof.

Convexity of KL in its second argument bounds the left side by the average loss against the n conditionals appearing in (D.1). Fix t, and write

Y:=Xn+1,St:=Xn−t+1n,Ot:=X1n−t.

Let qt(⋅∣St) be the conditional of QN that treats the realized length-t suffix as its prefix. Conditional KL has the exact Pythagorean decomposition

EPDKL(PY|Ot,St,qt(⋅∣St))
=IP(Y;Ot∣St)+EPDKL(PY|St,qt(⋅∣St)).(D.3)

Indeed, on each positive-probability conditioning event, expand both KL terms on the common binary outcome space and cancel the logarithm of P⁡(Y∣St). Null-event versions are arbitrary, and full support of QN makes the predictor terms finite. By stationarity, the second term in (D.3) has the same law as

DKL(P(Xt+1∈⋅∣X1t),QN(Xt+1∈⋅∣X1t)).

Summing over t and using the KL chain rule gives

DKL⁢(PN,QN)−DKL⁢(P1,QN1)≤DKL⁢(PN,QN),

where QN1 is the first-coordinate marginal of QN. This proves (D.2).

For a renewal process, Lemma D.1 and conditional data processing give the first line below; stationarity gives the equality:

IP⁢(Xn+1;X1n−t∣Xn−t+1n)≤IP⁢(Xn+1;Cn−t+1∣Xn−t+1n)
=IP⁢(Xt+1;C1∣X1t).

Summing, then applying the mutual-information chain rule and nonnegativity, gives

∑t=1nIP⁢(Xn+1;X1n−t∣Xn−t+1n)≤∑t=1nIP⁢(C1;Xt+1∣X1t)≤IP⁢(C1,XN).

Set C~1=min⁡{C1,n+2}. On {C~1≤n+1}, this truncation retains C1 exactly; on its remaining value n+2, there is no renewal in the block XN, where N=n+1, and hence XN=0N. The conditional law of XN given C1 therefore depends only on C~1, proving the Markov chain C1→C~1→XN. Hence

IP⁢(C1,XN)≤H⁡(C~1)≤log⁡(n+2),

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).

For every n≥1, the deterministic predictor (D.1), with N=n+1 and QN defined by (B.7), is computable in polynomial bit complexity and satisfies

supμ:mμ<∞Rn(q^n,μ)≤Bn+1+log⁡(n+2)n.(D.4)
Proof.

Apply Lemma D.2 and Proposition B.2 with N=n+1. Polynomial-bit computability follows from Propositions C.2 and C.3. For the explicit constant, n+1/n≤2/n. Also, 1+2⁢n+1/cp≤n+2 and log⁡(n+2)/n≤2/n for every n≥1. Thus the square-root term contributes at most 2⁢π/(3⁢n), and the two normalizer logarithms plus the memory logarithm contribute at most 3⁢2/n, proving the last inequality in (2.9). ∎

Corollary D.4 (The all-zero contribution is lower order).

Let Hm=∑j=1m1/j. On the all-zero input, the predictor in Theorem D.3 outputs

q^n⁢(0n)=Hn+1−1n.(D.5)

Uniformly over μ, the contribution of {Xn=0n} to Rn⁢(q^n,μ) is O⁡(log⁡n/n).

Proof.

Equation (C.10) gives

q^n⁢(0n)=1n⁢∑t=1n1n−t+2=Hn+1−1n=:q.

If Rn=0, the event has probability zero and its contribution vanishes. Assume henceforth that Rn>0, and write w=Pμ⁢(Xn=0n)=Rn/mμ and p=F¯μ⁢(n)/Rn. The tail-sum identity and monotonicity give

mμ=∑a≥0F¯μ⁢(a)≥(n+1)⁢F¯μ⁢(n).

Consequently,

w⁢p=F¯μ⁢(n)mμ≤1n+1.

Using p≤1, w≤1, and log⁡((1−p)/(1−q))≤−log⁡(1−q),

wd(p∥q)≤log⁡(1/q)n+1−log(1−q)=O(log⁡nn).

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 y∈{0,1}L, using the completed-gap parse from Appendix B, let

ν⁡(y):=|{d:cd⁢(y)>0}|

be its number of distinct completed-gap lengths, with ν⁡(0L)=0 and ν⁡(∅)=0. For s≥1, define

ML,s(y):=ML(y)1{ν(y)≤s},ZL,s:=∑yML,s(y),qL,s:=ML,sZL,s.(E.1)

For L=0, set M0,s⁢(∅)=Z0,s=q0,s⁢(∅)=1. Let QN,s be the first-renewal mixture (B.7) with qN−J,s in place of qN−J. Although QN,s need not have full support when s<N, QN,N=QN.

Lemma E.1 (Restricted normalization).

For L≥0 and s≥1, Z0,s=1, and for L≥1,

ZL,s≤1+∑j=1min⁡{s,L}(Lj)⁢Lj≤(L+1)2⁢s+1.(E.2)
Proof.

The case L=0 is the stated convention. Assume L≥1. 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 j gap lengths is specified by choosing those lengths from [L] and then assigning each a positive count at most L, giving at most (Lj)⁢Lj possibilities. The all-zero vector contributes one. For the second inequality, each summand is at most (L+1)2⁢s, there are at most s of them, and s+1≤L+1 when s≤L; if s>L, replace s by L in the first bound. ∎

For 1≤s≤N, set

ωs,N:={12⁢s⁢(s+1),s<N,12+12⁢N,s=N,QNad:=∑s=1Nωs,N⁢QN,s.(E.3)

The weights sum to one by telescoping, and the s=N component makes QNad full support. If xN≠0N has first renewal J, define

VN⁢(xN):=ν⁡(xJ+1N),

and set VN⁢(0N)=0 and κN⁢(xN)=max⁡{1,VN⁢(xN)}.

Theorem E.2 (Data-dependent pointwise oracle).

For every N≥1, every finite-mean renewal law μ, and every xN with Pμ⁢(xN)>0,

logPμ⁢(xN)QNad⁢(xN)≤log2+min{BN,(2⁢κN⁢(xN)+2)⁢log⁡(N+1)
+2log(κN(xN)+1)}.(E.4)
Proof.

The component s=N has weight at least 1/2, so Proposition B.2 gives the first branch. For the second, take s=κN⁢(xN). For N≥2, this choice satisfies s<N: if VN=0, then s=1<N; otherwise the s distinct positive completed gap lengths have sum at least s⁡(s+1)/2 and fit within a block of length N. The case N=1 follows directly from the universal s=N component. If the word is nonzero, the likelihood domination (B.9) and Lemma E.1 give

Pμ⁢(xN)QN,s⁢(xN)≤(N+1)⁢ZN−J,s≤(N+1)2⁢s+2.

The all-zero word satisfies the same bound because its ratio is at most N+1. For s<N, −log⁡ωs,N≤log⁡2+2⁢log⁡(s+1). Taking the better component proves (E.4); the universal branch covers the remaining N=1 case. ∎

E.1 Exact adaptive prefix masses

The restricted assignments remain polynomial-time computable. Refine (C.4)–(C.5) by adding a state j equal to

|{i≤d:ai+bi>0}|.

Write the resulting tables as Gd⁢(k,u,j) and Sd⁢(k,u,j), and let ϵd(b)=1{ad+b>0}. Their recurrences are

Gd⁢(k,u,j)=∑b(kb)⁢(ad+b)ad+b⁢Gd−1⁢(k−b,u−d⁢b,j−ϵd⁢(b)),(E.5)
Sd⁢(k,u,j)=∑b(kb)(ad+b)ad+b[Sd−1(k−b,u−db,j−ϵd(b))
+1{d>A}bGd−1(k−b,u−db,j−ϵd(b))],(E.6)

where b=0,…,min⁡{k,⌊u/d⌋}, out-of-range states are zero, G0⁢(0,0,0)=1, all other G0 entries are zero, and every S0 entry is zero. If ν⁡(a)=|{d:ad>0}|, then

WL,s(z):=∑vML,s(zv)=1{ν(a)≤s}Mnf+∑k=1A+R∑u=kA+R∑j=0sSL⁢(k,u,j)k⁢(r+k)r+k.(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:

∑j=0LGd⁢(k,u,j)=Gd⁢(k,u),∑j=0LSd⁢(k,u,j)=Sd⁢(k,u).(E.8)

All entries are nonnegative, so each refined entry inherits the ordinary table’s bit-length bound.

For a zero prefix of length t, every QN,s has prefix mass (N−t+1)/(N+1). Once its first one J is visible, with L=N−J and suffix prefix z,

QN,s⁢(Xt=y)=1N+1⁢WL,s⁢(z)ZL,s,ZL,s=WL,s⁢(∅).(E.9)

The conditional of QNad 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 s=N component guarantees that the mixed denominator is positive.

The five recurrence indices d,k,u,j,b are bounded by N, so one refined table takes O⁡(N5) integer operations. Prefix sums in j extract WL,s for every s=1,…,N from that single table; the DP is not rerun separately for each s. The fixed-time suffix batch uses at most 2⁢n child-prefix tables and O⁡(n) normalizer tables, for O⁡(N6) 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 O⁡(N14⁢log2⁢N) bit operations and O⁡(N4⁢log⁡N) rolling bit space. We have proved:

Proposition E.3 (Computability of the adaptive assignment).

Each queried prefix mass or conditional of QNad, any specified O⁡(N)-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 N by

vN⁢(μ):=∑d=1N−1min⁡{1,(N−d)⁢μ⁢(d)mμ}.(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 q^nad be (D.1) with Qn+1ad in place of Qn+1. For every n≥1 and every finite-mean μ,

Rn(q^nad,μ)≤1n[log2+log(n+2)+min{Bn+1,(2vn+1(μ)+6)log(n+2)}].(E.11)

The predictor receives none of vn+1⁢(μ), a support size, or a tail parameter as input.

Proof.

Set N=n+1. Let Cd count completed gaps of length d lying wholly in a stationary block of length N. A renewal occurs at each possible start with intensity 1/mμ, and its following gap has law μ, so

Eμ⁢Cd=(N−d)⁢μ⁢(d)mμ,1≤d<N.

Therefore

Eμ⁢VN⁢(XN)=∑d<NPμ⁢(Cd≥1)≤vN⁢(μ).(E.12)

Take expectations in (E.4). Define, for 0≤k≤N,

fN⁢(k):=(2⁢k+2)⁢log⁡(N+1)+2⁢log⁡(k+1),gN⁢(k):=min⁡{BN,fN⁢(k)}.

The function fN is increasing and concave. At its intersection with the constant BN, the slope drops from a nonnegative value to zero, so gN is also increasing and concave. Since κN≤VN+1, (E.12) and Jensen’s inequality give

Eμ⁢gN⁢(κN)≤gN⁢(Eμ⁢κN)≤gN⁢(vN⁢(μ)+1)
≤min⁡{BN,(2⁢vN⁢(μ)+4)⁢log⁡(N+1)+2⁢log⁡(vN⁢(μ)+2)}
≤min⁡{BN,(2⁢vN⁢(μ)+6)⁢log⁡(N+1)},

where the last step uses vN⁢(μ)≤N−1. Substitution in the pointwise oracle inequality yields

DKL⁢(PμN,QNad)≤log⁡2+min⁡{BN,(2⁢vN⁢(μ)+6)⁢log⁡(N+1)}.(E.13)

Apply Lemma D.2 with N=n+1 and add its memory term log⁡(n+2)/n. ∎

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. 1.

    if |supp⁡(μ)|≤s, then

    Rn(q^nad,μ)=O(min{n−1/2,(s+1)⁢log⁡nn});
  2. 2.

    if μ⁡(d)≤C⁢e−c⁢d, then the risk is OC,c⁢(log2⁡n/n);

  3. 3.

    if μ⁡(d)≤C⁢d−α for α>2, then the risk is OC,α⁢(n−(1−1/α)⁢log⁡n).

Proof.

The first statement uses vN⁢(μ)≤s. Since mμ≥1, the other two follow from

vN⁢(μ)≤∑d≥1min⁡{1,N⁢μ⁢(d)}.

Splitting the exponential sum at d≍log⁡N gives O⁡(log⁡N). Splitting the power-law sum at d≍N1/α gives O⁡(N1/α). 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 D={δd:d≥1}. For all sufficiently large n,

infq^nsupμ∈DRn⁢(q^n,μ)=Θ⁡(log⁡nn),(E.14)

where the infimum permits randomized predictors.

Proof.

The upper bound is the s=1 case of Corollary E.5. For the lower bound take μ0=δn+1, μ1=δ2⁢n, and E={Xn=0n}. Explicitly,

Pμ0⁢(E)=1n+1,pμ0⁢(0n)=1;Pμ1⁢(E)=12,pμ1⁢(0n)=1n.

For a deterministic output q, put q⋆=4⁢log⁡(e⁢n)/n, which is at most one for all sufficiently large n. If q≤q⋆, then

1n+1d(1∥q)≥1n+1logn4⁢log⁡(e⁢n)=Ω(log⁡nn).

If q>q⋆, use d(p∥q)≥(1−p)q−H2(p) and H2⁢(1/n)≤log⁡(e⁢n)/n to obtain the same order from 12d(1/n∥q). Thus the sum of the two weighted losses is pointwise Ω⁡(log⁡n/n). 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 n≥600, every possibly randomized predictor obeys

supμ:mμ<∞Rn(q^n,μ)≥11⁢(log⁡2−1/2)40600⁢n.(F.1)

The displayed lower bound already holds when the supremum is restricted to aperiodic laws that are uniform on a=24⁢⌈n⌉ points in [2⁢a] and satisfy T≤4⁢mμ almost surely.

Let b=⌈n⌉ and a=24⁢b, and write [a]={1,…,a}. For n≥600, a≤n and a≤25⁢n. Independently choose

L∼Unif⁡([a]a/2),H={2⁢a−1,2⁢a}∪H′,H′∼Unif⁡({a+1,…,2⁢a−2}a/2−2),S=L∪H,(F.2)

and let μS be uniform on S. Let Π denote the resulting joint Bayes law of S and the observations. Write

m⁡(S)=1a⁢∑d∈Sd,Ut⁢(S):=|{d∈S:d≥t}|.

Here a=24⁢b is even, |S|=a, and S⊆[2⁢a]. Moreover, {2⁢a−1,2⁢a}⊆S, so every law is aperiodic, while m⁡(S)≥a/2 implies T≤2⁢a≤4⁢m⁢(S) almost surely. We also have m⁡(S)≤2⁢a, and the stationary initial wait satisfies

PS⁢(T0=t)=Ut⁢(S)a⁢m⁢(S),t≥1.
Lemma F.2 (Stationary cycle representation).

In a two-sided stationary renewal process, if D0 is the length of the cycle containing a fixed time and A0∈{0,…,D0−1} is that time’s age, then

P⁡(D0=d,A0=j)=μ⁡(d)mμ,0≤j<d.(F.3)

Thus D0 is size biased, its conditional position is uniform, and the completed gaps strictly to its left are iid μ and independent of (D0,A0).

Proof.

Construct the process by choosing (D0,A0) according to (F.3), attaching independent iid μ-gaps on both sides, and placing the origin at position A0. Every cycle-position pair has mass μ⁡(d)/mμ, which is invariant under a unit shift, while regeneration at the adjacent endpoints gives the stated independence. Restricting this two-sided construction to times t≥1 has exactly the one-sided stationary law defined in Section 2. ∎

For the hard prior, let g be the current age at time n, plus one. Its stationary law is

PS⁢(g=t)=Ut⁢(S)a⁢m⁢(S).(F.4)

When g≤a, the last renewal K=n+1−g is visible. Since a≤n, it lies in {1,…,n}, and

g=n+1−max⁡{t≤n:Xt=1}.

Write the visible renewals as

1≤t0=J<t1<⋯<tr=K≤n,di=ti−ti−1,

and let A={d1,…,dr} be the set of distinct internal completed gaps. Every quantity in the following event is therefore determined by Xn:

E:={g≤a,r≤b,g∉A}.(F.5)
Lemma F.3 (Visible good event).

For every support S in (F.2), PS⁢(E)≥1/8.

Proof.

Half of the support lies above a, so

PS⁢(g≤a)=ES⁢min⁡{T,a}m⁡(S)≥14.(F.6)

Stationary intensity gives

ES⁢∑t=1nXt=nm⁡(S)≤2⁢na,PS⁢(g≤a,r>b)≤PS⁢(∑t=1nXt>b)≤2⁢na⁢b≤112.

By Lemma F.2, the completed gaps to the left of the interval containing time n are iid μS and independent of the current age. Denote them, backward from the current interval, by D−1,D−2,…. Pathwise on {g≤a,r≤b}, A⊆{D−1,…,D−b}. Thus, for every 1≤g≤a, conditional on g and S,

PS⁢(g∈A,r≤b∣g)≤PS⁢(D−j=g⁢ for some ⁢j≤b∣g)≤ba=124.

Consequently,

PS⁢(g≤a,g∈A,r≤b)≤ba⁢PS⁢(g≤a)≤124.

Combining this with (F.6) gives, for every S,

PS⁢(E)≥14−112−124=18.(F.7)

∎

Lemma F.4 (Exact two-boundary likelihood).

For every realized block x∈E with positive prior-predictive probability, its exact likelihood under S is

PS(Xn=x)=1{A⊆S}a−(r+2)UJ⁢(S)⁢Ug⁢(S)m⁡(S).(F.8)
Proof.

Indeed, the three factors are respectively the equilibrium initial wait UJ/(a⁢m), the r internal gaps a−r1{A⊆S}, and the terminal survival Ug/a. In particular, the left-censoring factor is retained. ∎

Lemma F.5 (Posterior stability).

For every x∈E with positive prior-predictive probability, the posterior membership and nonmembership probabilities are both at least η:=11/203.

Proof.

Let ΠA be the support prior conditioned on A⊆S. Under ΠA, the low and high supports remain independent. Put ℓ=|A∩[a]|. Since ℓ≤b≤a/24, and since g∉A,

ΠA⁢(g∈L)=a/2−ℓa−ℓ∈[11/23,1/2].(F.9)

Relative to this conditional prior, (F.8) weights a compatible support by

wx⁢(S)=UJ⁢(S)⁢Ug⁢(S)m⁡(S).(F.10)

If J≤a, then UJ,Ug∈[a/2,a] and m∈[a/2,2⁢a], so the ratio of the largest and smallest compatible weights is at most 16. If J>a, first fix a compatible high support H. Then UJ is constant as L varies, Ug varies by at most a factor two, and m varies by at most a factor two: indeed,

∑h∈Hh≥a2/2,∑ℓ′∈Lℓ′≤a2/2.

Thus the conditional weight ratio across low supports is at most four. More explicitly, for compatible low supports L1,L2 and every compatible H, either UJ⁢(H)=0, so both weights vanish, or

wx⁢(L1,H)≤4⁢wx⁢(L2,H).

Since the conditional law of H under ΠA is the same for every L, define the marginalized weight

w¯x⁢(L):=EΠA⁢[wx⁢(L,H)∣L].

This quantity is positive for every compatible L. Indeed, because x has positive Bayes probability, some high support containing A∩{a+1,…,2⁢a} has UJ>0. That high support has positive conditional prior mass for every compatible L, while Ug/m>0. Averaging the pointwise comparison gives w¯x⁢(L1)≤4⁢w¯x⁢(L2) for every pair of compatible low supports. Thus, when J>a, the posterior marginal on L is its ΠA-marginal reweighted by quantities with ratio at most four. The membership event in (F.9) depends only on L.

In general, if an event has prior probability p and the largest weight is at most C times the smallest, its reweighted probability and complementary probability are at least

pp+C⁡(1−p),1−pC⁢p+1−p,

respectively. For J≤a, use C=16 and p∈[11/23,1/2] to obtain the bounds 11/203 and 1/17. For J>a, the marginalized comparison uses C=4, giving the still stronger bounds 11/59 and 1/5. Hence the uniform constant η=11/203 safely gives

Π⁡(g∈S∣Xn=x)≥η,Π⁡(g∉S∣Xn=x)≥η.(F.11)

∎

Lemma F.6 (Bernoulli posterior radius).

For x∈E, the true next-step parameter is

θS⁢(x)=1{g∈S}Ug⁢(S).(F.12)

For every proposed output q∈[0,1],

EΠ(⋅∣Xn=x)[d(θS(x)∥q)]≥η⁡(log⁡2−1/2)a.(F.13)
Proof.

Because g≤a, the entire high half of the support contributes to Ug. Hence θS=0 when g∉S, while θS∈[1/a,2/a] when g∈S.

If q≥1/(2⁢a), the second event in (F.11), on which the parameter is zero, gives conditional risk at least ηd(0∥q)=η[−log(1−q)]≥ηq≥η/(2a). This is stronger than the common lower bound η⁡(log⁡2−1/2)/a used below. If q<1/(2⁢a), then q≤θ/2 on the positive-parameter event. Since d(θ∥q) decreases in q<θ,

d(θ∥q)≥d(θ∥θ/2)
=θ⁢log⁡2+(1−θ)⁢log⁡1−θ1−θ/2
≥(log⁡2−1/2)⁢θ≥log⁡2−1/2a.

For the penultimate inequality, write the second logarithm as log⁡(1−θ/(2−θ)) and use log(1−u)≥−u/(1−u); its contribution is at least −θ/2. Thus, for every q, the posterior conditional risk on x∈E is at least η⁡(log⁡2−1/2)/a. The assertion is pointwise in q, so private randomization cannot improve it. ∎

Proof of Theorem F.1.

Average Lemma F.6 over x, use Lemma F.3, and then use a≤25⁢n. The Bayes risk is at least

18⁢η⁡(log⁡2−1/2)a≥11⁢(log⁡2−1/2)40600⁢n.

The prior may depend on n, 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 n=600 onward. Since Rn 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 J>a, the factor UJ⁢(S) 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 H, compares only L, and then marginalizes. This is the step that simultaneously preserves the stationary left boundary and keeps the event E observable.

Appendix G Anytime cumulative log-loss prediction

The prefix algorithm also solves a different, genuinely online problem. For a sequential predictor π=(πt)t≥0, define its cumulative conditional KL risk through time N by

CN(π,μ):=∑t=0N−1Eμd(Pμ(Xt+1=1∣Xt)∥πt(Xt)).(G.1)

For a randomized predictor, the expectation also averages over its private randomness. When a full binary conditional pmf is needed, write

πt⁢(b∣xt):=πt⁢(xt)b⁢(1−πt⁢(xt))1−b,b∈{0,1}.

At a known horizon, the sequential conditionals of QN 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 Lj=2j, j=0,1,…, where epoch j starts after sj=2j−1 observations. At its start, discard the earlier data for the purpose of choosing probabilities and use the sequential conditionals of QLj on the within-epoch prefix. The schedule is fixed, so this defines one horizon-free predictor πany, with π0any⁢(∅)=Q1⁢(X1=1)=1/2.

Theorem G.1 (Anytime cumulative KL risk).

The horizon-free predictor πany is uniform polynomial-bit-time and, for every N≥1,

supμ:mμ<∞CN(πany,μ)≤∑j=0⌊log2⁡N⌋[B2j+log⁡(2j+1)]
≤cp⁢(2+2)⁢N+3⁢log⁡22⁢(JN+1)⁢(JN+2),(G.2)

where JN=⌊log2⁡N⌋. In particular, the bound is O⁡(N+log2⁡N)=O⁡(N). Conversely,

infπsupμ:mμ<∞CN(π,μ)=Θ(N)(N→∞),(G.3)

even when the infimum allows horizon-aware randomized predictors.

Proof.

Consider an epoch of scheduled length L for which only its first m≤L symbols have been observed by the terminal time. Write

A=Xs,Y=Xs+1s+m,

where s is the number of observations before the epoch, and let QLm be the length-m prefix marginal of QL. The expected cumulative conditional loss in this part of the epoch is exactly

E⁢log⁡Pμ⁢(Y∣A)QLm⁢(Y)=Iμ⁢(A,Y)+DKL⁢(Pμm,QLm),(G.4)

where stationarity identifies the marginal law of Y with Pμm.

The full-block pointwise domination in Proposition B.2 can be summed over all length-(L−m) extensions, giving

Pμm⁢(ym)=∑v∈{0,1}L−mPμL⁢(ym⁢v)≤eBL⁢∑v∈{0,1}L−mQL⁢(ym⁢v)=eBL⁢QLm⁢(ym).

Hence the second term of (G.4) is at most BL. For the first term, let

Z:=min⁡{r≥1:Xs+r=1}

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 Z≤m, the zeros before the renewal and the renewal at position Z are fixed, and regeneration makes the remaining part of Y independent of A. Conditional on Z>m, Y=0m. Hence A⟂Y|Z, or equivalently A→Z→Y. Moreover, with Z~=min⁡{Z,m+1}, the conditional law of Y given Z depends only on Z~: the exact first-renewal position is retained when it lies in the epoch, and all values Z>m give the same zero word. Therefore

Iμ⁢(A,Y)≤Iμ⁢(Z,Y)≤H⁡(Z~)≤log⁡(m+1).

Every complete or final partial epoch consequently costs at most BL+log⁡(L+1).

For L≥1, the inequality 1+2⁢L/cp≤L+1 gives BL≤cp⁢L+2⁢log⁡(L+1). The geometric sum obeys

∑j=0JN2j/2≤(2+2)⁢N,

and log⁡(2j+1)≤(j+1)⁢log⁡2. Summing proves (G.2). By Proposition C.3, all conditionals in a length-L epoch use O⁡(L5) arithmetic operations; summing the fifth powers of all complete epochs and the final partial epoch gives O⁡(N5) operations through time N, because its scheduled length is at most N.

Finally, every deterministic sequential predictor induces the assignment Qπ⁢(xN)=∏t=0N−1πt⁢(xt+1∣xt), and CN⁢(π,μ)=DKL⁢(PμN,Qπ). 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 a=⌈N⌉, choose an a-subset V uniformly from [2⁢a], and let μV be uniform on it. Put k=⌊(N−2⁢a)/(2⁢a)⌋. The equilibrium delay and every subsequent gap are at most 2⁢a, so XN reveals the first k complete iid gaps D1,…,Dk following its first visible renewal. Given a realization Di−1=di−1, let r⁡(di−1) be its number of distinct values. The posterior on V is uniform over all compatible supports, and a direct entropy calculation gives

I⁡(V;Di∣Di−1=di−1)=(1−r⁡(di−1)a)⁢log⁡2⁢a−r⁡(di−1)a−r⁡(di−1).(G.5)

Indeed, a previously seen symbol has predictive mass 1/a, whereas each of the 2⁢a−r⁡(di−1) unseen candidates has mass (a−r⁡(di−1))/(a⁡(2⁢a−r⁡(di−1))). Since r⁡(di−1)≤i−1≤k≤a/2, the right-hand side of (G.5) is at least (log⁡2)/2 for every realized history. Averaging over Di−1 and applying the mutual-information chain rule, for N≥100, k≥N/4, whence

I⁡(V,XN)≥I⁡(V,Dk)≥log⁡28⁢N.

For every assignment Q, the Bayes identity

EV⁢DKL⁢(PVN,Q)=I⁡(V,XN)+DKL⁢(PXN,Q)

therefore gives the required Ω⁡(N) Bayes lower bound for every deterministic assignment. If a horizon-aware randomized predictor has private seed R, set

QR⁢(xN):=∏t=0N−1πt,R⁢(xt+1∣xt),Q¯:=ER⁢QR.

Convexity of KL in its second argument, followed by the preceding deterministic assignment bound, gives

EV,RDKL(PVN∥QR)≥EVDKL(PVN∥Q¯)≥log⁡28N.

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 S0=0 and Sj=∑i=1jTi. The number of completed sampled gaps of length g by a time budget H is

Cg⁢(H):=∑j≥01⁢{Sj≤H−g,Tj+1=g}.

This definition excludes both censored boundary intervals. Let

U⁡(t):=∑j≥0P⁡(Sj≤t)

be the renewal function, with U⁡(t)=0 for t<0. For 1≤g≤H, direct summation over the index of the gap gives

E⁢Cg⁢(H)=∑j≥0P⁡(Sj≤H−g)⁢μ⁢(g)=μ⁡(g)⁢U⁢(H−g).(H.1)

The multiplier depends on g, 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 supp⁡(μ)⊆[B], where B≤n/2 is known. There is a direct add-one hazard predictor h^ satisfying

Ed(hμ(A)∥h^(A))≤B−1mμ⁢⌊n/B⌋≤B⁡(B−1)mμ⁢(n−B)≤2⁢B2mμ⁢n≤2⁢B2n,(H.2)

where A is the age at time n.

Proof.

Put k=⌊n/B⌋−1. The last renewal K≤n satisfies K>n−B, because the current gap has length at most B and crosses time n. If D−1,…,D−k are its preceding k gaps, then

K−∑i=1kD−i≥K−k⁢B>n−B−k⁢B≥0.

The left side is an integer renewal time and hence is at least one; all k gaps are therefore fully visible in X1n. By (F.3), these backward gaps are iid μ and independent of the current age A:=n−K. Moreover, T0≤B≤n/2 almost surely, so the all-zero history has probability zero and the genuine next-step conditional is hμ⁢(A). Let μ^ be their add-one estimator and let h^ be its hazard sequence. For any law ν with full support on [B], the hazard chain rule gives

DKL(μ,ν)=∑a=0B−1F¯μ(a)d(hμ(a)∥hν(a)),(H.3)

with zero-survival terms interpreted as zero. Indeed, the factors h⁡(a) and 1−h⁡(a) 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 Nj is the count of value j among the k backward gaps, then Nj∼Bin⁡(k,μ⁡(j)), μ^⁢(j)=(Nj+1)/(k+B) and, for μ⁡(j)>0,

E⁢1Nj+1=1−(1−μ⁡(j))k+1(k+1)⁢μ⁢(j).(H.4)

This follows by writing (kr)/(r+1)=(k+1r+1)/(k+1) and summing the binomial expansion. Jensen’s inequality and (H.4) yield

E⁢DKL⁢(μ,μ^)=∑j:μ⁡(j)>0μ(j)Elogμ⁢(j)⁢(k+B)Nj+1
≤∑j:μ⁡(j)>0μ(j)log(μ(j)(k+B)E1Nj+1)
=∑j:μ⁡(j)>0μ(j)log[k+Bk+1(1−(1−μ(j))k+1)]
≤log⁡k+Bk+1≤B−1k+1.

Since the stationary age law is P⁡(A=a)=F¯μ⁢(a)/mμ, (H.3) therefore gives

Ed(hμ(A)∥h^(A))=1mμ⁢E⁢DKL⁢(μ,μ^)≤B−1mμ⁢(k+1)
=B−1mμ⁢⌊n/B⌋≤B⁡(B−1)mμ⁢(n−B)
≤2⁢B2mμ⁢n≤2⁢B2n.(H.5)

Thus the direct empirical method reaches the worst-case O(n−1/2) benchmark whenever B2/mμ=O⁡(n), and in particular whenever B=O⁡(n1/4) without using a lower bound on the mean. The assignment construction removes the known-support restriction entirely. ∎