Boustrophedon transform

From HandWiki
Short description: Mathematical transformation on sequences

In mathematics, the boustrophedon transform is a procedure which maps one sequence to another. The transformed sequence is computed by an "addition" operation, implemented as if filling a triangular array in a boustrophedon (zigzag- or serpentine-like) manner—as opposed to a "Raster Scan" sawtooth-like manner.

Definition

The boustrophedon transform is a numerical, sequence-generating transformation, which is determined by an "addition" operation.

Figure 1. The boustrophedon transform: Start with the original sequence (in blue), then add numbers as indicated by the arrows, and finally read-off the transformed sequence on the other side (in red, with [math]\displaystyle{ b_0 = a_0 }[/math]).

Generally speaking, given a sequence: [math]\displaystyle{ (a_0, a_1, a_2, \ldots) }[/math], the boustrophedon transform yields another sequence: [math]\displaystyle{ (b_0, b_1, b_2, \ldots) }[/math], where [math]\displaystyle{ b_0 }[/math] is likely defined equivalent to [math]\displaystyle{ a_0 }[/math]. The entirety of the transformation itself can be visualized (or imagined) as being constructed by filling-out the triangle as shown in Figure 1.

Boustrophedon Triangle

To fill-out the numerical Isosceles triangle (Figure 1), you start with the input sequence, [math]\displaystyle{ (a_0, a_1, a_2, \ldots) }[/math], and place one value (from the input sequence) per row, using the boustrophedon scan (zigzag- or serpentine-like) approach.

The top vertex of the triangle will be the input value [math]\displaystyle{ a_0 }[/math], equivalent to output value [math]\displaystyle{ b_0 }[/math], and we number this top row as row 0.

The subsequent rows (going down to the base of the triangle) are numbered consecutively (from 0) as integers—let [math]\displaystyle{ k }[/math] denote the number of the row currently being filled. These rows are constructed according to the row number ([math]\displaystyle{ k }[/math]) as follows:

  • For all rows, numbered [math]\displaystyle{ k \in \mathbb{N} }[/math], there will be exactly [math]\displaystyle{ (k+1) }[/math] values in the row.
  • If [math]\displaystyle{ k }[/math] is odd, then put the value [math]\displaystyle{ a_k }[/math] on the right-hand end of the row.
    • Fill-out the interior of this row from right-to-left, where each value (index: [math]\displaystyle{ (k,j) }[/math]) is the result of "addition" between the value to right (index: [math]\displaystyle{ (k,j+1) }[/math]) and the value to the upper right (index: [math]\displaystyle{ (k-1,j+1) }[/math]).
    • The output value [math]\displaystyle{ b_k }[/math] will be on the left-hand end of an odd row (where [math]\displaystyle{ k }[/math] is odd).
  • If [math]\displaystyle{ k }[/math] is even, then put the input value [math]\displaystyle{ a_k }[/math] on the left-hand end of the row.
    • Fill-out the interior of this row from left-to-right, where each value (index: [math]\displaystyle{ (k,j) }[/math]) is the result of "addition" between the value to its left (index: [math]\displaystyle{ (k,j-1) }[/math]) and the value to its upper left (index: [math]\displaystyle{ (k-1,j-1) }[/math]).
    • The output value [math]\displaystyle{ b_k }[/math] will be on the right-hand end of an even row (where [math]\displaystyle{ k }[/math] is even).

Refer to the arrows in Figure 1 for a visual representation of these "addition" operations.

For a given, finite input-sequence: [math]\displaystyle{ (a_0, a_1, ... a_N) }[/math], of [math]\displaystyle{ N }[/math] values, there will be exactly [math]\displaystyle{ N }[/math] rows in the triangle, such that [math]\displaystyle{ k }[/math] is an integer in the range: [math]\displaystyle{ [0, N) }[/math] (exclusive). In other words, the last row is [math]\displaystyle{ k = N - 1 }[/math].

Recurrence relation

A more formal definition uses a recurrence relation. Define the numbers [math]\displaystyle{ T_{k,n} }[/math] (with k ≥ n ≥ 0) by

[math]\displaystyle{ T_{k,0} = a_k }[/math]
[math]\displaystyle{ T_{k,n} = T_{k,n-1} + T_{k-1,k-n} }[/math]
[math]\displaystyle{ \text{with } }[/math]
[math]\displaystyle{ \quad k,n \in \mathbb{N} }[/math]
[math]\displaystyle{ \quad k \ge n \gt 0 }[/math].

Then the transformed sequence is defined by [math]\displaystyle{ b_n = T_{n,n} }[/math] (for [math]\displaystyle{ T_{2,2} }[/math] and greater indices).

Per this definition, note the following definitions for values outside the restrictions (from the relationship above) on [math]\displaystyle{ (k,n) }[/math] pairs:

[math]\displaystyle{ \begin{align} T_{0,0}\, \overset{\Delta}{=}& \, a_{0} \, \overset{\Delta}{=} \, b_{0}\\ \\ T_{k,0}\, \overset{\Delta}{=}& \, a_{k} \, \iff k \, \text{is even}\\ T_{k,0}\, \overset{\Delta}{=}& \, b_{k} \, \iff k \, \text{is odd}\\ \\ T_{0,k}\, \overset{\Delta}{=}& \, b_{k} \, \iff k \, \text{is even}\\ T_{0,k}\, \overset{\Delta}{=}& \, a_{k} \, \iff k \, \text{is odd}\\ \end{align} }[/math]

Special Cases

In the case a0 = 1, an = 0 (n > 0), the resulting triangle is called the Seidel–Entringer–Arnold Triangle[1] and the numbers [math]\displaystyle{ T_{k,n} }[/math] are called Entringer numbers (sequence A008281 in the OEIS).

In this case the numbers in the transformed sequence bn are called the Euler up/down numbers.[2] This is sequence A000111 on the On-Line Encyclopedia of Integer Sequences. These enumerate the number of alternating permutations on n letters and are related to the Euler numbers and the Bernoulli numbers.

Algebraic definition(s)

Building from the geometric design of the boustrophedon transform, algebraic definitions of the relationship from input values ([math]\displaystyle{ a_i }[/math]) to output values ([math]\displaystyle{ b_i }[/math]) can be defined for different algebras ("numeric domains").

Euclidean (Real) values

In the Euclidean ([math]\displaystyle{ \mathbb{E}^{n} }[/math]) Algebra for Real ([math]\displaystyle{ \mathbb{R}^{1} }[/math])-valued scalars, the boustrophedon transformed Real-value (bn) is related to the input value, (an), as:

[math]\displaystyle{ \begin{align} b_n &= \sum_{k=0}^n \binom{n}{k} a_k E_{n-k} \\ \end{align} }[/math],

with the reverse relationship (input from output) defined as:

[math]\displaystyle{ \begin{align} a_n &= \sum_{k=0}^n (-1)^{n-k} \binom{n}{k} b_k E_{n-k} \end{align} }[/math],

where (En) is the sequence of "up/down" numbers—also known as secant or tangent numbers.[3]

The exponential generating function

The exponential generating function of a sequence (an) is defined by

[math]\displaystyle{ EG(a_n;x)=\sum _{n=0}^{\infty} a_n \frac{x^n}{n!}. }[/math]

The exponential generating function of the boustrophedon transform (bn) is related to that of the original sequence (an) by

[math]\displaystyle{ EG(b_n;x) = (\sec x + \tan x) \, EG(a_n;x). }[/math]

The exponential generating function of the unit sequence is 1, so that of the up/down numbers is sec x + tan x.

References

  1. Weisstein, Eric W. "Seidel-Entringer-Arnold Triangle." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Seidel-Entringer-ArnoldTriangle.html
  2. Weisstein, Eric W. "Eulerian Number." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/EulerianNumber.html
  3. Weisstein, Eric W. "Boustrophedon Transform." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/BoustrophedonTransform.html
  • Millar, Jessica; Sloane, N.J.A.; Young, Neal E. (1996). "A New Operation on Sequences: the Boustrouphedon Transform". Journal of Combinatorial Theory, Series A 76 (1): 44–54. doi:10.1006/jcta.1996.0087. 
  • Weisstein, Eric W. (2002). CRC Concise Encyclopedia of Mathematics, Second Edition. Chapman & Hall/CRC. p. 273. ISBN 1-58488-347-2.