DeepAI

# Covariance within Random Integer Compositions

Fix a positive integer N. Select an additive composition ξ of N uniformly out of 2^N-1 possibilities. The interplay between the number of parts in ξ and the maximum part in ξ is our focus. It is not surprising that correlations ρ(N) between these quantities are negative; we earlier gave inconclusive evidence that lim_N →∞ρ(N) is strictly less than zero. A proof of this result would imply asymptotic dependence. We now retract our presumption in such an unforeseen outcome. Similar experimental findings apply when ξ is a 1-free composition, i.e., possessing only parts ≥ 2.

06/16/2022

### A Note on Tournaments and Negative Dependence

Negative dependence of sequences of random variables is often an interes...
09/02/2022

### Models of VTC^0 as exponential integer parts

We prove that (additive) ordered group reducts of nonstandard models of ...
12/25/2022

### A general construction of regular complete permutation polynomials

Let r≥ 3 be a positive integer and 𝔽_q the finite field with q elements....
11/20/2018

### A Construction of Zero-Difference Functions

A function f from group (A,+) to group (B,+) is a (|A|, |Im(f)|, S) zero...
06/23/2020

### Discrete correlations of order 2 of generalised Rudin-Shapiro sequences: a combinatorial approach

We introduce a family of block-additive automatic sequences, that are ob...
09/12/2013

### How Relevant Are Chess Composition Conventions?

Composition conventions are guidelines used by human composers in compos...

## 1 Unconstrained and Pinned Solus Bitstrings

Given a random unconstrained bitstring of length , we have

 E(number of 1s)=n/2,V(number of 1s)=n/4

because a sum of independent Bernoulli() variables is Binomial(,).  Expressed differently, the average density of s in a string is , with a corresponding variance .  The word “unconstrained” offers that, in the sampling process, all strings are included and equally weighted.

If we append the string with a , calling this , then there is a natural way [7] to associate with an additive composition of .  For example, if ,

 η=0110100111⟷ξ={2,1,2,3,1,1}

i.e., parts of correspond to “waiting times” for each in .  The number of parts in is equal to the number of s in and the maximum part in is equal to the duration of the longest run of s in , plus one.

In this paper, the word “constrained” refers to the logical conjunction of two requirements:

• A bitstring is pinned if its first bit is and its last bit is .

• A bitstring is solus if all of its s are isolated.

The latter was discussed in [2, 3]; additionally imposing the former is new.  Given a random pinned solus bitstring of length , formulas for number of s and number of s are best expressed using generating functions.

If we append the string with to construct , then the associated is a composition of with all parts .  For example, if ,

 η=010001010010101⟷ξ={2,4,2,3,2,2}.

It should now be clear why, starting with the original -bitstring,

 1+E(number of 1s)=E(number of parts),
 1+E(longest run of 0s)=E(maximum part)

for both scenarios, but the corresponding variances are always equal.

Nej & Satyanarayana Reddy [8] gave an impressive recursion for the number of unconstrained bitstrings of length containing exactly s and a longest run of exactly s:

 Fn(x,y)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩y−1∑i=κFn−i−1(x−i,y)+y∑j=0Fn−y−1(x−y,j)if 1≤x≤n−2 and εn(x,y)=1,λn(y)if x=n−1 and εn(x,y)=1,0otherwise,
 Fn(0,0)=1−κ,Fn(n,n)=1

where (of course) and ,

 εn(x,y)=⎧⎪ ⎪⎨⎪ ⎪⎩1if n≥x % and ⌊nn−x+1⌋≤y≤x,0otherwise

and

 λn(y)=⎧⎪⎨⎪⎩1if n is odd and y=n−12,2otherwise.

Consequently, the numerator of for -bitstrings is

 {n∑x=0x∑y=0(n−x)yFn(x,y)}∞n=1={0,2,11,40,122,338,881,2202,5337,12634,…};

equivalently, the numerator of for -compositions is

 {N∑x=0x∑y=0(N−x)(y+1)Fn(x,y)}∞N=1={1,4,14,42,115,296,732,1757,4125,9516,…}.

The denominator is .  Returning to the unrestricted example, the covariance for is .  Correlations for selected small turn out to be

 {ρ(N):N=5,11,21,51}={−0.890799,−0.752444,−0.654958,−0.530128}

and Table 1 exhibits values for larger .

By a similar argument, we deduce the number of pinned solus bitstrings of length containing exactly s and a longest run of exactly s.  The recursion is identical to before (with replaced by ) but possesses different initial conditions

 Gn(x,0)=1−κ for all 0≤x≤n,Gn(n,n)=1

where , with a different :

 εn(x,y)=⎧⎪ ⎪⎨⎪ ⎪⎩1if n≥x % and (⌊nn−x+1⌋≤y

and a different :

 λn(y)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩1if n is odd and y=n−12,2if ⌊n−12⌋

Consequently, the numerator of under constraints is

 {n∑x=0x∑y=0(n−x)yGn(x,y)}∞n=1={0,0,1,4,10,26,54,118,230,458,864,1632,…};

equivalently, the numerator of under restrictions is

 {N∑x=0x∑y=0(N−x)(y+1)Gn(x,y)}∞N=1={0,2,3,8,17,34,70,131,255,466,868,1565,…}.

The denominator is .  Returning to the -free example, the covariance for is .  Correlations for selected small turn out to be

 {ρ(N):N=7,11,21,51}={−0.945611,−0.860467,−0.763395,−0.629068},

i.e., dependency is more significant than earlier.  Table 1 exhibits values for larger .

## 2 Sketches of Proofs

Let be a set of finite bitstrings and be the subset of consisting of strings of length containing exactly s and a longest run of exactly s.  Let and be the subset of of strings starting with and respectively.

Assume that consists of all unconstrained strings.  If , then is of the form where .  If , then is of the form

 00…0iω2whereω2∈Ωx−i,yn−i,1and1≤i≤y−1

or

 00…0yω3whereω3∈Ωx−y,jn−y,1and0≤j≤y.

We have

 ∣∣Ωx,yn,1∣∣=∣∣Ωx,yn−1,0∣∣+∣∣Ωx,yn−1,1∣∣=∣∣Ωx,yn−1∣∣,
 ∣∣Ωx,yn,0∣∣=y−1∑i=1∣∣Ωx−i,yn−i,1∣∣+y∑j=0∣∣Ωx−y,jn−y,1∣∣=y−1∑i=1∣∣Ωx−i,yn−i−1∣∣+y∑j=0∣∣Ωx−y,jn−y−1∣∣ (1)

hence

 ∣∣Ωx,yn∣∣=y−1∑i=0∣∣Ωx−i,yn−i−1∣∣+y∑j=0∣∣Ωx−y,jn−y−1∣∣

upon addition.  This proof of the recurrence for appeared in [8].

Assume instead that consists of all solus strings.  If , then is of the form where .  We have

 ∣∣Ωx,yn,1∣∣=∣∣Ωx,yn−1,0∣∣=∣∣Ωx,yn−1∣∣−∣∣Ωx,yn−1,1∣∣,

that is,

 ∣∣Ωx,yn∣∣=∣∣Ωx,yn,1∣∣+∣∣Ωx,yn+1,1∣∣=∣∣Ωx,yn−1,0∣∣+∣∣Ωx,yn,0∣∣.

From formula (1) in the preceding,

 ∣∣Ωx,yn,0∣∣=y−1∑i=1∣∣Ωx−i,yn−i,1∣∣+y∑j=0∣∣Ωx−y,jn−y,1∣∣=y−1∑i=1∣∣Ωx−i,yn−i−1,0∣∣+y∑j=0∣∣Ωx−y,jn−y−1,0∣∣

which gives a recurrence underlying what we called in [3].

Let us turn attention to various boundary conditions.  For either unconstrained or solus strings,

 Ωn−1,n−1n=⎧⎨⎩100…0n−1,00…0n−11⎫⎬⎭;

if is odd, then

 Ωn−1,(n−1)/2n=⎧⎪⎨⎪⎩00…0(n−1)/2100…0(n−1)/2⎫⎪⎬⎪⎭;

if is even, then

 Ωn−1,n/2n=⎧⎪⎨⎪⎩00…0(n−2)/2100…0n/2,00…0n/2100…0(n−2)/2⎫⎪⎬⎪⎭.

These imply the expression for . For pinned strings, the latter two results hold, but the former becomes .  The expression for comes from [8]

 Fn(x,y)>0⟺⎧⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪⎩x+⌊xy⌋≤nif y>0 and y∤x,x+xy−1≤nif y>0 and y∣x;
 Gn(x,y)>0⟺⎧⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪⎩x+⌊xy⌋≤nif y>0 and y∤x,x+xy−1≤nif (x>y>0 or x=y=n) and y∣x.

For completeness’ sake, we give the analog of Table 1 for pinned and solus strings.

Table 2: Correlation between number of s and longest run of s within random bitstrings as a function of .

## 3 Acknowledgements

R, Mathematica and Maple have been useful throughout. I am grateful to Ernst Joachim Weniger, Claude Brezinski and Jan Mangaldan for very helpful discussions about convergence acceleration.  Dr. Weniger’s software code and numerical computations were especially appreciated.