## 1. Introduction

For a positive integer

N, the

Nth linear complexity $L(\mathcal{S},N)$ of a binary sequence

$\mathcal{S}={\left({s}_{i}\right)}_{i=0}^{\infty}$ is the smallest positive integer

L such that there are constants

${c}_{0},{c}_{1},...,{c}_{L-1}\in {\mathbb{F}}_{2}$ with

(We use the convention

$L(\mathcal{S},N)=0$ if

${s}_{0}=\dots ={s}_{N-1}=0$ and

$L(\mathcal{S},N)=N$ if

${s}_{0}=\dots ={s}_{N-2}=0\ne {s}_{N-1}$.) The

Nth linear complexity is a measure for the predictability of a sequence and thus its unsuitability in cryptography. For surveys on linear complexity and related measures of pseudorandomness see [

1,

2,

3,

4,

5,

6].

Let

k be a positive integer. Mauduit and Sárközy introduced the (

Nth)

correlation measure of order k of a binary sequence

$\mathcal{S}={\left({s}_{i}\right)}_{i=0}^{\infty}$ in [

7] as

where the maximum is taken over all

$D=({d}_{1},{d}_{2},...,{d}_{k})$ with non-negative integers

$0\le {d}_{1}<{d}_{2}<...<\phantom{\rule{3.33333pt}{0ex}}{d}_{k}$ and

U such that

$U+{d}_{k}\le N$. (Actually, [

7] deals with finite sequences

${\left({(-1)}^{{s}_{i}}\right)}_{i=0}^{N-1}$ of length

N over

$\{-1,+1\}$.)

Brandstätter and the second author [

8] proved the following relation between the

Nth linear complexity and the correlation measures of order

k:

Roughly speaking, any sequence with small correlation measure up to a sufficiently large order k must have a high Nth linear complexity as well.

For example, the Legendre sequence

$\mathcal{L}={\left({\ell}_{i}\right)}_{i=0}^{\infty}$ defined by

where

$p>2$ is a prime, satisfies

and thus (

1) implies

Using

$L(\mathcal{L},N)\ge L(\mathcal{L},p)$ for any

$N>p$ we get

see [

7,

9] (Theorem 9.2). (Here

$f\left(N\right)\ll g\left(N\right)$ is equivalent to

$\left|f\right(N\left)\right|\le cg\left(N\right)$ for some absolute constant

c.)

The

Nth

maximum-order complexity $M(\mathcal{S},N)$ of a binary sequence

$\mathcal{S}={\left({s}_{i}\right)}_{i=0}^{\infty}$ is the smallest positive integer

M such that there is a polynomial

$f({x}_{1},\dots ,{x}_{M})\in {\mathbb{F}}_{2}[{x}_{1},\dots ,{x}_{M}]$ with

see [

10,

11,

12]. Obviously we have

and the maximum-order complexity is a finer measure of pseudorandomness than the linear complexity.

In this paper we analyze the relationship between maximum-order complexity $M(\mathcal{S},N)$ and the correlation measures ${C}_{k}(\mathcal{S},N)$ of order k. Our main result is the following theorem:

**Theorem** **1.** For any binary sequence $\mathcal{S}$ we have Again, any nontrivial bound on

${C}_{k}(\mathcal{S},N)$ for all

k up to a sufficiently large order provides a nontrivial bound on

$M(\mathcal{S},N)$. For example, for the Legendre sequence we get immediately from (

2)

Now we have either

$M(\mathcal{L},N)>\mathrm{log}p$ and the bound (

4) below is trivial or

$M(\mathcal{L},N)\le \mathrm{log}p$ which implies

see also [

9] (Theorem 9.3). (Here

$f\left(N\right)=O\left(g\right(N\left)\right)$ is equivalent to

$f\left(N\right)\ll g\left(N\right)$.)

We prove Theorem 1 in the next section.

The expected value of the

Nth maximum-order complexity is of order of magnitude

$\mathrm{log}N$, see [

10] as well as [

12] (Remark 4) and references therein. Moreover, by [

13] for a sequence of length

N with very high probability the correlation measure

${C}_{k}(\mathcal{S},N)$ is of order of magnitude

$\sqrt{kN\mathrm{log}N}$ and thus by Theorem 1

$M(\mathcal{S},N)\ge \frac{1}{2}\mathrm{log}N+O\left(\mathrm{log}\mathrm{log}N\right)$ which is in good correspondence to the result of [

10].

In

Section 3 we mention some straightforward extensions.

## 3. Further Remarks

Theorem 1 can be easily extended to

m-ary sequences with

$m>2$ along the lines of [

14]:

Let

$\xi $ be a primitive

mth root of unity. Then we have

As in the proof of Theorem 1 we get

We have one term of absolute value

$N-M$ and

$2{m}^{M}-1$ terms of the form

with

$1\le {h}_{1},\dots ,{h}_{k}<m$,

$0\le {j}_{1}<{j}_{2}<\dots <{j}_{k}\le M$,

$1\le k\le M+1$ and

$\alpha \in \{1,-{\xi}^{f(0,\dots ,0)}\}$.

If

m is a prime, then

$x\mapsto hx$ is a permutation of

${\mathbb{Z}}_{m}$ for any

$h\not\equiv 0\phantom{\rule{0.277778em}{0ex}}mod\phantom{\rule{0.277778em}{0ex}}m$ and the sums in (

5) can be estimated by the correlation measure

${C}_{k}(\mathcal{S},N)$ of order

k for

m-ary sequences as it is defined in [

15] and we get

If

m is composite,

$x\mapsto hx$ is not a permutation of

${\mathbb{Z}}_{m}$ if

$gcd(h,m)>1$ and we have to substitute the correlation measure of order

k by the power correlation measure of order

k introduced in [

14].

Now we return to the case $m=2$.

Even if the correlation measure of order

k is large for some small

k, we may be still able to derive a nontrivial lower bound on the maximum-order complexity by substituting the correlation measure of order

k by its analogue with bounded lags, see [

16] for the analogue of (

1). For example, the two-prime generator

$\mathcal{T}={\left({t}_{i}\right)}_{i=0}^{\infty}$, see [

17], of length

$pq$ with two odd primes

$p<q$ satisfies

if

$gcd(i,pq)=1$ and its correlation measure of order 4 is obviously close to

$pq$, see [

18]. However, if we bound the lags

${d}_{1}<\dots <{d}_{k}<p$ one can derive a nontrivial upper bound on the correlation measure of order

k with bounded lags including

$k=4$ as well as lower bounds on the maximum-order complexity using the analogue of Theorem 1 with bounded lags.

Finally, we mention that the lower bound (

4) for the Legendre sequence can be extended to Legendre sequences with polynomials using the results of [

19] as well as to their generalization using squares in arbitrary finite fields (of odd characteristic) using the results of [

20,

21]. For sequences defined with a character of order

m see [

15].