HOME

TheInfoList



OR:

In the context of fast Fourier transform algorithms, a butterfly is a portion of the computation that combines the results of smaller
discrete Fourier transform In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced samples of a function into a same-length sequence of equally-spaced samples of the discrete-time Fourier transform (DTFT), which is a comple ...
s (DFTs) into a larger DFT, or vice versa (breaking a larger DFT up into subtransforms). The name "butterfly" comes from the shape of the data-flow diagram in the radix-2 case, as described below.Alan V. Oppenheim, Ronald W. Schafer, and John R. Buck, ''Discrete-Time Signal Processing'', 2nd edition (Upper Saddle River, NJ: Prentice Hall, 1989) The earliest occurrence in print of the term is thought to be in a 1969 by Subhranil Majumder
MIT The Massachusetts Institute of Technology (MIT) is a private land-grant research university in Cambridge, Massachusetts. Established in 1861, MIT has played a key role in the development of modern technology and science, and is one of the m ...
technical report. The same structure can also be found in the
Viterbi algorithm The Viterbi algorithm is a dynamic programming algorithm for obtaining the maximum a posteriori probability estimate of the most likely sequence of hidden states—called the Viterbi path—that results in a sequence of observed events, especiall ...
, used for finding the most likely sequence of hidden states. Most commonly, the term "butterfly" appears in the context of the
Cooley–Tukey FFT algorithm The Cooley–Tukey algorithm, named after J. W. Cooley and John Tukey, is the most common fast Fourier transform (FFT) algorithm. It re-expresses the discrete Fourier transform (DFT) of an arbitrary composite size N = N_1N_2 in terms of ''N''1 s ...
, which
recursively Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematics ...
breaks down a DFT of
composite Composite or compositing may refer to: Materials * Composite material, a material that is made from several different substances ** Metal matrix composite, composed of metal and other parts ** Cermet, a composite of ceramic and metallic materials ...
size ''n'' = ''rm'' into ''r'' smaller transforms of size ''m'' where ''r'' is the "radix" of the transform. These smaller DFTs are then combined via size-''r'' butterflies, which themselves are DFTs of size ''r'' (performed ''m'' times on corresponding outputs of the sub-transforms) pre-multiplied by
roots of unity In mathematics, a root of unity, occasionally called a de Moivre number, is any complex number that yields 1 when raised to some positive integer power . Roots of unity are used in many branches of mathematics, and are especially important in ...
(known as
twiddle factor A twiddle factor, in fast Fourier transform (FFT) algorithms, is any of the trigonometric constant coefficients that are multiplied by the data in the course of the algorithm. This term was apparently coined by Gentleman & Sande in 1966, and has ...
s). (This is the "decimation in time" case; one can also perform the steps in reverse, known as "decimation in frequency", where the butterflies come first and are post-multiplied by twiddle factors. See also the Cooley–Tukey FFT article.)


Radix-2 butterfly diagram

In the case of the radix-2 Cooley–Tukey algorithm, the butterfly is simply a DFT of size-2 that takes two inputs (''x''0, ''x''1) (corresponding outputs of the two sub-transforms) and gives two outputs (''y''0, ''y''1) by the formula (not including
twiddle factor A twiddle factor, in fast Fourier transform (FFT) algorithms, is any of the trigonometric constant coefficients that are multiplied by the data in the course of the algorithm. This term was apparently coined by Gentleman & Sande in 1966, and has ...
s): :y_0 = x_0 + x_1 \, :y_1 = x_0 - x_1. \, If one draws the data-flow diagram for this pair of operations, the (''x''0, ''x''1) to (''y''0, ''y''1) lines cross and resemble the wings of a
butterfly Butterflies are insects in the macrolepidopteran clade Rhopalocera from the order Lepidoptera, which also includes moths. Adult butterflies have large, often brightly coloured wings, and conspicuous, fluttering flight. The group comprise ...
, hence the name (see also the illustration at right). More specifically, a radix-2 decimation-in-time FFT algorithm on ''n'' = 2 ''p'' inputs with respect to a primitive ''n''-th root of unity \omega^k_n = e^ relies on O(''n'' log2 ''n'') butterflies of the form: :y_0 = x_0 + x_1 \omega^k_n \, :y_1 = x_0 - x_1 \omega^k_n, \, where ''k'' is an integer depending on the part of the transform being computed. Whereas the corresponding inverse transform can mathematically be performed by replacing ''ω'' with ''ω''−1 (and possibly multiplying by an overall scale factor, depending on the normalization convention), one may also directly invert the butterflies: :x_0 = \frac (y_0 + y_1) \, :x_1 = \frac (y_0 - y_1), \, corresponding to a decimation-in-frequency FFT algorithm.


Other uses

The butterfly can also be used to improve the randomness of large arrays of partially random numbers, by bringing every 32 or 64 bit word into causal contact with every other word through a desired hashing algorithm, so that a change in any one bit has the possibility of changing all the bits in the large array.*{{Citation , last1=Press , first1=WH , last2=Teukolsky , first2=SA , last3=Vetterling , first3=WT , last4=Flannery , first4=BP , year=2007 , title=Numerical Recipes: The Art of Scientific Computing , edition=3rd , publisher=Cambridge University Press , publication-place=New York , isbn=978-0-521-88068-8 , chapter=Section 7.2 Completely Hashing a Large Array , chapter-url=http://apps.nrbook.com/empanel/index.html#pg=358


See also

*
Mathematical diagram Mathematical diagrams, such as charts and graphs, are mainly designed to convey mathematical relationships—for example, comparisons over time. Specific types of mathematical diagrams Argand diagram A complex number can be visually repres ...
*
Zassenhaus lemma Zassenhaus is a German surname. Notable people with the surname include: * Hans Zassenhaus (1912–1991), German mathematician ** Zassenhaus algorithm ** Zassenhaus group ** Zassenhaus lemma * Hiltgunt Zassenhaus (1916–2004), German philologi ...
*
Signal-flow graph A signal-flow graph or signal-flowgraph (SFG), invented by Claude Shannon, but often called a Mason graph after Samuel Jefferson Mason who coined the term, is a specialized flow graph, a directed graph in which nodes represent system variables, ...


References


External links


explanation of the FFT and butterfly diagrams


FFT algorithms Diagrams