3. Divide & Conquer: FFT

Поділитися
Вставка
  • Опубліковано 27 лис 2024

КОМЕНТАРІ • 211

  • @KaushikMishrakk
    @KaushikMishrakk 5 років тому +237

    Just a tip for new viewers:
    Don't stop!! Continue watching the video, don't expect yourself to understand everything as you go, grab the essence of each section of the video and in the end it is all gonna make sense. If it did not you can always go back but don't quit this video. Amazing job Erik!!!

    • @chill6962
      @chill6962 3 роки тому +2

      Thank you

    • @migueld2456
      @migueld2456 2 роки тому

      This is very wise advise.

    • @__dekana__
      @__dekana__ Рік тому +1

      Thank you

    • @AnthosPhotos
      @AnthosPhotos 9 місяців тому

      I followed the strategy and now reading this comment. Going to advise the same

    • @mrisholukamba1696
      @mrisholukamba1696 5 місяців тому +2

      Thank youu, I rewatched 3 times before i actually got it. And I think i will rewatch for the 4th time to understand more on execution time complexity and some concepts which were mentioned but not explained enough

  • @netoskin
    @netoskin 3 місяці тому +1

    This is the best explanation of the FFT you can find very intuitive and step by step. Most people explain the FFT with a matrix of coefficients and I just never understood it until I saw this more algorithm oriented explanation

  • @junweima
    @junweima 6 років тому +436

    Erik: "I didn't go to high school but I assume in high school you learned this..."

    • @rj-nj3uk
      @rj-nj3uk 5 років тому +20

      Students:"hahahaha"

    • @godfather5557
      @godfather5557 5 років тому +10

      convolution: 12:46

    • @m322_yt
      @m322_yt 4 роки тому +8

      @@julius333333 and yet he’s such a humbling, sympathetic person

    • @tsunghan_yu
      @tsunghan_yu 3 роки тому +7

      8:56

    • @hemiacetal1331
      @hemiacetal1331 2 роки тому +12

      Weird flex but it hurts

  • @personanongrata987
    @personanongrata987 2 роки тому +5

    I first encountered the FFT derivation of the DFT thirty years ago when I took a digital filters class while a graduate student at Georgia Tech, and I am as bolled-over now as I was then by this most elegant and incredibly useful algorithm. Thank you, Professor Demaine.
    --

  • @abdulelahaljeffery6234
    @abdulelahaljeffery6234 8 років тому +92

    This is the best overview of what FFT is, brilliant teacher!

  • @leminhphuc10t1
    @leminhphuc10t1 6 років тому +34

    The part about how size of X needs to be reduced by 2 when we go to X^2 is just brilliant! That explains the choice of x_k's that I saw on other ppl's implementation so well!

  • @mario7501
    @mario7501 4 роки тому +14

    Amazing to see that such a brilliant guy can also be a brilliant educator. From my experience this is pretty rare!

  • @andrestifyable
    @andrestifyable 5 років тому +153

    Am I the only one really impressed by the quality of that chalk? It never makes those high pitched sounds ... soo smooth

    • @hektor6766
      @hektor6766 5 років тому +45

      It's called railroad chalk. Made with calcium sulfate (gypsum), not calcium carbonate (chalk). Softer than chalk hence bolder lines and no screech. Dustier though, so treated with a dust inhibitor, that's why the surface of the stick is yellow but it writes in white.

    • @matthewquinn5192
      @matthewquinn5192 4 роки тому +3

      I didnt want to watch this video because i hate that sound so much, thank you for the reassurance so i can watch without fear

    • @vishalvibes_
      @vishalvibes_ 4 роки тому +2

      Is it hagoromo?

    • @henrypeterson8497
      @henrypeterson8497 2 роки тому +1

      @@vishalvibes_ nope

  • @henrytay1706
    @henrytay1706 2 роки тому +6

    Professor makes his lecture seems the learning material is so easy! Thank you!

  • @skyzhangty1
    @skyzhangty1 3 роки тому +5

    This is THE BEST FFT lecture ever. Erik is simply awesome!

  • @TW0T0NGUE
    @TW0T0NGUE 8 років тому +119

    Not going to lie, I cam here to learn the FFT as an engineering student, but stuck around to learn about this CS time complexity.

    • @tennma6250
      @tennma6250 4 роки тому +1

      same here haha

    • @woosix7735
      @woosix7735 Рік тому +1

      Kinda the whole point of the fft

  • @tibortresla
    @tibortresla 8 років тому +61

    These tattoo jokes tho. BRILLIANT!

  • @sanatanshrivastava1725
    @sanatanshrivastava1725 2 роки тому

    As he puts it, this all was "very cool, very cool".
    Thanks, Erik.

  • @yashjakhotiya5808
    @yashjakhotiya5808 5 років тому +10

    27:46, we can use Lagrange's Formula to compute Coefficients from Samples. It is O(n^2) but avoids inverse computation by Gaussian Elimination.

  • @nalcow
    @nalcow Рік тому +4

    Its always a pleasure to listen Eric's lecture. Great professor.

  • @mavenuparker
    @mavenuparker 7 років тому +5

    Didn't know that Jin from SamuraI Champloo now teaches at MIT.
    Thanks for the amazing overview of FFT. Amazing lecture

    • @SR-kp8zu
      @SR-kp8zu 4 роки тому +2

      lmaooo did not expect to see a samurai champloo reference while learning about the FFT

  • @vamsimohan5369
    @vamsimohan5369 3 роки тому +3

    Throughout the whole video i could not stop wondering about him(he is a child prodigy, became a professor at MIT at 20 )

  • @szyszkienty
    @szyszkienty 3 роки тому +1

    This guy oozes brilliance! Amazing lecture!

  • @sa6opopov
    @sa6opopov 9 місяців тому

    This is the most beautiful algorithm I have seen

  • @aSeaofTroubles
    @aSeaofTroubles 8 років тому +10

    One of the best lectures I've seen :) really brings out the true nature of the DFT

  • @randomperson1048
    @randomperson1048 4 роки тому +3

    Real men cried at the end when he brought up those applications. Truly beautiful mathematics

  • @chethankumar4303
    @chethankumar4303 6 років тому +8

    Gave an in depth understanding of FFT...Brilliant Explanation

  • @muhammedafifi6388
    @muhammedafifi6388 6 років тому +15

    I don't know how I used to call myself an engineer before watching this video!

  • @jayhoeliotdecabrio4050
    @jayhoeliotdecabrio4050 3 роки тому +3

    Erik: "I didn't go to high school but I assume in high school you learned this..." reminds me seldon cooper

  • @akshaydarekar5863
    @akshaydarekar5863 5 років тому +27

    My Brain Stack starts overflowing after 35:00.

  • @DominicLondon
    @DominicLondon 7 років тому +70

    Beware of the plot τwist.

  • @TheBoutchard
    @TheBoutchard 4 роки тому +2

    Me: Has a school assignment where I have to implements an algorithm dividing two polynomials and I have no idea what to do
    This man: I'm about to save this man whole career

  • @programmingbro2424
    @programmingbro2424 3 роки тому +2

    this lecture is freaking amazing

  • @suicide_king6804
    @suicide_king6804 6 років тому +15

    Having barely mastered some basic arithmetic, this may be a little advanced...even though I have no idea wtf this guy is talking about/drawing, it is fascinating to try and understand it.

  • @madhukiranattivilli2321
    @madhukiranattivilli2321 2 роки тому +1

    Implemented FFT algo for both polynomial multiplication and integer multiplication
    Deadly algo :)
    % java FFTPolynomialMultiplication
    i/p polynomial A :
    2 + 3x + xˆ2
    i/p polynomial B :
    1 + 2xˆ2
    n (=2ˆk) = 8
    o/p polynomial C :
    2 + 3x + 5xˆ2 + 6xˆ3 + 2xˆ4
    % java FFTPolynomialMultiplication
    i/p polynomial A :
    8 + 7xˆ2 + 3xˆ3 + 9xˆ5
    i/p polynomial B :
    4 + 5x + 6xˆ2 + 7xˆ3 + 8xˆ4
    n (=2ˆk) = 16
    o/p polynomial C :
    32 + 40x + 76xˆ2 + 103xˆ3 + 121xˆ4 + 103xˆ5 + 122xˆ6 + 78xˆ7 + 63xˆ8 + 72xˆ9
    % java FFTIntegerMultiplication
    i/p integers :
    A = 123,456,789
    B = 956,227,496
    n = 32
    product = 118,052,776,209,670,344
    % java FFTIntegerMultiplication
    i/p integers :
    A = 2,147,483,647
    B = 2,147,483,647
    n = 32
    product = 4,611,686,014,132,420,609

  •  5 років тому +14

    how to be a frisbee player
    join as MIT lecturer

  • @noguide
    @noguide 6 років тому +3

    *Stands up & claps* Eric, take a bow. This should be the reference for any instructor of how to explain the FFT.

  • @khoily9137
    @khoily9137 6 років тому +7

    High pass filter removes low frequency, and low pass filter removes high frequency

    • @xinli6243
      @xinli6243 5 років тому

      yeah, I caught this as well.

  • @abugigi
    @abugigi Рік тому

    Erik is Demaine man!

  • @domenicozaza192
    @domenicozaza192 2 роки тому

    The tatoo gag is amazing!

  • @RandomGuy12562
    @RandomGuy12562 8 років тому +14

    is there a mistake @28:35 ?
    we know V.A = Y ( V - vandermond matrix, A - coefficien matrix, Y - samples matrix)
    (multiplying by V inverse i.e. V^(-1) both sides)
    => V^(-1).V.A = V^(-1).Y
    => A = V^(-1).Y
    So to go from samples matrix to coefficient matrix we need to do V^(-1).Y right ??

    • @donxu1332
      @donxu1332 8 років тому

      you are right.
      it is a mistake

    • @danielf9110
      @danielf9110 7 років тому

      I think you are correct

    • @AdamCajf
      @AdamCajf 6 років тому

      Yes, this should be V^{-1} Y

  • @not_melkor
    @not_melkor 3 роки тому

    This is what reaching GOD Level feels like in teaching?

  • @saltcheese
    @saltcheese 5 років тому +1

    if there is a god, MIT is doing her work

  • @rohankhandelwal7681
    @rohankhandelwal7681 5 років тому +14

    i was present in this class

    • @Deshammanideep
      @Deshammanideep 4 роки тому +3

      That's a great thing. What are you doing now brother...?

    • @vetiarvind
      @vetiarvind 4 роки тому

      Wow you went to mit? How did you apply, from India or USA?

  • @erans0496
    @erans0496 2 роки тому

    Erik: " I didn't go to high school, but I assume in high school algebra you learn this...."
    Me: Drop from CS and cry...

  • @Kaslor1000
    @Kaslor1000 6 років тому +2

    Phenomenal lecture.

  • @martinstefcek4089
    @martinstefcek4089 6 років тому +1

    The root representation should be (x-r1)...(x-r(n-1)) not from (x-r0), you can easily see that if you do it from r0, then you will have polynomial of x^n (which is one degree higher than what he used in the first rep.)

    • @sophiophile
      @sophiophile 3 роки тому +1

      He did this because he claimed you need n points to represent an n-1 polynomial. If you watch later into the video, he wrote it in this weird way cuz he was centring things around the number of points you need, not the number of coefficients represent the polynomial.

  • @leeris19
    @leeris19 6 місяців тому

    COOL! The only thing I don't prefer ( for lack of nicer word ) is the fact that he used a claim for last proof (IFFT). The problem with claims is that they are the result of some careful thinking, we're just proving that that thinking is correct. It would have been beautiful if he showed us the steps that resulted in the inverse of V being a n * V conjugate so we can fully sympathize for I believe sympathizing is the best way to learn math

  • @c0t556
    @c0t556 5 років тому +3

    This guy is so cool

  • @nikhil_kolla_12
    @nikhil_kolla_12 5 років тому +1

    Excellent explanation.

  • @paragggoyal1552
    @paragggoyal1552 2 роки тому

    at last, absolute detail!

  • @sakules
    @sakules 6 років тому +1

    wonderful teacher

  • @iamshadmirza
    @iamshadmirza 8 років тому +1

    This guy is amazing

  • @wtw5002
    @wtw5002 3 роки тому +3

    "Screw Pi" - omg i nearly died. That was hilarious. I deeply regret my decision to avoid STEM classes in high school and college. That was a terrible mistake.

    • @ka1wht
      @ka1wht 3 роки тому

      It’s not too late to learn. Think of the ones you regret not taking and either purchase a book or take a class. One of the greatest things about our minds is that they are malleable.

  • @diofeher
    @diofeher 2 місяці тому

    Brilliant teacher!

  • @hektor6766
    @hektor6766 5 років тому +4

    I was just thinking earlier today about root 2/2 being the sine and cosine of 45 degrees, e^(2)i pi (e^i tau) and how they related to the unit square and circle. Fourier, Gauss, Dirichlet all stood on Euler's shoulders.

    • @englishmotherfucker1058
      @englishmotherfucker1058 4 роки тому +1

      it always comes back to euler like it's rome
      all roads, somewhere, somehow, all lead to euler

  • @MaxMarrone
    @MaxMarrone 5 років тому +4

    Okay, we've figured out how to convert between different representations of polynomials, but how do we go from there to the familiar application of the FFT - converting between the time domain and frequency domain? Given a bunch of samples, we want a weighted sum of sinusoids, but what we get here is the coefficients of a polynomial.

    • @sophiophile
      @sophiophile 3 роки тому +2

      This question has been plaguing me for a while. Did you ever discover an answer to this.

    • @THeMin1000
      @THeMin1000 3 роки тому +6

      @@sophiophilethe coefficients that we get IS the FT, instead of the points being the coefficients of the polynomial representing the time domain function we get the samples from the polynomial representing the polynomial in frequency domain.

  • @AmanGarg95
    @AmanGarg95 8 років тому +8

    Did he just throw a Frisbee at 4:54 ? I cracked up xD

    • @orbik_fin
      @orbik_fin 8 років тому +4

      I guess the idea is to somehow encourage participation. I'd like to know if there's a more in-depth study about this - does it enhance or take away concentration from the actual subject? (Or choice C - neither, it's just a bit of fun)

    • @GMPGIRI
      @GMPGIRI 7 років тому

      let me know if u ever found an answer to it @orbik.

    • @TheKivifreak
      @TheKivifreak 7 років тому

      sounds a little like dog training where you throw a frisbee as a reward for the dog.

    • @ashishjog
      @ashishjog 6 років тому +3

      ua-cam.com/video/HtSuA80QTyo/v-deo.html Here you go watch at 26:27 in that video, Instructor: Srini Devadas, mentions about it!

  • @vivekdabholkar5965
    @vivekdabholkar5965 2 роки тому +3

    Nice lecture! I thought MIT classes would be very hard.

    • @BTDiLmarinen
      @BTDiLmarinen Рік тому +1

      MIT isn't a place for geniuses, it's just a normal university that only accepts students that can apply themselves.

  • @stefanosmakris5641
    @stefanosmakris5641 4 роки тому +1

    This was AWESOME! Thank you!

  • @roushankumar-lu2ov
    @roushankumar-lu2ov 5 років тому +2

    I'm in third semester,but this particular video seems to much difficult ,there are so many things in this I don't know

  • @prateeksamaiya
    @prateeksamaiya 6 років тому +4

    the product of two n-1 degree polynomial will be 2n-2 and we need 2n-1 unique points to derive a 2n-2 degree polynomial and nth root of 1 gives just n points and not 2n So My question is dont we need 2n points intead of n?

    • @_rashadmammadov_
      @_rashadmammadov_ 6 років тому +1

      It's already been noted that two polynomials should be reduced to the same degree and up to the nearest power of 2 (simply by adding the coefficients with zeros). In addition, as a result of the product of two polynomials of degree (n - 1) a polynomial of degree (2n - 2) is obtained; therefore, in order for the result to be correct, it is necessary to double the degrees of each polynomial (again by adding zero coefficients to them)

  • @nayuki2020
    @nayuki2020 6 місяців тому

    around 1:20:00, you can't get pure sine wave from striking a bell. Bell, or piano, or a person singing the same note each has a unique timbre to it. Use an online sine wave generator and listen to what a pure tone sounds like (at a certain frequency). Sing that out feel the difference, and view it under a frequency analyzer, they will look vastly different.

  • @LydellAaron
    @LydellAaron 2 роки тому +1

    53:06, 57:15 takes a moment to give tau some respect. Big flex 💪

  • @jimaaman
    @jimaaman 2 роки тому +1

    Did I come here planning to learn about the nth roots of unity and how polynomial representations can be exploited to improve the scaling of computational complexity... No
    Did I just spend an hour watching this guy because it is freaking interesting and incredibly well presented? You bet I did 😅

  • @ZuvielDrama
    @ZuvielDrama 4 роки тому +1

    This was hard. Hope i will understand it soon.

  • @noguide
    @noguide 6 років тому +8

    LOL 53:04 ^ 57:15 ^ 1:17:08

  • @volleysmackz5960
    @volleysmackz5960 17 днів тому

    What does A(x), B(x) and C(x) indicate here for computing FFT? ig A(x) is some discrete input 1, B(x) is some discrete input 2 which is impulse response function of the system and C(x) is the discrete time output. am I correct?

  • @thinhnguyenvan7003
    @thinhnguyenvan7003 3 роки тому

    53:07 "I believe in Tau so much, I got it tattooed on my arm..."
    wow,lollllllllllll

  • @MrAwesomeaditya
    @MrAwesomeaditya 4 роки тому +3

    is it just me or does he look like post malone had a studious brother

  • @shivamtomar2325
    @shivamtomar2325 4 роки тому

    Nicely explained

  • @ZuvielDrama
    @ZuvielDrama 4 роки тому

    44:00 in this moment, all the other stuff about fft made a little more sense :-)

  • @chinmaydas4053
    @chinmaydas4053 3 роки тому +1

    Sir what is the best programming language for analysis and design of data structures and algorithms??...

  • @azizchafik
    @azizchafik 4 роки тому

    in 42:06 I think we need to compute the sum of cost in each level not only the last !!!

  • @woosix7735
    @woosix7735 Рік тому

    I like this guy

  • @RSPSupply
    @RSPSupply 6 років тому

    Great Job!

  • @linuxmaster2327
    @linuxmaster2327 4 роки тому

    I love you teacher

  • @kokomanation
    @kokomanation 3 роки тому

    FFT sounds like fast Fourier transformation I don’t know what it is though

  • @fatihcihanhizlikan1427
    @fatihcihanhizlikan1427 6 років тому

    I loved this video.

  • @pepehimovic3135
    @pepehimovic3135 Рік тому

    Let me guess, it involves powers of 2?

  • @distrologic2925
    @distrologic2925 4 роки тому

    TAU IS A WHOLE CIRCLE

  • @everaldoantoniomoreiraalve1023

    Amazing!

  • @BuiDucLoc419
    @BuiDucLoc419 5 років тому

    Best lecture

  • @roadracer1593
    @roadracer1593 2 місяці тому

    Dude. I admire your hair. I'm jealous. All my hair is falling out. I'll be bald soon.

  • @off4on
    @off4on 4 роки тому +2

    I think he meant V\Y not V\A at around 29:00...

  • @64standardtrickyness
    @64standardtrickyness 4 роки тому

    OMG why is this not the standard way of introducing FFT

  • @kaustavguharoy4532
    @kaustavguharoy4532 2 роки тому

    Marvellous

  • @aayushbajaj2260
    @aayushbajaj2260 Рік тому

    holy crap, the tau thing

  • @_HarshVerma
    @_HarshVerma 3 роки тому

    "I didn't go to high school but I assume in high school you learned this"
    you dont have to flex like eric :(

  • @shivamp5410
    @shivamp5410 10 місяців тому

    Why do we still have x elements when we split the set and each part has n/2? I'm a bit confused on this part any help would be appreciated. Thanks.

  • @rosenzhang1704
    @rosenzhang1704 6 років тому +2

    why we must take the nth root of unity, cant we take like -1, 1, -2, 2 ....as X? This will also collapse?

    • @elliotwaite
      @elliotwaite 5 років тому +7

      Squaring those numbers will give you 1, 1, 4, 4, giving you the set {1, 4} (a collapse of 4 numbers to 2), but if you square those again you get {1, 16}, which doesn't collapse the set any further. You need the collapsed set to collapse again when you square each value a second time, and then collapse again when you square the numbers a third time, and so on, hence the complex numbers. You could use the nth roots of any number, but using the nth roots of 1 is simpler and lends the alternative representation to represent amplitude and phase information in frequency space. If you used the nth roots of another number I don’t think the alternative representation could be interpreted the same way.

    • @haardshah1676
      @haardshah1676 4 роки тому

      ​@@elliotwaite 1:07:35 if the complex conjugate is just minus the power in the exponential, why did he write exp(-ijkT/n/n)? why the divide by n divide by n (again)? is it a mistake?
      (also sorry I asked as subcomment; I thought it'd get lost in the clutter otherwise)

    • @elliotwaite
      @elliotwaite 4 роки тому

      @@haardshah1676 it looks like the second division by n was a mistake. He realizes this soon after writing it and erases it. Does that answer your question?

  • @beback_
    @beback_ Рік тому

    How does one perform FFT on a larger domain consisting of multiple cosets of a multiplicative subgroup of the field? I've heard it can be done but couldn't find any sources that explained how.

  • @kaiovieira230
    @kaiovieira230 4 роки тому

    Awesome!

  • @bryanlozano8905
    @bryanlozano8905 2 роки тому

    Dude, why are you erasing the chalkboard before I finish taking notes?

  • @JeremyBarbay-g7u
    @JeremyBarbay-g7u Місяць тому

    At 1:05:00, should not the size of the sample vector $C^*$ of $C$ be larger than that of $A$ and $B$,
    given that the polynomial $a*b$ has degree $2n$ if $a$ and $b$ have degree $n$?

  • @cariyaputta
    @cariyaputta 2 роки тому

    It's unfortunate that there's no discrete examples.

    • @mitocw
      @mitocw  2 роки тому

      Problem sets with solutions (and other materials) are available on MIT OpenCourseWare at: ocw.mit.edu/6-046JS15. Best wishes on your studies!

  • @MauriceMauser
    @MauriceMauser 5 місяців тому

    💥 when Marty McFly arrives in 1965 💥

  • @kaushiksurikuchi
    @kaushiksurikuchi 6 років тому +1

    Erik, the best

  • @hektor6766
    @hektor6766 5 років тому

    His sentient, verbal expression of tau is more eloquent than a tattoo could ever be. Eloquence is human, expression is animal, marks are for objects.

    • @PorkBoy69
      @PorkBoy69 Рік тому +1

      That's a really pretentious way to voice the opinion you don't like tattoos, but okay lil bro

  • @VSN1001
    @VSN1001 2 роки тому

    I love how he advocates for tau with so much passion he got a tattoo!

    • @VSN1001
      @VSN1001 2 роки тому

      And yes I support tau!

    • @rownadoherty
      @rownadoherty 2 роки тому +1

      Well... a "tattoo" using a laser-jet printer and a temporary tattoo kit.

  • @udomatthiasdrums5322
    @udomatthiasdrums5322 4 роки тому

    love it!!

  • @qiguosun129
    @qiguosun129 2 роки тому

    Pro Erik is fabulous

  • @phillipabramson9610
    @phillipabramson9610 2 роки тому

    So what is the math doing in practical terms? If I understand correctly, it's using the behavior of a signal over time to determine specific properties of that signal at specific moments. Is that correct?

    • @chrism7574
      @chrism7574 Рік тому +1

      The FFT has a lot of applications. What it's most usually associated with is frequency decomposition. The FFT is just a computationally faster way to calculate the discrete Fourier transform of a periodic signal, which extracts the frequency components of a signal. This is used for basically everything that deals with periodic signals.
      More generally, the FFT can be expanded to include different roots of unity, like finite fields or integer integer rings, and that is used for cryptography and other various topics.
      As far as practicality, this algorithm is a major step forward in the advancement of our species. It touches nearly everything in our current world.

  • @64standardtrickyness
    @64standardtrickyness 4 роки тому

    Does anyone have intuition as to why Fourier transforms pop up here?

  • @Harish-ou4dy
    @Harish-ou4dy 6 місяців тому

    whats the deal with those frizbees?