Regular paperfolding sequence

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In mathematics the regular paperfolding sequence, also known as the dragon curve sequence, is an infinite automatic sequence of 0s and 1s defined as the limit of the following process:

1
1 1 0
1 1 0 1 1 0 0
1 1 0 1 1 0 0 1 1 1 0 0 1 0 0

At each stage an alternating sequence of 1s and 0s is inserted between the terms of the previous sequence. The sequence takes its name from the fact that it represents the sequence of left and right folds along a strip of paper that is folded repeatedly in half in the same direction. If each fold is then opened out to create right angled corner, the resulting shape approaches the dragon curve fractal.[1] For instance the following curve is given by folding a strip four times to the right and then unfolding to give right angles, this gives the first 15 terms of the sequence when 1 represents a right turn and 0 represents a left turn.

Folding and unfolding a paper strip.

Starting at n = 1, the first few terms of the regular paperfolding sequence are:

1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, ... (sequence A014577 in OEIS)

Properties[edit]

The value of any given term tn in the regular paperfolding sequence can be found recursively as follows. If n = m·2k where m is odd then

t_n =
\begin{cases} 
1 & \text{if } m = 1 \mod 4 \\
0 & \text{if } m = 3 \mod 4
\end{cases}

Thus t12 = t3 = 0 but t13 = 1.

The paperfolding word 1101100111001001..., which is created by concatenating the terms of the regular paperfolding sequence, is a fixed point of the morphism or string substitution rules

11 1101
01 1001
10 1100
00 1000

as follows:

11 1101 11011001 1101100111001001 11011001110010011101100011001001 ...

It can be seen from the morphism rules that the paperfolding word contains at most three consecutive 0s and at most three consecutive 1s.

The paperfolding sequence also satisfies the symmetry relation:

t_n =
\begin{cases} 
1 & \text{if } n = 2^k \\
1-t_{2^k-n} & \text{if } 2^{k-1}<n<2^k
\end{cases}

which shows that the paperfolding word can be constructed as the limit of another iterated process as follows:

1
1 1 0
110 1 100
1101100 1 1100100
110110011100100 1 110110001100100

In each iteration of this process, a 1 is placed at the end of the previous iteration's string, then this string is repeated in reverse order, replacing 0 by 1 and vice versa.

Generating function[edit]

The generating function of the paperfolding sequence is given by

G(t_n;x)=\sum_{n=0}^{\infty}t_nx^n \, .

From the construction of the paperfolding sequence it can be seen that G satisfies the functional relation

G(t_n;x) = G(t_n;x^2) + \sum_{n=0}^{\infty}x^{4n+1} = G(t_n;x^2) + \frac{x}{1-x^4} \, .

Paperfolding constant[edit]

Substituting x = ½ into the generating function gives a real number between 0 and 1 whose binary expansion is the paperfolding word

G(t_n;\frac{1}{2})=\sum_{n=1}^{\infty} \frac{t_n}{2^n}

This number is known as the paperfolding constant[2] and has the value

\sum_{k=0}^{\infty} \frac {8^{2^k}}{2^{2^{k+2}}-1} = 0.85073618820186... (sequence A143347 in OEIS)

General paperfolding sequence[edit]

The regular paperfolding sequence corresponds to folding a strip of paper consistently in the same direction. If we allow the direction of the fold to vary at each step we obtain a more general class of sequences. Given a binary sequence (fi), we can define a general paperfolding sequence with folding instructions (fi).

For a binary word w, let w denote the reverse of the complement of w. Define an operator Fa as

F_a : w \mapsto w a w^\ddagger \

and then define a sequence of words depending on the (fi) by w0 = ε,

w_n = F_{f_1} ( F_{f_2} ( \cdots F_{f_n}(\varepsilon) \cdots ) ) \ .

The limit w of the sequence wn is a paperfolding sequence. The regular paperfolding sequence corresponds to the folding sequence fi = 1 for all i.

If n = m·2k where m is odd then

t_n =
\begin{cases} 
f_j & \text{if } m = 1 \mod 4 \\
1-f_j & \text{if } m = 3 \mod 4
\end{cases}

which may be used as a definition of a paperfolding sequence.[3]

Properties[edit]

  • A paperfolding sequence is not ultimately periodic.[3]
  • A paperfolding sequence is 2-automatic if and only if the folding sequence is ultimately periodic (1-automatic).

References[edit]

  1. ^ Weisstein, Eric W., "Dragon Curve", MathWorld.
  2. ^ Weisstein, Eric W., "Paper Folding Constant", MathWorld.
  3. ^ a b Everest, Graham; van der Poorten, Alf; Shparlinski, Igor; Ward, Thomas (2003). Recurrence sequences. Mathematical Surveys and Monographs 104. Providence, RI: American Mathematical Society. p. 235. ISBN 0-8218-3387-1. Zbl 1033.11006.