Strassen’s Matrix Multiplication | Divide and Conquer | GeeksforGeeks

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • Find Complete Code at GeeksforGeeks Article: www.geeksforgeeks.org/strassen...
    This video is contributed by Harshit Verma
    Please Like, Comment and Share the Video among your friends.
    Also, Subscribe if you haven't already! :)

Komentáře • 55

  • @nebras__
    @nebras__ Před 5 lety +156

    thank you .. my left ear loved the video

  • @soumitramehrotra2045
    @soumitramehrotra2045 Před 4 lety +1

    where is the addition of matrices comes into the picture as you say ut takes O(N^2) for addition?

  • @nazishschughtai5712
    @nazishschughtai5712 Před 3 lety +1

    amazing video.. thanks

  • @arushiraj8607
    @arushiraj8607 Před 2 lety +1

    thanks😊, very helpful.

  • @manojprajapati932
    @manojprajapati932 Před 5 lety +7

    Strassen’s Matrix Multiplication looks incorrect. The correct algorithm is here en.wikipedia.org/wiki/Strassen_algorithm

  • @saifhaider2310
    @saifhaider2310 Před 7 lety +8

    what if matrix is oddxodd i.e if 7x7
    then how to devide into 4 matrix

    • @erick9016
      @erick9016 Před 6 lety +11

      you convert them into 8x8 by adding a row & column of just zeroes. Everything else works identically

    • @googol-boy-data
      @googol-boy-data Před 6 lety +4

      It's necessary, because Strassen algorithm can only be done on 2^n x 2^n matrix

    • @shivatejachavali787
      @shivatejachavali787 Před 4 lety

      @@googol-boy-data nice

  • @keshavmaheshwari521
    @keshavmaheshwari521 Před 3 lety

    why is it not preferred for practical purposes

  • @Nellak2011
    @Nellak2011 Před 4 lety +6

    Turns out, the optimal amount of operations in the optimal algorithm would perform only 4 operations instead of Strassen's 7.
    Because, the optimal algorithm would run in O(n^2) time

    • @bonbonpony
      @bonbonpony Před 3 lety +1

      What lead you to this conclusion?
      Just because the resulting matrix has 4 cells, doesn't mean that this is the minimal number of multiplications required, because you still need some way to combine 8 cells coming from 2 factor matrices somehow. And they are combined as dot products. The only thing you can do is to reshape their formulas in such a way that would lower the number of multiplications (at the cost of increasing the number of additions - those are usually less expensive to calculate), by reusing some partial results.

    • @solsane5217
      @solsane5217 Před 2 lety +11

      If you could implement a sequential O(n^2) matrix multiplication algo you'd get a Nobel prize.

  • @muskanrai2282
    @muskanrai2282 Před 6 lety +2

    Good job 👍 sir

  • @ankitvashisht7350
    @ankitvashisht7350 Před 5 lety

    why strassen's method is not preferred for practical purposes ?

    • @anshul4249
      @anshul4249 Před 5 lety +3

      Most probably because we would prefer small calculations several times rather than large calculations.....

    • @vishalkumarsingh5509
      @vishalkumarsingh5509 Před rokem

      Because it only works for square matrixes

  • @KeshaShah1106
    @KeshaShah1106 Před 7 lety +4

    how do u come up with p1 to p7 formula?

    • @harshitv
      @harshitv Před 7 lety +2

      That is Strassen's formula. All you can do is memorise it. See here: www.geeksforgeeks.org/easy-way-remember-strassens-matrix-equation/

    • @frozenarmymc2182
      @frozenarmymc2182 Před 5 lety

      It’s just an invention, some found it and it worked

  • @cvismenu
    @cvismenu Před 4 lety

    Thank you

  • @satyam_krishna
    @satyam_krishna Před 5 lety +13

    not useful,just reading the ppt

  • @chiefjudge8456
    @chiefjudge8456 Před 6 lety +13

    You didn't explain the method. You also wrote lg7 (or log_2 7) as log 7 which is confusing.

    • @shushrutgupta
      @shushrutgupta Před 6 lety +1

      If your ever read Introduction to Algorithms by Cormen, you will notice that, log_2(n) is written as lg n and log_e(n) is written as ln n

    • @DeepakKumar-wv7jg
      @DeepakKumar-wv7jg Před 5 lety +1

      Rtaaaa maarrr

    • @khorshidvahidi
      @khorshidvahidi Před 5 lety +3

      In computer science, any log is assumed to have base 2 unless specified otherwise

    • @brianevans4
      @brianevans4 Před 4 lety

      I think generally speaking log(n) is assumed to be log base 10 of n

    • @bonbonpony
      @bonbonpony Před 3 lety +1

      @@brianevans4 Unfortunately, it depends on the country/school/book. Different authors use different notations (as if there wasn't enough confusion already :q ).

  • @asoahmadzade4305
    @asoahmadzade4305 Před 2 lety

    nice job

  • @sanjayjeyavel9871
    @sanjayjeyavel9871 Před 7 lety +3

    It would have been even more useful if u had explained the implementation of the algo!!! nice video though!

  • @cahitskttaramal3152
    @cahitskttaramal3152 Před 3 lety +6

    This was a bad explanation. I mean why bother if you won't go deep and explain the theory behind it in the video? I found this whole info and understand in 20 seconds on google before watch this. No need to watch 4.5 mins video for this. Man I hate to dislike informative videos on CZcams but sometimes they really push!

    • @bonbonpony
      @bonbonpony Před 3 lety +3

      As they say, for every Wikipedia page, there's an Indian video on CZcams trying to tell you the same with pseudo-English.

    • @kartikanand6348
      @kartikanand6348 Před 3 lety +2

      @@bonbonpony I mean, I'm an Indian, but lol, that's to the point XD

  • @poojapoojadhapte1430
    @poojapoojadhapte1430 Před rokem

    Matrix multiplication algorithm

  • @DeepakKumar-wv7jg
    @DeepakKumar-wv7jg Před 5 lety +3

    Saaale ka bol rha hai khud ki pta hau

  • @shashankvashishtha4454
    @shashankvashishtha4454 Před 5 měsíci

    could not understand

  • @drwhackadoodle360
    @drwhackadoodle360 Před 4 lety +3

    This isn't explained properly at all

    • @bonbonpony
      @bonbonpony Před 3 lety

      You should have expected that from the beginning after hearing Indian accent, shouldn't you? :q

    • @ronakpatil6081
      @ronakpatil6081 Před 3 lety

      @@bonbonpony so ,instead watch abdul bari another indian with great explanation of the algorithm
      it would help you definitely then you will not have any problem with indian accent😂

    • @bonbonpony
      @bonbonpony Před 3 lety

      @@ronakpatil6081 I don't have a problem with Indian accent. (In fact, I watched quite a lot of Indian video lectures from NPTEL etc.). I have a problem with Indian people who think that they understand something and they can teach about it, and then flooding CZcams with crappy videos recorded with a cucumber, with traffic noises in the background, and "explaining" to me with their poor unintelligible English the stuff that I could just read from Wikipedia. Or worse, making videos in Hindi but putting English titles to deceive English-speaking people into watching them.

  • @kemal4282
    @kemal4282 Před 5 lety +13

    can u guys stop speaking like hindi while speaking english

    • @Nikhil-pm6rn
      @Nikhil-pm6rn Před 4 lety +2

      can you guys stop speaking in english

    • @shivatejachavali787
      @shivatejachavali787 Před 4 lety

      sad reacts only

    • @vishnuramj4660
      @vishnuramj4660 Před 3 lety

      @@Nikhil-pm6rn hindi theriyadhu poda

    • @Nikhil-pm6rn
      @Nikhil-pm6rn Před 3 lety +1

      @@vishnuramj4660 OK bro, I will start a channel just for you and tamilians.

    • @bonbonpony
      @bonbonpony Před 3 lety +1

      @@Nikhil-pm6rn There should be an entire separate CZcams for them, so that they didn't have to spam the regular CZcams with their crappy unintelligible videos about every single subject on Earth.

  • @rishabhraj865
    @rishabhraj865 Před 4 lety +3

    have you ever hear about Abdul Bari, go get some skill how to teach..