Generating Chebychev Chaotic Sequence
Cheng-An Yang
May 7, 2012
1 / 22
Chebyshev Dynamic System
Definition
The Chebysheb Dynamic System of degree p is a quadruple
(X, A, ρ(x), Tp) (1)
where
1. X = [−1, 1],
2. A is the Borel σ-algebra on X,
3. ρ(x) = 1
π
√
1−x2
is the density of the invariant measure.
4. Tp : X → X is the Chebyshev polynomial of degree p.
Example:
T2(x) = 2x2
− 1. (2)
2 / 22
Important Properties
Proposition 1 (Lebesgue Spectrum)
The Chebyshev dynamic system has Lebesgue spectrum
fλ,j (x) := Tλpj (x). (3)
Proposition 2 (Mixing)
The Chebyshev dynamic system is mixing, hence ergodic. For all
f ∈ L1(X), ensemble average equals temporal average a.s.
¯f =
X
f (x)ρ(x) dx = lim
N→∞
N−1
n=0
1
N
f (Tn
x). (4)
3 / 22
Generating Chebyshev Chaotic Sequence
The Chebyshev chaotic sequence with seed x0 is the orbit
O+
(x0) = (x0, x1, x2, . . . ), (5)
where
xn = T(xn−1). (6)
The seed x0 is drawn from the invariant measure of the system.
We generate the sequence iteratively according to (6).
4 / 22
Numerical Error in the Iterations
Problems:
Computer only has finite precision.
Each state is rounded to the nearest representable value.
Numerical error propagates to all the following states.
Example: Trapping Problem
The smallest representable floating point number greater than −1 is
M
2
− 1, where M is the machine precision.
If 2x2 < M
4 , T(x) = 2x2 − 1 will be rounded to −1.
The next state T(−1) = 1 is a fix point, that is T(1) = 1.
Consequently all the following states are trapped at 1.
5 / 22
Trigonometric Definition of The Chebyshev Polynomials
A different approach:
The trigonometric relation
Tp(x) = Tp(p arccos(x)) (7)
implies
Tp(cos(θ)) = cos(pθ). (8)
Consider the angle θ as the state of some other dynamic system.
Applying Tp on x is equivalent to multiplying θ by p.
Roughly speaking, the cosine function preserves the dynamics.
These statements can be made more precise and rigorous.
6 / 22
Homomorphism of Dynamic Systems
Consider two dynamic systems (Z, B, ν, S) and (X, A, µ, T).
Definition
A homomorphism of the dynamic systems is a mapping φ : Z → X such
that
1. φ is measurable.
2. φ is measure-preserving, namely ν(φ−1(A)) = µ(A) for all A ∈ A.
3. φ ◦ S(z) = T ◦ φ(z) a.s.
zn
zn+1
S
xn
xn+1
T
φ
φ
7 / 22
Homomorphism of Dynamic Systems
(X, A, µ, T) is said to be a factor of (Z, B, ν, S).
(Z, B, ν, S) is said to be an expansion of (X, A, µ, T).
In our problem, the homomorphism φ is given by
x = cos(2πz). (9)
The dynamic system (Z, B, ν, S) can be identified with
1. Z = [0, 1).
2. B is the Borel σ-algebra.
3. ν is the Lebesgue measure. (Note that ρ(x) is actually the pdf of
cos(2πU), where U is uniformly distributed on Z.)
4. S(z) is the fractional part of pz. That is
S(z) := pz mod 1. (10)
To study (Z, B, ν, S) systematically, we introduce the symbolic dynamics.
8 / 22
Symbolic Dynamics
Definition
A partition of Z is a collection Q = {Qi }i∈I of disjoint measurable subsets
Qi ’s such that
Z =
i∈I
Qi (11)
for some countable I.
Definition
The symbol name, or itinerary of z ∈ Z associated with the partition Q
is the sequence
(an)∞
n=0 = (a0, a1, a2, . . . ), an ∈ I (12)
such that Sn(z) ∈ Qan .
Introducing itinerary enables us to describe the dynamic system on a
suitable sequence space.
9 / 22
Symbolic Dynamics
Each itinerary is an element of the sequence space
Σ+
= IN0
= {(a0, a1, a2 . . . ) : an ∈ I}, where N0 = {0, 1, 2, . . . } .
(13)
The codding map ψ : Z → Σ+ assigns each state z to its itinerary.
Let a = (a0, a1, a2, . . . ) be the itinerary of z. The action S on z is
equivalent to applying a left shift operator σ on a = ψ(z). That is
S(z) ⇔ σ(a) = (a1, a2, a3, . . . ). (14)
In general, the codding is neither injective nor surjective.
When the coding is almost surely unique, the partition Q is called a
generating partition.
10 / 22
Symbolic Dynamics of Z
Express numbers in [0, 1) with base p:
z =
a0
p
+
a1
p2
+
a2
p3
+ . . . , an ∈ {0, 1, 2, . . . , p − 1}, (15)
The mapping from z to a = (an)n∈N0 is injective.
It’s not difficult to see that:
Proposition
For the Chebyshev dynamic system (X, A, µ, T) with degree p, its
expansion (Z, B, ν, S) has the generating partition
Q0 = 0,
1
p
, Q1 =
1
p
,
2
p
, . . . , Qp−1 =
p − 1
p
, 1 . (16)
11 / 22
Symbolic Dynamics of Z
Example: case p = 2
The mapping in the X doamin is T(x) = 2x2 − 1.
The mapping in the Z domain is S(x) = 2x (mod 1).
The generating partition is Q0 = 0, 1
2 and Q1 = 1
2, 1 .
The coding mapping is the binary expansion of z ∈ Z.
The doubling function S is equivalent to the left shift operator σ.
The homomorphism between X and Z is x = cos(2πz).
12 / 22
Properties of The Dynamic System Z
Some properties of the dynamic system (Z, B, ν, S):
It is ergodic.
Every rational seed is eventually periodic.
Every irrational seed has infinite period.
It has periodic orbits of every period.
It has a dense orbit.
13 / 22
Generating Chebyshev Chaos Sequences
So why all the efforts to introduce these concepts?
Computing the orbit in the Z domain is simple: just a left shift.
Transform the orbit to X domain via the homomorphism
x = cos(2πz). May introduce numerical error, but will not propagate
into next state.
Avoid loops and the trapping problem if we pick the seed with infinite
period.
All these good things suggest us that this is the way to go!
14 / 22
Generating Chebyshev Chaos Sequences
However,
1. How do we pick a seed with infinite period? Or equivalently, how to
generate an irrational seed using computers?
2. Since computers have finite precision, after several left shifts the
states will all be zeros!
15 / 22
Generating Chebyshev Chaos Sequences
Luckily, we know how to get around these problems.
Observation 1
Uniformly distributed random variables on Z = [0, 1) are almost surely
irrational.
So at least theoretically, we can generate the seed from a uniformly
distributed random variable U, and this solves the first problem.
16 / 22
Generating Chebyshev Chaos Sequences
To overcome the finite precision problem, note that
Observation 2
The base p representation of U forms a Bernoulli scheme
B = {b = (b0, b1, b2, . . . ) : bn ∈ {0, 1, 2, . . . , p − 1}}, (17)
where bn’s are i.i.d. uniformly distributed random variables.
That is,
Picking up a uniformly distributed seed z0 is the same as generating
i.i.d. random variables.
Since computers have finite precision, we store only M bn’s of the
itinerary.
Each time we left shift the itinerary z, generate a new random
number to refill the least significant bit (LSB).
17 / 22
Generating Chebyshev Chaos Sequences
For the special case p = 2, the Bernoulli scheme becomes the familiar
Bernoulli process.
Algorithm
1. Generate M i.i.d. bits as our seed z.
2. Take x = cos(2πz) to produce the corresponding Chebyshev state x.
3. Left shift z and append the LSB with a random bit.
4. Go to step 2.
Numerical error comes from finite digits of z.
Evaluating cos(2πz) is not exact.
No error propagation.
So the problem becomes finding a good Bernoulli random variable
generator.
18 / 22
Generating Bernoulli Random Variables
(From Wikipedia) Linear Feedback Shift Register (LFSR) is a simple
circuit that produces pseudo-random bits.
1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 1
1 1613 1411
Figure: An example of 16-bit LFSR.
Feedback polynomial: p(x) = x16 + x14 + x13 + x11 + 1.
19 / 22
Linear Feedback Shift Register
The initial value of the LFSR is called the seed.
Maximum-length LFSR: the largest possible period for an n-bit LFSR
is 2n − 1.
The feedback polynomial that achieves maximum-length is called the
primitive polynomial.
Table available for primitive polynomials up to n = 168. (3.7 × 1050)
Bits appears to be white.
20 / 22
Linear Feedback Shift Register
Denote the state vector at time t by
st = (s
(1)
t , s
(2)
t , s
(3)
t , . . . s
(n)
t ). (18)
The next state of LFSR is given by
s
(n)
t+1 = stM, (19)
where
M =







0 0 0 . . . c0
1 0 0 . . . c1
0 1 0 . . . c2
...
...
...
...
...
0 0 0 . . . cn







(20)
has the characteristic polynomial p(x).
21 / 22
Linear Feedback Shift Register
The state space representation of LFSR enables us to calculate
st = s0Mt
(21)
in one step. Good for parallel computing:
22 / 22

Generating Chebychev Chaotic Sequence

  • 1.
    Generating Chebychev ChaoticSequence Cheng-An Yang May 7, 2012 1 / 22
  • 2.
    Chebyshev Dynamic System Definition TheChebysheb Dynamic System of degree p is a quadruple (X, A, ρ(x), Tp) (1) where 1. X = [−1, 1], 2. A is the Borel σ-algebra on X, 3. ρ(x) = 1 π √ 1−x2 is the density of the invariant measure. 4. Tp : X → X is the Chebyshev polynomial of degree p. Example: T2(x) = 2x2 − 1. (2) 2 / 22
  • 3.
    Important Properties Proposition 1(Lebesgue Spectrum) The Chebyshev dynamic system has Lebesgue spectrum fλ,j (x) := Tλpj (x). (3) Proposition 2 (Mixing) The Chebyshev dynamic system is mixing, hence ergodic. For all f ∈ L1(X), ensemble average equals temporal average a.s. ¯f = X f (x)ρ(x) dx = lim N→∞ N−1 n=0 1 N f (Tn x). (4) 3 / 22
  • 4.
    Generating Chebyshev ChaoticSequence The Chebyshev chaotic sequence with seed x0 is the orbit O+ (x0) = (x0, x1, x2, . . . ), (5) where xn = T(xn−1). (6) The seed x0 is drawn from the invariant measure of the system. We generate the sequence iteratively according to (6). 4 / 22
  • 5.
    Numerical Error inthe Iterations Problems: Computer only has finite precision. Each state is rounded to the nearest representable value. Numerical error propagates to all the following states. Example: Trapping Problem The smallest representable floating point number greater than −1 is M 2 − 1, where M is the machine precision. If 2x2 < M 4 , T(x) = 2x2 − 1 will be rounded to −1. The next state T(−1) = 1 is a fix point, that is T(1) = 1. Consequently all the following states are trapped at 1. 5 / 22
  • 6.
    Trigonometric Definition ofThe Chebyshev Polynomials A different approach: The trigonometric relation Tp(x) = Tp(p arccos(x)) (7) implies Tp(cos(θ)) = cos(pθ). (8) Consider the angle θ as the state of some other dynamic system. Applying Tp on x is equivalent to multiplying θ by p. Roughly speaking, the cosine function preserves the dynamics. These statements can be made more precise and rigorous. 6 / 22
  • 7.
    Homomorphism of DynamicSystems Consider two dynamic systems (Z, B, ν, S) and (X, A, µ, T). Definition A homomorphism of the dynamic systems is a mapping φ : Z → X such that 1. φ is measurable. 2. φ is measure-preserving, namely ν(φ−1(A)) = µ(A) for all A ∈ A. 3. φ ◦ S(z) = T ◦ φ(z) a.s. zn zn+1 S xn xn+1 T φ φ 7 / 22
  • 8.
    Homomorphism of DynamicSystems (X, A, µ, T) is said to be a factor of (Z, B, ν, S). (Z, B, ν, S) is said to be an expansion of (X, A, µ, T). In our problem, the homomorphism φ is given by x = cos(2πz). (9) The dynamic system (Z, B, ν, S) can be identified with 1. Z = [0, 1). 2. B is the Borel σ-algebra. 3. ν is the Lebesgue measure. (Note that ρ(x) is actually the pdf of cos(2πU), where U is uniformly distributed on Z.) 4. S(z) is the fractional part of pz. That is S(z) := pz mod 1. (10) To study (Z, B, ν, S) systematically, we introduce the symbolic dynamics. 8 / 22
  • 9.
    Symbolic Dynamics Definition A partitionof Z is a collection Q = {Qi }i∈I of disjoint measurable subsets Qi ’s such that Z = i∈I Qi (11) for some countable I. Definition The symbol name, or itinerary of z ∈ Z associated with the partition Q is the sequence (an)∞ n=0 = (a0, a1, a2, . . . ), an ∈ I (12) such that Sn(z) ∈ Qan . Introducing itinerary enables us to describe the dynamic system on a suitable sequence space. 9 / 22
  • 10.
    Symbolic Dynamics Each itineraryis an element of the sequence space Σ+ = IN0 = {(a0, a1, a2 . . . ) : an ∈ I}, where N0 = {0, 1, 2, . . . } . (13) The codding map ψ : Z → Σ+ assigns each state z to its itinerary. Let a = (a0, a1, a2, . . . ) be the itinerary of z. The action S on z is equivalent to applying a left shift operator σ on a = ψ(z). That is S(z) ⇔ σ(a) = (a1, a2, a3, . . . ). (14) In general, the codding is neither injective nor surjective. When the coding is almost surely unique, the partition Q is called a generating partition. 10 / 22
  • 11.
    Symbolic Dynamics ofZ Express numbers in [0, 1) with base p: z = a0 p + a1 p2 + a2 p3 + . . . , an ∈ {0, 1, 2, . . . , p − 1}, (15) The mapping from z to a = (an)n∈N0 is injective. It’s not difficult to see that: Proposition For the Chebyshev dynamic system (X, A, µ, T) with degree p, its expansion (Z, B, ν, S) has the generating partition Q0 = 0, 1 p , Q1 = 1 p , 2 p , . . . , Qp−1 = p − 1 p , 1 . (16) 11 / 22
  • 12.
    Symbolic Dynamics ofZ Example: case p = 2 The mapping in the X doamin is T(x) = 2x2 − 1. The mapping in the Z domain is S(x) = 2x (mod 1). The generating partition is Q0 = 0, 1 2 and Q1 = 1 2, 1 . The coding mapping is the binary expansion of z ∈ Z. The doubling function S is equivalent to the left shift operator σ. The homomorphism between X and Z is x = cos(2πz). 12 / 22
  • 13.
    Properties of TheDynamic System Z Some properties of the dynamic system (Z, B, ν, S): It is ergodic. Every rational seed is eventually periodic. Every irrational seed has infinite period. It has periodic orbits of every period. It has a dense orbit. 13 / 22
  • 14.
    Generating Chebyshev ChaosSequences So why all the efforts to introduce these concepts? Computing the orbit in the Z domain is simple: just a left shift. Transform the orbit to X domain via the homomorphism x = cos(2πz). May introduce numerical error, but will not propagate into next state. Avoid loops and the trapping problem if we pick the seed with infinite period. All these good things suggest us that this is the way to go! 14 / 22
  • 15.
    Generating Chebyshev ChaosSequences However, 1. How do we pick a seed with infinite period? Or equivalently, how to generate an irrational seed using computers? 2. Since computers have finite precision, after several left shifts the states will all be zeros! 15 / 22
  • 16.
    Generating Chebyshev ChaosSequences Luckily, we know how to get around these problems. Observation 1 Uniformly distributed random variables on Z = [0, 1) are almost surely irrational. So at least theoretically, we can generate the seed from a uniformly distributed random variable U, and this solves the first problem. 16 / 22
  • 17.
    Generating Chebyshev ChaosSequences To overcome the finite precision problem, note that Observation 2 The base p representation of U forms a Bernoulli scheme B = {b = (b0, b1, b2, . . . ) : bn ∈ {0, 1, 2, . . . , p − 1}}, (17) where bn’s are i.i.d. uniformly distributed random variables. That is, Picking up a uniformly distributed seed z0 is the same as generating i.i.d. random variables. Since computers have finite precision, we store only M bn’s of the itinerary. Each time we left shift the itinerary z, generate a new random number to refill the least significant bit (LSB). 17 / 22
  • 18.
    Generating Chebyshev ChaosSequences For the special case p = 2, the Bernoulli scheme becomes the familiar Bernoulli process. Algorithm 1. Generate M i.i.d. bits as our seed z. 2. Take x = cos(2πz) to produce the corresponding Chebyshev state x. 3. Left shift z and append the LSB with a random bit. 4. Go to step 2. Numerical error comes from finite digits of z. Evaluating cos(2πz) is not exact. No error propagation. So the problem becomes finding a good Bernoulli random variable generator. 18 / 22
  • 19.
    Generating Bernoulli RandomVariables (From Wikipedia) Linear Feedback Shift Register (LFSR) is a simple circuit that produces pseudo-random bits. 1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 1 1 1613 1411 Figure: An example of 16-bit LFSR. Feedback polynomial: p(x) = x16 + x14 + x13 + x11 + 1. 19 / 22
  • 20.
    Linear Feedback ShiftRegister The initial value of the LFSR is called the seed. Maximum-length LFSR: the largest possible period for an n-bit LFSR is 2n − 1. The feedback polynomial that achieves maximum-length is called the primitive polynomial. Table available for primitive polynomials up to n = 168. (3.7 × 1050) Bits appears to be white. 20 / 22
  • 21.
    Linear Feedback ShiftRegister Denote the state vector at time t by st = (s (1) t , s (2) t , s (3) t , . . . s (n) t ). (18) The next state of LFSR is given by s (n) t+1 = stM, (19) where M =        0 0 0 . . . c0 1 0 0 . . . c1 0 1 0 . . . c2 ... ... ... ... ... 0 0 0 . . . cn        (20) has the characteristic polynomial p(x). 21 / 22
  • 22.
    Linear Feedback ShiftRegister The state space representation of LFSR enables us to calculate st = s0Mt (21) in one step. Good for parallel computing: 22 / 22