2
Useful math formulas for beginners
source link: https://codeforces.com/blog/entry/128739
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Useful math formulas for beginners
By codepasta, 4 hours ago,
Power of two (bynomial formula):
(a+b)2=a2+b2+2ab(a+b)2=a2+b2+2abUseful for proving time-complexity:
1+12+13+14+15+…+1n=log(n)1+12+13+14+15+…+1n=log(n)Another very useful formula (example problem):
(a+b)(a2+b2)=a4−b4a−b(a+b)(a2+b2)=a4−b4a−bSum of first nn numbers:
1+2+3+...+n=n(n−1)21+2+3+...+n=n(n−1)2Number of ways to choose pair of two numbers from nn elements:
(n2)=n(n+1)2(n2)=n(n+1)2Another formula:
ak−bk=(a−b)⋅(ak−1b0+ak−2b1+…+a0bk−1)ak−bk=(a−b)⋅(ak−1b0+ak−2b1+…+a0bk−1)Fibonaci number:
F1=0,F2=1,Fn=Fn−1+Fn−2F1=0,F2=1,Fn=Fn−1+Fn−2Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK