Power Laws for Repetitions

In the previous chapter, we have analyzed power laws connected to the growth of block mutual information (1.132). We have seen that these laws arise naturally if the persistent topic of a random text is infinitely complex. Equivalently, we may say that in this case, there exists an infinitely complex world that is repeatedly described by the random text. In contrast, in this chapter, we would like to study the power‐law logarithmic growth of maximal repetition (1.133), which also seems to arise in texts created by humans, as introduced in Section 1.13.

The power‐law logarithmic growth of maximal repetition was discovered by Dębowski ( 2012b , 2015b ) accidentally. The initial motivation for this research was confirming a hypothesis of Dębowski ( 2011 ) that the maximal repetition for natural language grows logarithmically, which was connected to the theorem about facts and words originally stated for minimal grammar‐based codes, see Problem 7.4. A converse statement turned out to be likely true for natural language. Consequently, we have asked the question what kind of stochastic processes can exhibit a power‐law logarithmic growth of maximal repetition and in what ways they can resemble natural language. This idea inspired further papers (Dębowski, 2017 , 2018b ), where we constructed random hierarchical association (RHA) processes and demonstrated some general bounds for the maximal repetition in terms of conditional Rényi entropy rates.

In fact, the maximal repetition had been earlier researched by Erdös and Rényi ( 1970 ), Shields ( 1992 ), and Szpankowski ( 1993b ). Whereas for finite‐state processes, the maximal repetition grows logarithmically, Shields ( 1992 ) has shown that in general, the maximal repetition can grow arbitrarily fast for stationary processes, and this growth may hold regardless of the value of the Shannon entropy rate. Complementing this result, Szpankowski ( 1993b ) showed that the logarithmic rate of growth of maximal repetition is equal to the so called collision entropy rate for some subclass of processes with a finite excess entropy. This result is less general than the partial result of Dębowski ( 2018b ). Thus, we can see that we need both more general and stronger results so as to understand what happens in natural language.

As it was sketched in Section 1.13, our intuition is that the infinitely complex world repeatedly described in texts in natural language may emerge in the limit as a result of human tendency to imitate previously encountered chunks of text. More generally, we suppose that the process being perigraphic and the power‐law growth of block mutual information can be a mathematical consequence of the power‐law logarithmic growth of maximal repetition or rather of a related phenomenon. We have not succeeded in proving this linking statement yet, and, in this chapter, we will present a bundle of preliminary propositions that might help in future research. Some of these results have not been discussed in the literature so far, whereas some have been beautified.

Thus, Section 9.1 is devoted to Rényi–Arimoto entropies, a generalization of the conditional Shannon entropy. The Rényi–Arimoto entropies do not satisfy the chain rule and the polymatroid identities like the Shannon entropy but they enjoy a number of other nice relationships. They are parameterized with an extended real number parameter, and they are decreasing with respect to this parameter. They are also monotonic with respect to their other arguments.

In Section 9.2 , we consider generalized entropy rates defined as the upper limits of the rates of Rényi–Arimoto block entropies for a stationary process. If the process satisfies a certain condition stronger than finite excess entropy then the respective generalized entropy rates exist as the proper limits and do not change their value if we impose conditioning on the infinite future. It is an important open question whether this result can be generalized to processes with an infinite excess entropy such as, hypothetically, the natural language.

Recurrence times are the topic of Section 9.3 . The recurrence time is the first position in the stationary process on which the value of the initial block of the specified length reoccurs. Recurrence times are a classical topic in ergodic theory and information theory. We recall some received results such as the Kac lemma and the Kontoyiannis bounds for recurrence times in terms of the block probability. Subsequently, using these propositions, we prove the Wyner–Ziv/Ornstein–Weiss (WZ/OW) theorem, which shows that the rate of recurrence times equals the Shannon entropy rate of a stationary ergodic process almost surely and in expectation.

Section 9.4 treats the concept of subword complexity. Subword complexity is a function that counts how many distinct substrings of a given length are contained in a given string. Subword complexity can be linked with recurrence times. In particular for a stationary process, the expected subword complexity equals the expectation of the recurrence time trimmed to the length of the considered string. Given this result, we can express Jensen gaps for the recurrence time, such as the variance, as series of the expected subword complexity. Using other simple techniques, we can also upper bound the expected subword complexity by the block entropy of the process.

In Section 9.5 , we introduce two maximal lengths: the longest match length and the maximal repetition. The longest match length is smaller than the maximal repetition and grows essentially like the logarithm of the window length divided by the Shannon entropy rate, by the WZ/OW theorem proved in Section 9.3 . In contrast, it was discussed in the literature that the maximal repetition can grow faster. For processes with a finite excess entropy, satisfying the condition mentioned in Section 9.2 , it was shown that the maximal repetition grows essentially like the logarithm of the string length divided by the collision entropy rate. We show two ideas of generalizing this result to arbitrary stationary processes which fail.

To be more positive, in Section 9.6 , we discuss a few bounds for maximal repetition that work for arbitrary stationary processes. We reformulate the problem of bounding the maximal repetition using entropy powers and Hilberg exponents. We show that the power‐law logarithmic growth of maximal repetition corresponds to a power‐law growth of an entropy function if the Hilberg exponent of the respective entropy power of the maximal repetition is approximately constant and bounded away from zero and infinity. We show that this quantity is indeed constant for Rényi–Arimoto entropies, and we present a few positive bounds which apply Kontoyiannis inequalities for recurrence times. These bounds do not fully constrain the growth of maximal repetition, however, and should be strengthened in the future.

9.1 Rényi–Arimoto Entropies

The general goal of this chapter is to furnish some theory for growth rates of maximal repetition. We will approach this topic gradually, moving through various related concepts, whose relationship to our main subject will become clear in the end. To begin, in this section, we will define and investigate properties of generalized entropies called Rényi entropies and Rényi–Arimoto conditional entropies. These quantities generalize the concepts of Shannon entropy and Shannon conditional entropy, respectively. We will link them to maximal repetition ultimately in Section 9.6 .

The unconditional Rényi entropies are defined as follows, see Rényi ( 1961 ).


Definition 9.1 (Rényi entropies)

For a parameter images , the Rényi entropy of a simple random variable images is defined as

(9.1) equation

, we define the Rényi entropy as

(9.2) equation


As a definition of the generalized entropy, Rényi proposed the first formula in ( 9.1 ), which is trivially equal to the second, more decorated formula. The second formula, however, motivates a straightforward generalization of the Rényi entropy to a conditional quantity called the Rényi–Arimoto entropy.

It took some time before this reasonable definition of a generalized conditional entropy was proposed. The nontrivial achievement was to insert the expectation operator in such a place that would guarantee the most interesting algebraic properties of the resulted object. Consequently, the conditional entropy will be generalized as follows, see Fehr and Berens ( 2014 ).


Definition 9.2 (Rényi–Arimoto conditional entropies)

For a parameter images , the Rényi–Arimoto conditional entropy of a simple random variable images given an arbitrary random variable images is defined as

(9.3) equation

where images , whereas for images , we define the Rényi–Arimoto conditional entropy as

(9.4) equation


It can be easily seen that images and images for a constant images . Some special cases of Rényi and Rényi–Arimoto entropies have their names, mentioned in the following proposition. Two of them, the Shannon and the Hartley entropy, have been already encountered.


Theorem 9.1

Some special cases of Rényi and Rényi–Arimoto entropies are:

  1. 1. Hartley entropy:

    (9.5) equation

    (9.6) equation

  2. 2. Shannon entropy:

    (9.7) equation

    (9.8) equation

  3. 3. Collision entropy:

    (9.9) equation

    (9.10) equation

  4. 4. Min‐entropy:

    (9.11) equation

    (9.12) equation



Proof:

It is straightforward that the unconditional expressions are special cases of the conditional expressions so it is sufficient to derive the latter ones.

  1. 1. We have images . Let images . Then

    (9.13) equation

  2. 2. By the L'Hôpital rule, we obtain

    (9.14) equation

    The first derivative can be developed as

    (9.15) equation

    Consequently, we obtain the claim.

  3. 3. These equalities follow by a direct application of formulas ( 9.1 ) and ( 9.3 ).

  4. 4. We obtain

    (9.16) equation


It is a general fact that entropy images decreases if we increase parameter images . This result requires a certain preparation and care. Let images be a probability ‐norm of this distribution as

(9.17) equation

For images , we have

(9.18) equation

since the Shannon entropy is positive. Hence, images is a decreasing function of images . This relationship is called the inequality on means. Somewhat surprisingly, unconditional Rényi entropy images is also a decreasing function of images , in spite of the negative sign, since

(9.19) equation

where the Kullback–Leibler (KL) divergence is also positive.

Now we can state the theorem by Fehr and Berens ( 2014 ) about monotonicity of Rényi–Arimoto entropies.


Theorem 9.2

We have images for images .



Proof:

It is sufficient to prove our claim for images and images and conditional entropies. In both cases, we can denote images and write

(9.20) equation

where the first inequality follows by ( 9.19 ) and the second inequality follows by the Jensen inequality ( Theorem 3.14 ). Hence, we obtain the claim.


Yet we have a simple upper bound for some entropies in terms of the min‐entropy, which is the smallest of all generalized entropies.


Theorem 9.3

We have images for images .



Proof:

For images , we obtain

(9.21) equation


As shown by Fehr and Berens ( 2014 ), the Rényi–Arimoto conditional entropy does not satisfy the exact chain rule like the Shannon conditional entropy, but it satisfies the following weaker inequalities:

(9.22) equation

We will demonstrate now the first two inequalities.


Theorem 9.4

We have images .



Proof:

We have images . Hence, for images , we obtain

(9.23) equation

where the inequality follows by the repeated use of the Jensen inequality ( Theorem 3.14 ) for function images . The other cases of images can be obtained by continuity.



Theorem 9.5

We have images .



Proof:

For images , we obtain

(9.24) equation

The other cases follow by continuity.


9.2 Generalized Entropy Rates

In this section, we will investigate simple properties of Rényi block entropies and Rényi entropy rates, tracing some ideas from Section 5.2 such as the Fekete lemma. In contrast to the Shannon entropy rates, the existence of Rényi entropy rates as proper limits is guaranteed only for a subclass of stationary processes. As it will become clear, this class of processes has a finite excess entropy, so it may be too small as for the needs of statistical language modeling.

Let us consider a stationary process images over a finite alphabet images . By analogy to finite sequences images of symbols images , we will also write infinite sequences images . A similar convention is applied to random variables. Recall the Shannon block entropy images and the Shannon entropy rate images . Formally, we may also define the conditional Shannon block entropy images . By analogy we may consider the following Rényi block entropies.


Definition 9.3 (Block Rényi entropy)

For a stationary process images over a finite alphabet and images , let us define the block Rényi entropies

(9.25) equation

(9.26) equation


By the results of the previous section, images and images are increasing functions of images and decreasing functions of images . Moreover, we have images , images , and images .

Recall that for a stationary process, the Shannon entropy is subadditive, images , and hence by the Fekete lemma ( Theorem 5.11 ), for the process over a finite alphabet, the Shannon entropy rate images can be equivalently defined as the limit

(9.27) equation

By analogy, we may consider the following rates of Rényi block entropies:

(9.28) equation

(9.29) equation

In the second turn, we may ask whether the respective upper limits exist as proper limits. It turns out that the proper limit exists always for the largest of all Rényi entropies.


Theorem 9.6

For a stationary process images over a finite alphabet, we have

(9.30) equation



Proof:

Observe that images . Hence images and thus ( 9.30 ) holds by the Fekete lemma ( Theorem 5.11 ).


Limit images will be called the Hartley entropy rate.

The behavior of other block Rényi entropies seems to be less regular, unless we make some pretty strong assumptions. Consider for example conditions

(9.31) equation

(9.32) equation

Clearly, if condition ( 9.31 ) is satisfied then process images is finitary, i.e. its excess entropy is finite. Thus, condition ( 9.31 ) is probably too strong as for probabilistic modeling of natural language. But as we will see in Section 11.1 , condition ( 9.31 ) is satisfied by hidden Markov processes with a finite number of hidden states. Similar statement holds also for condition ( 9.32 ). Therefore, it makes a certain sense to contemplate conditions ( 9.31 ) and ( 9.32 ) for a while.

In fact, it can be shown that condition ( 9.31 ) is sufficient for the existence of proper Rényi entropy rates. The following result is due to Pittel ( 1985 ).


Theorem 9.7

For a stationary process images over a finite alphabet which satisfies condition ( 9.31 ) and images , we have

(9.33) equation



Proof:

Write images . For images , observe that condition ( 9.31 ) implies

(9.34) equation

Hence, images for images for images by continuity and thus ( 9.33 ) holds by the Fekete lemma ( Theorem 5.11 ).


Similar statements hold also for rates images , which are equal to rates images .


Theorem 9.8

For a stationary process images over a finite alphabet which satisfies condition ( 9.31 ) and images , we have

(9.35) equation



Proof:

It is sufficient to show that differences images tend to zero. Write images and images . For images , assuming ( 9.31 ), we obtain indeed

(9.36) equation

which remains true also for images by continuity. Hence, we obtain the claim.


It is an open question whether relationships ( 9.33 ) and ( 9.35 ) survive when we relax somehow condition ( 9.31 ). Answering this question is important since by the discussion in Chapter 8 , we may suppose that condition ( 9.31 ) is too strong as for probabilistic modeling of natural language, for it implies that excess entropy is finite.

9.3 Recurrence Times

In this section, we will study some basic properties of recurrence times, i.e. the functions which return the first position in an infinite sequence on which the initial block of a given length reoccurs. Recurrence times can be related to both Rényi entropies (see Theorem 9.28 ) and maximal repetition (see Theorem 9.26 ). In this section, we will present a few more fundamental and more celebrated results. It should be noted that recurrence times are a classical topic in ergodic theory and information theory. Their fundamental links with probability and the Shannon entropy rate have been established by Kac ( 1947 ), Wyner and Ziv ( 1989 ), and Ornstein and Weiss ( 1993 ). Less recognized are their links with Rényi entropies (Ko, 2012 ). Recently, recurrence times have been also researched experimentally for natural language (Altmann et al., 2009 ).

The formal definition of the recurrence times is as follows.


Definition 9.4 (Waiting and recurrence times)

The waiting time images is the first position in the infinite sequence images on which a copy of a string images starts,

(9.37) equation

where the infimum of the empty set equals infinity, images . In contrast, the recurrence time images is the first position in the infinite sequence images on which a copy of the finite prefix images restarts,

(9.38) equation


The first proposition concerning recurrence times is due to Kac ( 1947 ). It states that the conditional expectation of the recurrence time is equal to the inverse probability of the recurring event.


Theorem 9.9 (Kac lemma)

Consider a stationary ergodic process images . If images then

(9.39) equation



Proof:

Denoting images , we obtain

(9.40) equation

Recall that images . Since images holds almost surely by the Birkhoff ergodic theorem ( Theorem 4.6 ), then we obtain images for

(9.41) equation

Subsequently, by stationarity we may write

(9.42) equation

which implies the claim.


is also stationary ergodic, as a consequence of the Kac lemma we obtain two probabilistic bounds for the recurrence time, established by Kontoyiannis ( 1998 ). The first Kontoyiannis bound applies unconditional probability.


Theorem 9.10 (Kontoyiannis bound)

For a stationary ergodic process images over a countable alphabet, for any images , we have

(9.43) equation



Proof:

By the conditional Markov inequality (see Theorem 3.11 )

(9.44) equation

and the Kac lemma ( Theorem 9.9 ), we obtain

(9.45) equation

which is the claim.


The second Kontoyiannis bound applies conditional probability.


Theorem 9.11 (Kontoyiannis bound)

For a process images over a finite alphabet of cardinality images , for any images , we have

(9.46) equation



Proof:

By the conditional Markov inequality ( 9.44 ), we obtain

(9.47) equation

, so we have a uniform almost sure bound

(9.48) equation

which implies the claim.


A simple consequence of the Kontoyiannis bounds is the following theorem discovered by Wyner and Ziv ( 1989 ) and Ornstein and Weiss ( 1993 ), which is called the WZ/OW theorem. For a stationary ergodic process over a finite alphabet, the WZ/OW theorem equates the exponential growth rate of the recurrence time to the Shannon entropy rate.


Theorem 9.12 (Almost sure WZ/OW theorem)

For a stationary ergodic process images over a finite alphabet, we have

(9.49) equation

where images is the entropy rate of the process.



Proof:

Putting images in ( 9.43 ) and images in ( 9.46 ) we obtain by the Borel–Cantelli lemma ( Theorem 3.12 ) that sandwich bound

(9.50) equation

holds for all but finitely many images almost surely. But by the proof of the Shannon–McMillan–Breiman (SMB) theorem ( Theorem 6.1 ), we have

(9.51) equation

Hence the claim follows.


A similar result holds in expectation for any stationary process over a finite alphabet. As it can be foreseen, the expected exponential growth rate of the recurrence time is also equal to the Shannon entropy rate.


Theorem 9.13 (Expected WZ/OW theorem)

For a stationary process images over a finite alphabet, we have

(9.52) equation

where images is the Shannon entropy rate of the process.



Proof:

Let images be the block entropy of process images . Observe that images . Hence, applying Theorem 9.10 , we also obtain

(9.53) equation

Conversely, we observe that given images there is a one‐to‐one correspondence between images and images . Moreover, we observe that images . Hence, images for a random variable images assuming values in natural numbers and a constant images , see the proof of a similar bound in Theorem 8.17 . Thus,

(9.54) equation

As a result, we obtain a sandwich bound for expectations,

(9.55) equation

Noticing that images completes the proof.


Using the Kontoyiannis bounds, moments of the recurrence time images can be also bounded by Rényi entropy rates of order images . A related idea will be used in Theorem 9.28 to bound the maximal repetition, via recurrence times, with Rényi entropies.

9.4 Subword Complexity

In this section, we will investigate some properties of subword complexity, i.e. the function which counts how many different substrings of a given length appear in a given string. Subword complexity can be simply related to both recurrence times (see Theorem 9.15 ) and maximal repetition (see Theorem 9.20 ). Subword complexity has not been much researched in information theory but it is a simple characteristic of a string. It has been mostly studied by theoretical computer scientists (Ferenczi, 1999 ; de Luca, 1999 ; Janson et al., 2004 ; Gheorghiciuc and Ward, 2007 ; Ivanko, 2008 ). As we will show in this section, subword complexity can be used to estimate moments of recurrence times, so it should deserve more attention in stochastic processes.

The formal definition of the subword complexity is as follows.


Definition 9.5 (Subword complexity)

The subword complexity images is the number of distinct substrings of length images in string images . In symbols, we have

(9.56) equation

whereas we put images for images .


We note in passing that subword complexity images is the cardinality of the empirical vocabulary images defined in (6.57). Let us write

(9.57) equation

We note the well‐known simple combinatorial bound for the subword complexity

(9.58) equation

where images is the cardinality of the alphabet of symbols images .

It is natural to ask whether subword complexity and recurrence times are related. Let us make the following simple observation, which holds in general.


Theorem 9.14

Let images be an arbitrary infinite sequence. Then

(9.59) equation



Proof:

Observe that for images we have

(9.60) equation

and since images then we obtain the telescope sum

(9.61) equation

Thus, we have derived the claim.


Subsequently, let us define the subword complexity of an infinite sequence and the trimmed recurrence times of a string,

(9.62) equation

(9.63) equation

As a consequence of Theorem 9.14 , an exact equality can be proved for the expectations of subword complexity and trimmed recurrence time, if we assume that the process which generates strings is stationary.


Theorem 9.15

Let images be a stationary stochastic process over a countable alphabet. Then for images , we have

(9.64) equation



Proof:

By identity ( 9.59 ), we have

(9.65) equation

Applying stationarity and inverting the order of summation, we obtain

(9.66) equation

Finally, using identity images for a random variable images taking values in natural numbers yields

(9.67) equation

which is the requested claim for finite images . The claim for infinite images follows hence by the monotone convergence ( Theorem 3.8 ).


We note that the expectation of the recurrence time is images for a process images over an alphabet of cardinality images – by the Kac lemma ( Theorem 9.9 ). Thus, identity ( 9.64 ) is a neat complement of the simple bound ( 9.58 ). We find it intriguing that identity ( 9.64 ) holds for all stationary processes. Similar equalities do not seem to be true for other moments of subword complexity and recurrence times – and even the equality for the expectations may break down for nonstationary sources.

What is somehow surprising, the variance of recurrence time and, more generally, Jensen gaps of recurrence time can be expressed by a series of expected subword complexities. This is a consequence of a more general fact for Jensen gaps of random variables taking values in natural numbers. For a real random variable images and a function images , the Jensen gap is usually defined as difference images . For random variable images taking values in natural numbers and a function images , we will define the Jensen gap as images , where formula

(9.68) equation

extends function images to a piecewise linear function images . For a convex function images , so extended function images is also convex and so defined Jensen gap is positive by the Jensen inequality ( Theorem 3.14 ).

Now let us denote the central second difference operator

(9.69) equation

Let us observe that for a random variable images taking values in natural numbers,

(9.70) equation

since images and thus images . Hence, we obtain the following representation by summing by parts.


Theorem 9.16

Let images be a bounded random variable assuming values in natural numbers. For an arbitrary function images , we have

(9.71) equation



Proof:

For functions images , we observe the identity of summing by parts which takes form

(9.72) equation

Now let us put images . Since images , we obtain images for images and images . This yields

(9.73) equation

Since

(9.74) equation

and images by observation ( 9.70 ), we further derive

(9.75) equation

Thus, the claim follows by conjunction of equalities ( 9.73 ) and ( 9.75 ).


Obviously, images . Thus, Theorem 9.16 has a simple corollary for convex functions, which follows by the monotone convergence.


Theorem 9.17

Let images be a random variable assuming values in natural numbers such that images . Put images for images . For a convex function images we have

(9.76) equation

(9.77) equation



Proof:

Consider images for images . We have

(9.78) equation

Observe that for a convex function images we have images , whereas random variables images are uniformly either increasing or decreasing to images for sufficiently large images . Also terms images and images increase with images to images and images respectively. Hence the claims follow by the monotone convergence ( Theorem 3.8 ).


It is an interesting problem whether inequality ( 9.76 ) can be further generalized. Let us note that there exist convex functions images and linear functions images such that the reverse inequality is true,

(9.79) equation

For example, we can take images , images and images . Then inequality ( 9.79 ) is obtained for images . It may be possible, however, that the desired inequality

(9.80) equation

holds if function images is convex and function images satisfies a sort of contracting condition similar to images .

To make another observation, as a consequence of formula ( 9.77 ), we obtain a bound for the variance images of form

(9.81) equation

where images by convexity of function images .

Let us come back to subword complexity and trimmed recurrence time in the case of a stationary process. Let us write their common expectation as

(9.82) equation

with images . Since images by observation ( 9.70 ), then expectation images is a positive, growing, and concave function of images – like the Shannon block entropy images . Assume now that limit

(9.83) equation

is finite and take a convex function images . By Theorem 9.17 for images we obtain

(9.84) equation

(9.85) equation

As some special cases of formula ( 9.85 ), we obtain for instance expressions

(9.86) equation

(9.87) equation

(9.88) equation

We suppose that the variance of subword complexity is in general smaller than the variance of the respective trimmed recurrence time. Thus, potentially, plugging empirical averages of subword complexities instead of their expectations images into the above formulas, we may estimate Jensen gaps of untrimmed recurrence time given a sample path of a stationary ergodic process.

In the following, we would like to provide some links between the subword complexity and certain entropy functions. Since subword complexity for arbitrary sequences can be quite large, it is convenient to consider the logarithm of the subword complexity. In this way, we obtain the Hartley entropy of a sequence, see Allouche and Shallit ( 2003 ).


Definition 9.6 (Hartley entropy)

The Hartley entropy of a string or an infinite sequence is defined as

(9.89) equation


The Hartley entropy of a sequence can grow at most linearly for a finite alphabet of cardinality images since images in this case. This entropy is naturally connected to the Hartley entropy of a generating stochastic process.


Theorem 9.18

For a stationary process images over a countable alphabet,

(9.90) equation

and if process images is ergodic, then we have equality in ( 9.90 ).



Proof:

Since the alphabet is countable, inequality images holds almost surely for all images , and hence images holds almost surely. Additionally, if the process is ergodic then by the Birkhoff ergodic theorem ( Theorem 4.6 ), if images then the relative frequency of images in images is almost surely strictly greater than zero. Hence, images holds almost surely.


Somewhat less trivial is a bound for the expected subword complexity in terms of the Shannon entropy. The following inequality is based on the results originally formulated by Dębowski ( 2016a , b , 2018b ).


Theorem 9.19

For a stationary process images over a countable alphabet, if images then

(9.91) equation

where we use the integral logarithm

(9.92) equation



Proof:

We will use the identity

(9.93) equation

Hence by the Markov inequality ( Theorem 3.11 ),

(9.94) equation

Observe that images . Therefore, by the Markov inequality ( Theorem 3.11 ), we have

(9.95) equation

for images . Hence, for images , we further obtain from ( 9.94 ) that

(9.96) equation

which is the requested claim.


We would like to stress that bound ( 9.91 ) is valid also for processes over an infinite alphabet. If the random symbols images are words of natural language (which are a priori countably infinitely many) then subword complexity images as a function of text length images is the empirical vocabulary size function, studied in quantitative linguistics (Khmaladze, 1988 ; Baayen, 2001 ). In this domain, also discussed is the type‐token ratio images . On page 9.4 we have observed that for a stationary process, the expected vocabulary size images is a positive, growing, and concave function of text length images . In that case, by Theorem 9.19 , the expected type‐token ratio satisfies

(9.97) equation

if additionally the Shannon entropy images is finite.

We note that for natural language, the empirical vocabulary size images grows approximately like images where images by the Herdan's law discussed in Section 1.3, whereas the unigram entropy of words was estimated cross‐linguistically as images bits (Bentz et al., 2017 ). Hence, Theorem 9.19 gives quite a loose bound in this case. It is interesting, however, to note that finiteness of word entropy is in general a sufficient cause to make the expected type‐token ratio tend to zero, under the hypothesis that texts are generated by a stationary source.

9.5 Two Maximal Lengths

In this section, we will deal with two examples of maximal lengths: the longest match length and the maximal repetition. The longest match length has been researched mostly by information‐theorists (Wyner and Ziv, 1989 ; Ornstein and Weiss, 1993 ; Szpankowski, 1993a ; Kontoyiannis et al., 1998 ; Gao et al., 2008 ). In contrast, the maximal repetition has been studied by computer scientists (de Luca, 1999 ; Kolpakov and Kucherov, 1999b , a ; Crochemore and Ilie, 2008 ), probabilists (Erdös and Rényi, 1970 ; Arratia and Waterman, 1989 ; Shields, 1992 , 1997 ), and information theorists (Szpankowski, 1993b ; Kontoyiannis and Suhov, 1994 ; Dębowski, 2011 , 2017 , 2018b ).

The definition of the longest match length is as follows.


Definition 9.7 (Longest match length)

The longest match length images of an infinite sequence images is the maximal length of its prefix that is repeated within the first images symbols. In symbols, we have

(9.98) equation


Subsequently comes the definition of the maximal repetition.


Definition 9.8 (Maximal repetition)

The maximal repetition images of a string images is the maximal length of a substring that is repeated in the string on possibly overlapping positions. In symbols, we have

(9.99) equation


Maximal repetition can be computed in time which grows linearly with the length of string (Kolpakov and Kucherov, 1999a , b ). Thus, we can easily compute the maximal repetition for empirical data.

The longest match length and the maximal repetition can be connected to recurrence times. To make the simple observation, we have

(9.100) equation

so that we obtain

(9.101) equation

Hence by the almost sure WZ/OW theorem ( Theorem 9.12 ) for a stationary ergodic process images with a Shannon entropy rate images , we obtain

(9.102) equation

The exact proof is left as a simple exercise. As we can see, the rate of the longest match length is exactly equal to the Shannon entropy rate, whereas the rate of the maximal repetition is greater.

Indeed, the first inequality in ( 9.102 ) can be strict, as shown by Shields ( 1992 ). In particular, for any stationary ergodic process images and a function images such that images , there is a measurable function images of infinite sequences and a stationary ergodic process images , where images , such that

(9.103) equation

Whereas the Shannon entropy rate of process images is smaller than that of process images (Gray, 1990 ), a careful analysis of the proof of Shields ( 1992 ) shows that the difference between the two can be made arbitrarily small. Moreover, if we take images to be an IID process, then process images is mixing.

Is there a general upper bound for the maximal repetition in terms of a different entropy function? According to Szpankowski ( 1993a , b ), if process images satisfies both conditions ( 9.31 ) and ( 9.32 ) then not only the collision entropy rates satisfy

(9.104) equation

which we have shown in Section 9.2 but also the maximal repetition obeys

(9.105) equation

As it was mentioned in Section 1.13, it was shown by Dębowski ( 2012b , 2015b ) that the maximal repetition for texts in natural language satisfies the power‐law logarithmic growth and in this context we should rather contemplate condition

(9.106) equation

for an images and images . Moreover, in the context of natural language modeling, probably we cannot assume condition ( 9.31 ) since it implies that the excess entropy is finite. In view of these empirical premises, it is valid to ask whether condition ( 9.106 ) implies in general that the collision entropy rate images exists as a proper limit and is equal to zero. This question is more difficult than it seems and we will not give a definite answer. In the next section, we will only manage to show that if condition ( 9.106 ) holds then images for images .

It is easy to see that the growth rate of the maximal repetition should be somehow related to the growth rate of some sort of collision entropy. Namely, some simple idea of upper bounding the maximal repetition in terms of collision entropy is as follows. We have inequality

(9.107) equation

where as for a stationary ergodic process by identity (4.34) we obtain

(9.108) equation

Hence we obtain images for the difference

(9.109) equation

and consequently

(9.110) equation

which seems to open way to using the Borel–Cantelli lemma. The ugly little problem, however, lies in upper bounding the difference images in terms of images .

To show some fairly promising path that fails, consider the following. Let

(9.111) equation

be the partitions of the probability space into cylinders of a fixed length and let images be their union. We note that we may bound uniformly

(9.112) equation

where

(9.113) equation

Subsequently, since class images has a finite Vapnik–Chervonenkis dimension, we may apply the uniform ergodic theorem by Adams and Nobel ( 2010 ) and the dominated convergence ( Theorem 3.10 ) to obtain images . But unfortunately, we have inequality images if the distribution of process images is nonatomic, so bound ( 9.112 ) is mostly useless when combined with inequality ( 9.110 ), see also Problem 8 .

Discussing bounds for the maximal repetition in terms of entropy functions, we should also take into account some basic algebraic links between maximal repetition, subword complexity, and recurrence times. The link between maximal repetition and subword complexity is captured by the following simple observation.


Theorem 9.20

We have images if and only if images .



Proof:

String images contains images substrings of length images . Among them there can be at most images different substrings. If images , there must be a repeat of length images . Hence images . Conversely, if images , there is a repeat of length images and images .


As a result we obtain these bounds.


Theorem 9.21

We have

(9.114) equation

(9.115) equation



Proof:

We have images if images and images if images . Hence

(9.116) equation

(9.117) equation

from which the claims follow.


Similarly, we can demonstrate the bound

(9.118) equation

We suppose that the variance of subword complexity and also its higher moments images are relatively small for stationary ergodic processes. If it is so, we may use the Taylor series

(9.119) equation

and consequently both probabilities images and images would be controlled by the difference

(9.120) equation

. We will not pursue it, however, since there are a few gaps on the way such as bounding the higher moments in equality ( 9.119 ), see also Problem 10 .

9.6 Logarithmic Power Laws

Eventually, we would like to be constructive and to present a few approaches to bounding the maximal repetition that do work in the general stationary ergodic case. Let us notice that formally the power‐law logarithmic growth of maximal repetition can be linked to a power‐law growth of some generalized block entropies and vanishing of some generalized entropy rates. We observe that condition ( 9.106 ) can be written as

(9.121) equation

for some generalized block entropy function images and its related entropy power

(9.122) equation

Let us observe that if images is an increasing function of block length images then the Hilberg exponent of random variable images is almost surely constant for a stationary ergodic process by Theorem 8.3 . In fact, in this case we can often state a stronger proposition that the Hilberg exponent of function images for some entropy function images is bounded away from zero and infinity. Having such a statement, we can then use this linking result.


Theorem 9.22

Let images be a stationary ergodic process. Suppose that

(9.123) equation

where images and images is an increasing function of images . Then for images we have implications

(9.124) equation

(9.125) equation



Proof:

We notice that for a stationary ergodic process images , the upper and the lower limit of images are almost surely constant by a reasoning similar to the proof of Theorem 8.3 . Hence, first, we have

(9.126) equation

Second, we have

(9.127) equation

Hence, by contradiction, we obtain the second implication.


Resuming, by Theorem 9.22 , if the Hilberg exponent of function images for some entropy images is bounded away from zero and infinity then the power‐law logarithmic growth of maximal repetition is roughly equivalent to the power‐law growth of the generalized entropy function images and implies in particular that the respective entropy rate satisfies images . In the following, we will produce a few bounds of form ( 9.123 ) using Rényi–Arimoto entropies.

Let us observe that the result of Szpankowski ( 1993a , b ) for processes images that satisfy both conditions ( 9.31 ) and ( 9.32 ) can be written in a slightly weaker form as

(9.128) equation

where images is the power of the collision entropy of the process. Unfortunately, this statement rests on the strong assumptions ( 9.31 ) and ( 9.32 ) which do not seem to hold for natural language. Thus we need some other bounds that hold more generally.

A simple application of Theorem 9.20 is the following lower bound applying the concept of Hartley entropy of a sequence, the largest of all Rényi entropies.


Theorem 9.23

For a sequence images over a finite alphabet, let images be the power of the Hartley entropy of the sequence. Assume that images . Then we have

(9.129) equation



Proof:

By Theorem 9.20 , images , where images is cardinality of the alphabet. Consequently, since images , hence the claim follows.


This result has a stochastic counterpart.


Theorem 9.24

For a stationary process images over a finite alphabet, let images be the power of the block Hartley entropy of the process. Assume that images almost surely. Then we have

(9.130) equation



Proof:

By Theorem 9.18 , images almost surely. Hence the claim is a corollary of Theorem 9.23 .


Abound similar to Theorem 9.24 was observed by Dębowski ( 2015b ).

Now we will derive an upper bound of a similar simplicity. The upper bound applies the concept of the conditional min‐entropy, which is the smallest of all Rényi–Arimoto entropies.


Theorem 9.25

For a stationary process images over a finite alphabet, let images be the power of the block conditional min‐entropy. We have

(9.131) equation



Proof:

For images we have

(9.132) equation

Thus by the Bonferroni inequality (2.31),

(9.133) equation

In particular, it follows that

(9.134) equation

Since images for a positive random variable images , using substitution images , we obtain that

(9.135) equation

. Hence by Theorem 8.4 , we infer in this case

(9.136) equation


Bounds similar to Theorem 9.25 were observed in part by Erdös and Rényi ( 1970 ), Shields ( 1997 ), and Kontoyiannis and Suhov ( 1994 ).

Subsequently, we will strengthen Theorems 9.24 and 9.25 , narrowing the sandwich bound for the maximal repetition. We will show that we may replace the block Hartley entropy images with the block Shannon entropy images and the conditional block min‐entropy images with the conditional block Rényi entropies images , where images , slightly improving the constants. For this goal we will apply recurrence times and the Kontoyiannis bounds from Section 9.3 .


Theorem 9.26

For a stationary process images over a countable alphabet, we have

(9.137) equation



Proof:

By relationships ( 9.101 ) and ( 9.59 ) respectively, we have

(9.138) equation

(9.139) equation

Hence, claim follows by stationarity and the Bonferroni inequality (2.31).


Now we will state the strengthening of Theorem 9.24 . A bound similar to the following proposition, albeit slightly weaker, was established by Dębowski ( 2018b ).


Theorem 9.27

For a stationary process images over a countable alphabet, let images be the power of the block Shannon entropy. Assume that

(9.140) equation

Then we have

(9.141) equation



Proof:

By inequality ( 9.137 ), the Markov inequality ( Theorem 3.11 ), and inequality ( 9.55 ), we obtain

(9.142) equation

Hence,

(9.143) equation

and in particular, for images , the respective quantile of the entropy power satisfies

(9.144) equation

It follows hence that images for any images and we obtain the claim by Theorem 8.5 .


An alternative proof of Theorem 9.27 can make use of inequalities ( 9.91 ) and ( 9.114 ). See Dębowski ( 2018b ).

Finally, we will state the strengthening of Theorem 9.25 . A bound similar to the following proposition was shown by Dębowski ( 2018b ).


Theorem 9.28

For a stationary process images over a finite alphabet, let images and images be the power of the block conditional Rényi–Arimoto entropy. Assume that

(9.145) equation

Then we have

(9.146) equation



Proof:

Let images be the cardinality of the alphabet of process images . By inequality ( 9.137 ), the second Kontoyiannis bound ( 9.46 ), and the Markov inequality ( Theorem 3.11 ), we obtain

(9.147) equation

Hence in particular for images we obtain

(9.148) equation

Let us write images . Since images for a positive random variable images , we obtain

(9.149) equation

Substituting images , we further derive

(9.150) equation

where integrals

(9.151) equation

are finite for images . Hence by Theorem 8.4 , we infer in this case

(9.152) equation


It remains an open question whether Theorems 9.27 and 9.28 can be sharpened.

Problems

  1. 9.1 Let random variables images be independent. Show that equality images holds for the Rényi entropies for any images .

  2. 9.2 Show that Definitions 9.1–9.2 and the theorems from Section 9.1 can be generalized to random variables with a countably infinite alphabet.

  3. 9.3 Prove inequality images . Compare your solution with Fehr and Berens ( 2014 ) afterwards.

  4. 9.4 and ( 9.32 ) show that

    (9.153) equation

  5. 9.5 Let images be an arbitrary process over a countable alphabet. For any images show that

    (9.154) equation

    for all but finitely many images almost surely.

  6. 9.6 Prove relationships ( 9.102 ) for a stationary ergodic process over a finite alphabet.

  7. 9.7 Show that subword complexity satisfies images for images , whereas images for images , where images is the maximal repetition of images . Having completed the task, compare your solution with de Luca ( 1999 ).

  8. 9.8 Let images be the cardinality of the alphabet of process images . Show that

    (9.155) equation

  9. 9.9 Let images be an arbitrary process over a countable alphabet. Let us define the empirical distribution

    (9.156) equation

    and let images be the Shannon entropy of distribution images . Argue that images , whereas images if process images is stationary. Finally, show that for images we have

    (9.157) equation

  10. 9.10 Consider a bounded random variable images . Show that

    (9.158) equation

    Hint : Use images .