Number Theory for Competitive Programming | Topic Stream 9
Colin Galen Colin Galen
233K subscribers
41,879 views
0

 Published On Oct 10, 2021

Tutorial on number theory, including most of the basic stuff and a few more advanced things. Note the rather unusual stream time. Sorry that this has (repeatedly) been delayed - for whatever reason, I had a huge aversion to actually recording this, and I'm not sure why.

Links:
Mashup (practice problems): https://codeforces.com/contestInvitat...
Problem difficulties (and sources): https://pastebin.com/Tt26QKbM
Stream time (actually 1.5 days since upload, not 2.5 days): https://www.timeanddate.com/worldcloc...
https://docs.google.com/presentation/... (slides)
https://cp-algorithms.com/algebra/phi... (totient function)
https://discuss.codechef.com/t/guide-... (proof of Fermat’s little theorem, and some more stuff on modulo)
https://cp-algorithms.com/algebra/fac... (some more prime factorization methods)
https://github.com/maksim1744/program... (super fast prime factorization)
https://brilliant.org/wiki/extended-e... (explains the extended GCD algorithm)
https://codeforces.com/blog/entry/53925 (information on the Mobius inversion)
https://codeforces.com/contest/803/pr... (problem related to Mobius inversion)
[Related to the above problem, my modified version is problem J in the mashup.]
https://discuss.codechef.com/t/more-i... (why sum of i from 1 to n of n/i is O(n * log n))

AnandOza has also done a similar stream (I’m just doing this because it was voted on), see https://codeforces.com/blog/entry/85475

Timestamps:
Intro + tip 00:00
Floor/ceil 01:30
Divisors 01:58
Prime factorization 03:40
Divisor finding 05:43
Modulo 07:00
Binary exponentiation 10:54
Modular "division" 13:11
GCD 17:21
Extended Euclidean (kinda) 21:06
LCM 23:21
Chinese remainder theorem 24:30
Instance of mobius 32:12
Conclusion 36:45

show more

Share/Embed