You are on page 1of 3

Butterflydiagram

FromWikipedia,thefreeencyclopedia

ThisarticleisaboutbutterflydiagramsinFFTalgorithmsforthesunspotdiagramsofthesamename,see
Solarcycle.
InthecontextoffastFouriertransformalgorithms,abutterflyisaportionof
thecomputationthatcombinestheresultsofsmallerdiscreteFourier
transforms(DFTs)intoalargerDFT,orviceversa(breakingalargerDFTup
intosubtransforms).Thename"butterfly"comesfromtheshapeofthedata
flowdiagramintheradix2case,asdescribedbelow.[1]Theearliest
occurrenceinprintofthetermisthoughttobeina1969MITtechnical
report.[2][3]ThesamestructurecanalsobefoundintheViterbialgorithm,used
forfindingthemostlikelysequenceofhiddenstates.
Mostcommonly,theterm"butterfly"appearsinthecontextoftheCooley
TukeyFFTalgorithm,whichrecursivelybreaksdownaDFTofcomposite
sizen=rmintorsmallertransformsofsizemwhereristhe"radix"ofthe
transform.ThesesmallerDFTsarethencombinedviasizerbutterflies,which
themselvesareDFTsofsizer(performedmtimesoncorrespondingoutputsof
thesubtransforms)premultipliedbyrootsofunity(knownastwiddle
factors).(Thisisthe"decimationintime"caseonecanalsoperformthesteps
inreverse,knownas"decimationinfrequency",wherethebutterfliescome
firstandarepostmultipliedbytwiddlefactors.SeealsotheCooleyTukey
FFTarticle.)

Contents
1
2
3
4
5

Radix2butterflydiagram
Otheruses
Seealso
References
Externallinks

Signalflowgraphconnectingthe
inputsx(left)totheoutputsythat
dependonthem(right)fora
"butterfly"stepofaradix2
CooleyTukeyFFT.Thisdiagram
resemblesabutterfly(asinthe
Morphobutterflyshownfor
comparison),hencethename,
althoughinsomecountriesitis
alsocalledthehourglassdiagram.

Radix2butterflydiagram
Inthecaseoftheradix2CooleyTukeyalgorithm,thebutterflyissimplyaDFTofsize2thattakestwoinputs
(x0,x1)(correspondingoutputsofthetwosubtransforms)andgivestwooutputs(y0,y1)bytheformula(not
includingtwiddlefactors):

Ifonedrawsthedataflowdiagramforthispairofoperations,the(x0,x1)to(y0,y1)linescrossandresemblethe
wingsofabutterfly,hencethename(seealsotheillustrationatright).

Morespecifically,aradix2decimationintimeFFTalgorithm
onn=2pinputswithrespecttoaprimitiventhrootofunity
reliesonO(nlogn)butterfliesoftheform:

wherekisanintegerdependingonthepartofthetransform
beingcomputed.Whereasthecorrespondinginversetransform
canmathematicallybeperformedbyreplacingwith1(and
possiblymultiplyingbyanoverallscalefactor,dependingon
thenormalizationconvention),onemayalsodirectlyinvertthe
butterflies:
Adecimationintimeradix2FFTbreaksalength
NDFTintotwolengthN/2DFTsfollowedbya
combiningstageconsistingofmanybutterfly
operations.

correspondingtoadecimationinfrequencyFFTalgorithm.

Otheruses
Thebutterflycanalsobeusedtoimprovetherandomnessoflargearraysofpartiallyrandomnumbers,bybringing
every32or64bitwordintocausalcontactwitheveryotherwordthroughadesiredhashingalgorithm,sothata
changeinanyonebithasthepossibilityofchangingallthebitsinthelargearray.[4]

Seealso
Mathematicaldiagram
Zassenhauslemma
Signalflowgraph

References
1.AlanV.Oppenheim,RonaldW.Schafer,andJohnR.Buck,DiscreteTimeSignalProcessing,2ndedition(UpperSaddle
River,NJ:PrenticeHall,1989)
2.C.J.Weinstein(19691121).QuantizationEffectsinDigitalFilters(Report).MITLincolnLaboratory.p.42.Retrieved
20150210."Thiscomputation,referredtoasa'butterfly'"
3.Cipra,BarryA.(20120604)."FFTandButterflyDiagram".mathoverflow.net.Retrieved20150210.
4.*Press,WHTeukolsky,SAVetterling,WTFlannery,BP(2007),"Section7.2CompletelyHashingaLargeArray",
NumericalRecipes:TheArtofScientificComputing(3rded.),NewYork:CambridgeUniversityPress,ISBN9780521
880688

Externallinks
explanationoftheFFTandbutterflydiagrams(http://www.relisoft.com/Science/Physics/fft.html).
butterflydiagramsofvariousFFTimplementations(Radix2,Radix4,SplitRadix)(http://www.cmlab.csie.
ntu.edu.tw/cml/dsp/training/coding/transform/fft.html).

Retrievedfrom"https://en.wikipedia.org/w/index.php?title=Butterfly_diagram&oldid=714141297"
Categories: FFTalgorithms Diagrams
Thispagewaslastmodifiedon7April2016,at21:57.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmayapply.
Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.Wikipediaisaregisteredtrademark
oftheWikimediaFoundation,Inc.,anonprofitorganization.

You might also like