Free 5-Day Mini-Course: https://backtobackswe.com
Try Our Full Platform: https://backtobackswe.com/pricing
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
Question: Can we multiply 2 numbers using less than n^2 atomic multiplications? Yes, we can.
Update: There is O(n*log(n)) integer multiplication now: https://hal.archives-ouvertes.fr/hal-...
Karatsuba Multiplication On Wikipedia: https://en.wikipedia.org/wiki/Karatsu...
You don't need this for the interview.
++++++++++++++++++++++++++++++++++++++++++++++++++
HackerRank: @hackerrankofficial
Tuschar Roy: tusharroy2525
GeeksForGeeks: @geeksforgeeksvideos
Jarvis Johnson: vsympathyv
Success In Tech: @successintech
Free 5-Day Mini-Course: https://backtobackswe.com
Try Our Full Platform: https://backtobackswe.com/pricing
📹 Intuitive Video Explanations
🏃 Run Code As You Learn
💾 Save Progress
❓New Unseen Questions
🔎 Get All Solutions
Question: Can we multiply 2 numbers using less than n^2 atomic multiplications? Yes, we can.
Update: There is O(n*log(n)) integer multiplication now: https://hal.archives-ouvertes.fr/hal-...
Karatsuba Multiplication On Wikipedia: https://en.wikipedia.org/wiki/Karatsu...
You don't need this for the interview.
++++++++++++++++++++++++++++++++++++++++++++++++++
HackerRank: @hackerrankofficial
Tuschar Roy: tusharroy2525
GeeksForGeeks: @geeksforgeeksvideos
Jarvis Johnson: vsympathyv
Success In Tech: @successintech
The Problem Introduction 0:00 - 0:42
Analyzing Grade School Multiplication 0:42 - 2:09
How Do We Think About Doing Better? 2:09 - 3:06
Ok...Can We Do Better? 3:06 - 3:30
Let's Try A Divide & Conquer Approach 3:30 - 4:22
Redefining x & y In Terms of Our Segments 4:22 - 6:11
Multiplying The New Definitions Together 6:11 - 6:53
We Now Have An Equation For The Decomposition 6:53 - 8:14
Raw Divide & Conquer Approach: Exact Additions 8:14 - ...
Establishing The Worst Length From Multiplications 8:44 - 9:24
Handling The 2 Multiplications On The Edge 11:15 - 13:47
End of "Raw Divide & Conquer Approach: Exact Additions" 13:47
Raw Divide & Conquer Approach: Recurrence 13:47 - 16:43
Raw Divide & Conquer Approach: Solving The Recurrence 16:43 - 21:50
Raw Divide & Conquer Approach: Summing The Work 21:50 - 23:37
A Breakthrough: Karatsuba's Insight & Analyzing Additions 23:37 - 27:18
Karatsuba's Algorithm: Recurrence 27:18 - 28:14
Karatsuba's Algorithm: Solving The Recurrence 28:14 - 30:28
Karatsuba's Algorithm: Summing The Work 30:28 - 31:17
How Did Karatsuba's Do? 31:17 - 32:48
Wrap Up 32:48 - 33:50
Mistakes:
31:20 -> O(n ^ lg(3) ) is the asymptotic bound on the additions. Karatsuba's does not do this exact amount of additions in the worst case since constants were dropped. If you look at the equation on the board, it can be further simplified to see that there will be constants in front of the atomic multiplication symbol.
Update -> There is O(n*log(n)) integer multiplication now: https://hal.archives-ouvertes.fr/hal-02070778/document
Karatsuba multiplication is not the fastest method for multiplication. Wikipedia: "The Toom–Cook algorithm is a faster generalization of Karatsuba's method, and the Schönhage–Strassen algorithm is even faster, for sufficiently large n."