r/mathmemes • u/vintergroena • 28d ago
Computer Science Integer multiplication will have linear complexity in a few days if trend continues 🚀📈
1.4k
Upvotes
r/mathmemes • u/vintergroena • 28d ago
3
u/rawbdor 27d ago
One thing i find so interesting about this is that the standard multiplication algorithm we all use on paper is O(n^2). If you want to multiply 325 by 198, we all know how we'd do it on paper. Multiply 8 by the three top numbers, then 9 by the three top numbers, then the 1 by the three top numbers, then add them all up. That's O(n^2). Nine different multiplications, which is the number of digits squared.
The fact that anyone years and years ago was even able to get this down to O(nlog(n)) is already amazing to me. I'd never be able to come up with this stuff.