An alternating permutation is one in which the difference between each successive pair of adjacent elements changes sign—this is, each "rise" is followed by a "fall", and vice versa. For example, the permutation {1324} is an alternating permutation.

The number of alternating permutations on elements is sometimes called the Euler zigzag number.

Flipping the image upside-down with the "flip" control toggles between the alternating permutations that begin with a rise and those that begin with a fall.