Extended Euclidean Algorithm and Inverse Modulo Tutorial

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • Using EA and EEA to solve inverse mod.

КОМЕНТАРІ • 465

  • @callofdutyfanboy555
    @callofdutyfanboy555 9 років тому +507

    how did i get from call of duty to this?

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

      +callofduty fanboy999 The words "EA" and "mod" exist in the video description And those words are also related to video games :)

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

      @@raymondpang3896 wow mad!!

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

      @@raymondpang3896 Nerdiest man ever!!

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

      its a curse (goodluck you are heading towards some fun times)

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

      @@raymondpang3896 I wanted to upvote but didnt want to make it 70

  • @crow4505
    @crow4505 3 роки тому +11

    I know this video is from 7 years ago but it is insanely helpful. Answered a lot of uncertainties! If you ever see this, thank you a lot.

  • @-INK-
    @-INK- 9 років тому +35

    The most clear explanation of this topic on UA-cam! Thank you very much.

  • @iamaboss2528
    @iamaboss2528 Рік тому +8

    I'm not going to say that my professor doesn't know how to explain or teach, but the way you did it was beautiful. Thank you a lot Emily.

  • @prikshit
    @prikshit 10 років тому +17

    You are much much better than my cryptography teacher.
    He would have taken atleast 2 hours to explain this simple concept.
    Thanks Emily for this great lecture.

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

    In 5 minutes you taught me more than my professor could do in 5 hours. Thanks :)

    • @cosymarissa
      @cosymarissa 7 років тому +2

      same!

    • @sudhanshusaini504
      @sudhanshusaini504 7 років тому +42

      hope someone will teach you the past form of teach

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

      In one min
      ua-cam.com/video/kf5sAn_UT-w/v-deo.html

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

      you moron you can't even learn the english language correctly, let alone discrete mathematics. fuck you, ruined my day just like that.

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

      Doomlad me??

  • @EmDickinson
    @EmDickinson  11 років тому +64

    You always wanted your Euclidean Algorithm in the form a x b + c. So you start off by using the 43 and the 17 that are in the question. 17 goes into 43 two times with 9 remainder. Therefore 43 = 17 x 2 + 9.
    Hope that helps.

  • @EmDickinson
    @EmDickinson  11 років тому +86

    Because it's mod 43, you want your final answer to be mod 43 as well (ie. between 0 and 42).
    So it's -5 + 43 = 38.

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

      My teacher is a shit!🙂 X'cuse me Lady,, can you come to my college 😒

    • @t.lnnnnx
      @t.lnnnnx 3 роки тому +2

      i love you for that

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

      Can you solve 80-¹(mod 171)
      My teacher is not good like you

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

      12/10/21 hope you'll notice this ma'am

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

      @@kyletanyente6149 8 yrs ago lol good luck

  • @CyberCatto
    @CyberCatto 2 роки тому +2

    you just destroyed my professor's whole career in 5 minutes and 59 seconds

  • @abdulrahmanmuhammad731
    @abdulrahmanmuhammad731 11 місяців тому +4

    You just taught me a 4 hour math lecture in 6 minutes. Thank you very much.

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

    In such a short time, you explained it very well. I was surfing all over the Internet and couldn't find a proper one. Thanks a lot...!!!

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

    Probably the best explanation I have ever seen. Well done!

  • @いぬとかねことか
    @いぬとかねことか 6 років тому +1

    this legit dissolved my worries so quickly. incredibly satisfying, thanks

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

      I have a doubt from elgmmal when recoving the key I got key value as 7 and when taking inverse for key value it gets 11. I still couldn't understand how it goes?.... it says the concept follows extended euclidean algorithm help me

  • @PankajKumar6493
    @PankajKumar6493 10 років тому +27

    Thank you Emily for such a clear explanation through an example. Helped me in preparing for the Cryptography exam.

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

      I have a doubt from elgmmal when recoving the key I got key value as 7 and when taking inverse for key value it gets 11. I still couldn't understand how it goes?.... it says the concept follows extended euclidean algorithm... help me

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

      Durga R did you get it?

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

    I've been like 3 hours trying to find a good tutorial about this. I love you

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

    Even our P. HD professor can not teach like this. Teaching is a art 🎨. And you have it. Congrats

  • @gg1bbs
    @gg1bbs 9 років тому +12

    Great explanation, clear and concise. That was a massive help studding for my end of semester exams!

  • @3amvortex
    @3amvortex 21 день тому +1

    this was a godsend, THANK YOU

  • @EmDickinson
    @EmDickinson  11 років тому +47

    Al Amin When working mod 43, your answer has to be between 0 and 42. In this example, the answer is -5, which is equivalent to 38 (mod 43). You couldn't say the answer is 37, because it has to be a multiple of 43 (ie. you just add or subtract x lots of 43 until you get a number between 0 and 42).
    -5 (mod43) and 38 (mod43) is also equivalent to 81 (mod43), 124 (mod 43), -48 (mod 43), -91 (mod 43) etc, because when you add or subtract multiples of 43, the answer is always 38.
    I hope this helps!

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

      How come 38 is obtained ,plz show ???

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

      43-5

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

      Perhaps another way to obtain the "38" is to recall that q*43 = 0 (mod 43) for any integer "q" as she did in the video when she set 2*43 = 0 (mod 43). So adding on both sides of equation 1 = 2*43 +(-5)*17 the term 17*43 = 0 (mod 43) we obtain 1+17*43 = 1+0 = 2*43+(-5)*17 + 43*17= 0+(43-5)*17 = 38*17. So we get the desired result 38*17 = 1 (mod 43).

    • @DanielPerez-kz2ec
      @DanielPerez-kz2ec 9 місяців тому

      Think of it as -5 + 43 =38 since you can’t have a negative remainder

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

    I'm glad that videos like this exist on UA-cam.

  • @readward2572
    @readward2572 9 років тому +1

    Your explanation is different from my textbook but I like your way of finding out the solution. Some UA-cam makers use so much fancy technology into their video that I get annoyed. Your video is good and just right to the point. Thank you.

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

    thank you, you have explained what i have been trying to understand for weeks in a few minutes.

  • @jonlae
    @jonlae 8 місяців тому

    by far the best explanation on modular inverse! thank you so much

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

    Thank you. Im in a 6 week discrete math class and im really not understanding things because the professor just flies by everything. This helps!

  • @rawool
    @rawool 10 років тому +4

    Lovely voice, clear explanation. Thanks!

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

    After watching your video twice, I finally understood this. Tysm!

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

    This is a great video. The process is long, but you explained everything so perfectly. Thank you.

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

    This is the best explanation I have came by thus far. Thank you friend.

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

    Talented, brilliant, incredible, amazing, show stopping, spectacular, never the same, totally unique
    saved my life

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

    For hand computation, using modular arithmetic is 5-10x faster than using the extended Euclidean algorithm. 17x ≡ 1 mod 43. I want to add a multiple of 43 to 1 so that the sum is a multiple of 17. That way I can divide by 17 to solve for x. Since 43 ≡ 9 mod 17, and 1 + -2 * 9 = -17, it follows that 17x ≡ 1 - 2*43 ≡ -85 (mod 43). Dividing both sides by 17 then gives x ≡ -5 mod 43.

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

      And how would you do that if you have d ≡ (1/65537) (mod 7275919392).

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

    The best and most easy explanation so far! Kudos to you! Thank you for bringing the red color as well

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

    So helpful it was 7 years ago wao what a simple explanation..:) Why did youstop making videos they are very helpful to students.

  • @wills2537
    @wills2537 10 років тому +2

    Very helpful video and a fit voice. Win win.

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

    This is worth 10 points on my tuesday exam, thank you so much

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

    yo...I love u maa g....ur stupendous ... thanks a lot for the explanation.....hv been scavenging youtube for over an hr till
    I found yours🥰

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

    You should make more videos like this Emily, seriously.

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

    i have a crypto exam in a couple days. thank you so much

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

    brilliant explanation! And love the voice, very soothing!

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

    First of all, thank you very much for the explanation (it sure has helped me in figuring out inverse). But I do have a question. Most of the time I do the subtract part that you do in the ending (the - 5 mod 38 bit).. but I have come across a few examples where this is not needed.. and I cannot explain why. I have an example here (where I have to find the inverse of 12 mod 3079):
    3079 = 12 x 256 + 7
    12 = 7 x 1 + 5
    7 = 5 x 1 + 2
    5 = 2 x 2 +1
    ________________________
    1 = 5 - 2 x 2
    Sub. 2 = 7 - 5
    1 = 5 - (7 - 5) x 2
    1 = 5 - 7 + 5 x 2
    1 = 3 x 5 - 7 x 2
    Sub. 5 = 12 - 7
    1 = 3 x (12 - 7) - 7 x 2
    1 = 3 x 12 - 7 + 7 x 2
    1 = 3 x 12 - 7 x 5
    Sub. 7 = 3079 - 12 x 256
    1 = 3 x 12 - (3079 - 12 x 256) x 5
    1 = 3 x 12 - 3079 + 12 x 256 x 5
    1 = 1283 x 12 - 3079 x 5
    Apparently, 1283 is already the inverse of 12 and substraction is not needed. Could you give me a good example so I can see when I do need to do the substraction and in which situations I do not have to do that step?
    Thanks a bunch, Emily! And thanks again for the vid, been very helpful.

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

    Abantu bezibalo bayathanda ukusiqhumisa amakhanda ngamabomu ugcine ungasizakalanga. Ngiyabonga Dadewethu. That's Zulu, which translates to Mathematicians are so condescending, thank you so much for this simple explanation my sister.

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

    I just spent two weeks on this. Thank you.

  • @VFXCommander
    @VFXCommander 9 років тому +1

    I like your hand writing. Perfect video!

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

    I love the sound the pen makes

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

    Damn with this video the Bezout theorem makes sense too and now i understood this algorithm helps to understand that too :))

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

    Thank you very much, miss Emily!
    I just watched your video and instantly was able to solve it on my own. I hope you have a great day!

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

    YOU'RE A LIFE SAVER!

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

    i like the way you hold the pen.

  • @SnGrg
    @SnGrg 9 років тому +1

    such a clear explanation Emily. Thank you

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

    Thank you so much. It helped me top my cryptography exam.

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

    Thank you for such a straightforward explanation! This was really helpful👍

  • @sagarakaraavan
    @sagarakaraavan 10 років тому

    Thanks for the explanation...I must say you are a great teacher

  • @NurMohammad-m1m
    @NurMohammad-m1m 6 місяців тому

    Awesome tutorial. Thank you mam.

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

    YOU SAVED MY LIFE !!!!!! I LOVE YOU AND THANK YOU !!! 🙌🏾🙌🏾🙌🏾

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

    Omg thank you so much, I was struggling with this for so long!!!

  • @NurMohammad-m1m
    @NurMohammad-m1m 6 місяців тому

    Awesome tutorial mam. Thank you

  • @Vistorri
    @Vistorri 11 років тому

    This helped me. I wasn't after a wikipedia-like explanation so this was ideal.

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

    great ...today is my cryptography paper ..u done a reat job for me ...best wishes

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

    Nice video! Helped me in my course assignment.

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

    i didnt understand why u got 38

  • @Mavers49
    @Mavers49 9 років тому +1

    This was the explanation I needed to clarify the final step and it all makes sense now :) thanks a lot :)

  • @robdunsmuir8090
    @robdunsmuir8090 7 місяців тому

    Thank you! you really helped me solve my question

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

    Thanks a lot! Your video explanation really helped for my exam preparation.

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

    Brilliantly explained! Helped me out a lot with my assignment, much thanks

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

    thank you, everything is clear now

  • @SwissExperiments
    @SwissExperiments 10 років тому +2

    AHHH finally one video that made me snap!
    Thank you for taking your time and explaining step by step what you do!
    I'm curious about one thing: What is your field of study?

    • @lifeandprimes
      @lifeandprimes 10 років тому +2

      I'm studying a bachelor of teaching and a bachelor of science with a major in mathematical modelling and a minor in biological chemistry.

  • @alexweninski8397
    @alexweninski8397 8 днів тому

    yo this video is crazzzzy helpful! so blessseddddd!!!!!

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

    thanks, I was confused about negative answer.

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

    I love you and sending you corona-proof hugs from Turkey

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

    Why would you add this many equations man? This is extremly frustrating. Just make the equation simple instead of adding more equations like
    1 = 9 - (17-9)
    1 = 9 - 17+9
    1 = 2 x 9 - 17
    It's ridiculous. I don't understand how people are commenting ah thank you made this easier. Just make it simple.

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

      I do that so I don’t make any mistakes. It makes it easier for me. I’m sorry that you are frustrated, I hope you have a better day tomorrow.

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

    best explanation ever

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

    What a wonderful video! How nicely explained!
    Thank you

  • @MaximoBrazil2000
    @MaximoBrazil2000 10 років тому

    Thank you Emily Scott, you are an angel...

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

    why didn't i watched this when i was in college . thanks :-)

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

    the best famous person ı've ever seen. thanks for my midterm.

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

    Such a great explanation, thank you so much ,much needed it.keep it up like this

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

    You litterally saved me from a catrophe

  • @archiagarwal.
    @archiagarwal. 3 роки тому

    Ahhh thankyou smm!!
    U saved my time & brain.

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

    Wonderful! Thanks so much for the help!

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

    I don't understand the rule you have applied to get -5 in that simplification

  • @Synarite
    @Synarite 10 років тому

    Very helpful and easy to understand. Thanks!

  • @louis-marcmercier5730
    @louis-marcmercier5730 11 років тому +1

    A short, sharp and very well explained tutorial. Thank you! :)

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

    thanks a lot , I was confused with the minus answer you subtract and got the inverse .

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

    MANN I LIKE THE WAY SHE HOLDS PEN!! :)

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

    Modulo of a negative number (-x) is given by
    (-x)%M = M - (x % M)
    (-5)%43 = 43 - 5mod43 = 38
    Thank me later :)

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

      Thank yoooooou I repeated it many times because of this 38

  • @yO_o.velin0va
    @yO_o.velin0va 10 років тому +1

    First, I would like to say that the explanation is great and the video really helped me with solving my problem, since I've been surfing throughout the internet for the past hour or so searching for a decent and clear explanation of how to do this :D
    I have a question, though - in this case 1 is on the right side, what if it were to be 3 or any other number? As in, for example, 17x congruent to 3 (mod 43) (doesn't matter, if this exists or not, I'm just giving it as an example to explain what I want to say, because I find no other way of saying it xD), so does that mean that the gcd of 17 and 43 has to be 3?

    • @EmDickinson
      @EmDickinson  10 років тому +1

      Good question!
      The number on the right can be any number. Because when you take 17 across to the right side you get (in your example) x = 3/17 (mod 43).
      Another way of writing this is x = 1/17 multiplied by 3 (mod 43).
      So you work out the 1/17 (mod 43) bit, which in the video equals 38. Then you multiply 38 by 3, which equals 114. 114 mod 43 is 28.
      Therefore 17x = 3 (mod 43) equals 28.
      The gcd always has to be 1, no matter what number is on the right side of the equation.

    • @yO_o.velin0va
      @yO_o.velin0va 10 років тому

      Emily Scott Thanks! Your video helped me shitton for my exam on Thursday! : ))))

  • @fastest1321
    @fastest1321 10 років тому +13

    What happened in that last step? where's 17 go and where did 38 come from?

    • @Jdiddy1792
      @Jdiddy1792 10 років тому +15

      At the very beginning x = 1/17 mod 43, so your final answer should be 1/17
      Note 17^-1 is 1/17
      so,
      1 = -5 * 17
      1/17 = -5
      Then because you have a negative number you subtract from 43,
      43-5 = 38
      Note if you got +5, then the answer is 5.

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

      Yeah, when you finish the extended euclidean algorithm, you'll get something being multiplied by the mod number (which you can cross out) and something multiplied by the inverse number (which is the answer).
      The answer was -5, but it has to be between 0 and 42.
      So -5 + 43 = 38

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

      @@Jdiddy1792 I have a doubt from elgmmal when recoving the key I got key value as 7 and when taking inverse for key value it gets 11. I still couldn't understand how it goes?.... it says the concept follows extended euclidean algorithm help me

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

      @@lifeandprimes I have a doubt from elgmmal when recoving the key I got key value as 7 and when taking inverse for key value it gets 11. I still couldn't understand how it goes?.... it says the concept follows extended euclidean algorithm help me

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

    nice voice, simple explanation... subscribed

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

    Very helpful. Thanks

  • @chris_the_scientist
    @chris_the_scientist 10 років тому

    Thank you Emily Scott this was a great help!

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

    very good tutorial, thanks

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

    top notch. thank youuuuuuuuuuu very much

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

    Thank you Emily Jane..Keep up the good work

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

    I love you!!!! You are the BEST!!!

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

    Your voice is so sweet :)

  • @nIrUbU01
    @nIrUbU01 5 років тому +2

    THIS IS NOT HOW YOU WRITE AN X!

  • @cecileinhighheels
    @cecileinhighheels 10 років тому +6

    Hi Emily! Thanks for making this video, I found it really helpful while studying for a discrete math exam.
    I had a question: how did you orient your camera to capture this? I was trying to make a math video but I was getting stuck how to set up the camera.

    • @EmDickinson
      @EmDickinson  10 років тому +49

      Hahah I used the super professional method of balancing my iphone over the edge of a big stack of books.

  • @PhantomMidnight
    @PhantomMidnight 10 років тому

    Thank you for making this video! Very helpful.

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

    like a diamond in the sky !
    thanks a lot.

  • @qiji3309
    @qiji3309 9 років тому +1

    thank you a lot for this brief video!
    :)

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

    You explained well ! Thank you .