Interleave sequence

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

In mathematics, an interleave sequence is obtained by merging or shuffling two sequences.

Let S be a set, and let (x_i) and (y_i), i=0,1,2,..., be two sequences in S. The interleave sequence is defined to be the sequence x_0, y_0, x_1, y_1, \dots. Formally, it is the sequence (z_i), i=0,1,2,... given by

 z_i := \left\{\begin{matrix} x_k & \mbox{ if } i=2k \mbox{ is even,}\\ y_k & \mbox{ if } i=2k+1 \mbox{ is odd.} \end{matrix}\right.

Properties

  • Consider two real numbers a and b greater than zero and smaller than 1. One can interleave the sequences of digits of a and b, which will determine a third number c, also greater than zero and smaller than 1. In this way one obtains an injection from the square (0, 1)×(0, 1) to the interval (0, 1). Different radixes give rise to different injections; the one for the binary numbers is called the Z-order curve or Morton code.[2]

References

  1. Lua error in package.lua at line 80: module 'strict' not found..
  2. Lua error in package.lua at line 80: module 'strict' not found..

This article incorporates material from Interleave sequence on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License.