Professional Documents
Culture Documents
Theoretical Computer Science Cheat Sheet
Theoretical Computer Science Cheat Sheet
Definitions Series
f (n) = O(g(n)) iff positive c, n0 such that X
n X
n X
n
n(n + 1) n(n + 1)(2n + 1) n2 (n + 1)2
0 f (n) cg(n) n n0 . i= , i2 = , i3 = .
i=1
2 i=1
6 i=1
4
f (n) = (g(n)) iff positive c, n0 such that
In general:
f (n) cg(n) 0 n n0 .
Xn
1 Xn
f (n) = (g(n)) iff f (n) = O(g(n)) and im = (n + 1)m+1 1 (i + 1)m+1 im+1 (m + 1)im
i=1
m+1 i=1
f (n) = (g(n)).
X
1 X m+1
n1 m
f (n) = o(g(n)) iff limn f (n)/g(n) = 0. im = Bk nm+1k .
i=1
m + 1 k
k=0
lim an = a iff > 0, n0 such that
n Geometric series:
|an a| < , n n0 .
X n
cn+1 1 X 1 X c
sup S least b R such that b s, ci = , c 6= 1, ci = , ci = , |c| < 1,
c1 1c 1c
s S. i=0 i=0 i=1
X
n
X
ncn+2 (n + 1)cn+1 + c c
inf S greatest b R such that b ici = , c 6= 1, ici = , |c| < 1.
s, s S. i=0
(c 1)2 i=0
(1 c)2
Harmonic series:
lim inf an lim inf{ai | i n, i N}.
n n X n
1 X
n
n(n + 1) n(n 1)
Hn = , iHi = Hn .
lim sup an lim sup{ai | i n, i N}. i=1
i i=1
2 4
n
n n
n
Xn X i n+1 1
k Combinations: Size k sub- Hi = (n + 1)Hn n, Hi = Hn+1 .
sets of a size n set. i=1 i=1
m m+1 m+1
n n
Stirling numbers (1st kind): n n! X n n n
k
Arrangements of an n ele- 1. = , 2. =2 , n
3. = ,
k (n k)!k! k k nk
ment set into k cycles. k=0
n n n n1 n n1 n1
4. = , 5. = + ,
k Stirling numbers (2nd kind): k k k1 k k k1
Partitions of an n element X n
n m n nk r+k r+n+1
set into k non-empty sets. 6. = , 7. = ,
n m k k mk k n
n n
k=0
k 1st order Eulerian numbers: X k n+1 X r s r+s
Permutations 1 2 . . . n on 8. = , 9. = ,
m m+1 k nk n
{1, 2, . . . , n} with k ascents.
k=0 k=0
n n kn1 n n
2nd order Eulerian numbers. 10. = (1)k , 11. = = 1,
k k k 1 n
Cn Catalan Numbers: Binary
n n n1 n1
trees with n + 1 vertices. 12. = 2n1
1, 13. = k + ,
2 k k k1
n n n n n
14. = (n 1)!, 15. = (n 1)!Hn1 , 16. = 1, 17. ,
1 2 n k k
Xn
n n1 n1 n n n n 1 2n
18. = (n 1) + , 19. = = , 20. = n!, 21. Cn = ,
k k k1 n1 n1 2 k n+1 n
k=0
n n n n n n1 n1
22. = = 1, 23. = , 24. = (k + 1) + (n k) ,
0 n1 k n1k k k k1
n
0 1 if k = 0, n n n+1
25. = 26. = 2n n 1, 27. = 3n (n + 1)2n + ,
k 0 otherwise 1 2 2
Xn X m X n
n x+k n n+1 n n k
28. xn = , 29. = (m + 1 k)n (1)k , 30. m! = ,
k n m k m k nm
X k=0
n k=0
k=0
n n nk n n
31. = (1) nkm
k!, 32. = 1, 33. = 0 for n 6= 0,
m k m 0 n
k=0
Xn
n n1 n1 n (2n)n
34. = (k + 1) + (2n 1 k) , 35. = ,
k k k1 k 2n
X n X X n
k=0
x n x+n1k n+1 n k k
36. = , 37. = = (m + 1)nk ,
xn k 2n m+1 k m m
k=0 k k=0
Theoretical Computer Science Cheat Sheet
Identities Cont. Trees
X n k n
X Xn n
X
n+1 k 1 k x n x+k Every tree with n
38. = = nnk = n! , 39. = , vertices has n 1
m+1 k m m k! m xn k 2n
X k k=0 k=0 X k=0 edges.
n n k+1 n n+1 k
40. = (1) nk
, 41. = (1)mk , Kraft inequal-
m k m+1 m k+1 m
k
X m X
k
m ity: If the depths
m+n+1 n+k m+n+1 n+k of the leaves of
42. = k , 43. = k(n + k) ,
m k m k a binary tree are
X k=0 X k=0
n n+1 k n n+1 k d1 , . . . , dn :
44. = (1)mk , 45. (n m)! = (1)mk , for n m, X n
m k+1 m m k+1 m 2di 1,
k X k
X m nm + n m + k
n mn m+n m+k n i=1
46. = , 47. = ,
nm m+k n+k k nm m+k n+k k and equality holds
k X k X
n `+m k nk n n `+m k nk n only if every in-
48. = , 49. = . ternal node has 2
`+m ` ` m k `+m ` ` m k
k k
sons.
Recurrences
Master method: Generating functions:
T (n) = aT (n/b) + f (n), a 1, b > 1 1 T (n) 3T (n/2) = n 1. Multiply both sides of the equa-
logb a 3 T (n/2) 3T (n/4) = n/2 tion by xi .
If > 0 such that f (n) = O(n )
.. .. .. 2. Sum both sides over all i for
then
. . . which the equation is valid.
T (n) = (nlogb a ).
log2 n1 3. Choose a generatingPfunction
3 T (2) 3T (1) = 2
If f (n) = (nlogb a ) then G(x). Usually G(x) = i=0 xi gi .
T (n) = (nlogb a log2 n). Let m = log2 n. Summing the left side 3. Rewrite the equation in terms of
we get T (n) 3m T (1) = T (n) 3m = the generating function G(x).
If > 0 such that f (n) = (nlogb a+ ), T (n) nk where k = log2 3 1.58496.
4. Solve for G(x).
and c < 1 such that af (n/b) cf (n) Summing the right side we get
5. The coefficient of xi in G(x) is gi .
for large n, then X n
m1 X i
m1
3i
= n 3
. Example:
T (n) = (f (n)). i 2
i=0
2 i=0
gi+1 = 2gi + 1, g0 = 0.
Substitution (example): Consider the
following recurrence Let c = 32 . Then we have Multiply
X and sum: X X
i
X
m1 m gi+1 xi = 2gi xi + xi .
Ti+1 = 22 Ti2 , T1 = 2. i c 1
n c =n i0 i0 i0
c1 P
Note that Ti is always a power of two. i=0
We choose G(x) = i0 xi gi . Rewrite
Let ti = log2 Ti . Then we have = 2n(clog2 n 1)
in terms of G(x):
ti+1 = 2i + 2ti , t1 = 1. X
= 2n(c(k1) logc n 1) G(x) g0
= 2G(x) + xi .
Let ui = ti /2i . Dividing both sides of = 2nk 2n, x
i0
the previous equation by 2i+1 we get
ti+1 2i ti and so T (n) = 3n 2n. Full history re-
k Simplify:
= + i. G(x) 1
2 i+1 2 i+1 2 currences can often be changed to limited = 2G(x) + .
history ones (example): Consider x 1x
Substituting we find
ui+1 = 12 + ui , u1 = 12 , X
i1
Solve for G(x):
Ti = 1 + Tj , T0 = 1. x
G(x) = .
which is simply ui = i/2. So we find j=0
(1 x)(1 2x)
i1
that Ti has the closed form Ti = 2i2 . Note that Expand this
using partial fractions:
Summing factors (example): Consider X
i
2 1
the following recurrence Ti+1 = 1 + Tj . G(x) = x
1 2x 1 x
T (n) = 3T (n/2) + n, T (1) = 1. j=0
Subtracting we find X X
Rewrite so that all terms involving T
Xi X
i1 = x 2 2i xi xi
are on the left side Ti+1 Ti = 1 + Tj 1 Tj i0 i0
T (n) 3T (n/2) = n. X
j=0 j=0
= i+1
(2 1)x i+1
.
Now expand the recurrence, and choose = Ti . i0
a factor which makes the left side tele-
scope And so Ti+1 = 2Ti = 2i+1 . So gi = 2i 1.
Theoretical Computer Science Cheat Sheet
1+ 5 1 5
3.14159, e 2.71828, 0.57721, = 2 1.61803, = 2 .61803
i 2i pi General Probability
1 2 2 Bernoulli Numbers (Bi = 0, odd i 6= 1): Continuous distributions: If
Z b
2 4 3 B0 = 1, B1 = B2 = 21 ,B4 = 1
6,
1
30 , Pr[a < X < b] = p(x) dx,
1 1 5
3 8 5 B6 = 42 , B8 = 30 , B10 = 66 . a
ber iff x = 2n1 (2n 1) and 2n 1 is prime. k-Tough S V, S 6= we have Area of triangle (x0 , y0 ), (x1 , y1 )
Wilsons theorem: n is a prime iff k c(G S) |S|. and (x2 , y2 ):
(n 1)! 1 mod n. k-Regular A graph where all vertices x1 x0 y1 y0
1 .
2 abs x x
have degree k. 2 0 y2 y0
Mobius
inversion: k-Factor A k-regular spanning
1 if i = 1. Angle formed by three points:
subgraph.
0 if i is not square-free.
(i) = Matching A set of edges, no two of
(1) r
if i is the product of (x2 , y2 )
r distinct primes. which are adjacent.
`2
Clique A set of vertices, all of
If X
which are adjacent.
G(a) = F (d), (0, 0) `1 (x1 , y1 )
Ind. set A set of vertices, none of
d|a
which are adjacent. (x1 , y1 ) (x2 , y2 )
cos = .
then X a Vertex cover A set of vertices which `1 `2
F (a) = (d)G . cover all edges. Line through two points (x0 , y0 )
d
d|a Planar graph A graph which can be em- and (x1 , y1 ):
beded in the plane. x y 1
Prime numbers:
ln ln n Plane graph An embedding of a planar x0 y0 1 = 0.
pn = n ln n + n ln ln n n + n
ln n graph. x1 y1 1
n X Area of circle, volume of sphere:
+O , deg(v) = 2m.
ln n A = r2 , V = 43 r3 .
vV
n n 2!n
(n) = + + If G is planar then n m + f = 2, so
ln n (ln n)2 (ln n)3 If I have seen farther than others,
f 2n 4, m 3n 6.
n it is because I have stood on the
+O . Any planar graph has a vertex with de- shoulders of giants.
(ln n)4
gree 5. Issac Newton
Theoretical Computer Science Cheat Sheet
Calculus
Wallis identity: Derivatives:
2 2 4 4 6 6
=2 d(cu) du d(u + v) du dv d(uv) dv du
1 3 3 5 5 7 1. =c , 2. = + , 3. =u +v ,
dx dx dx dx dx dx dx dx
Brounckers continued fraction expansion:
dx u
v du dv
12 d(un ) du d(u/v) d(ecu ) du
4. = nun1 , 5. = dx
, 6. = cecu ,
4 =1+ 32 dx dx dx v2 dx dx
2+ 52
2+
2+ 72 d(cu ) du d(ln u) 1 du
2+
7. = (ln c)cu , 8. = ,
dx dx dx u dx
Gregrorys series:
1 1 1 1
4 =1 3 +
+ d(sin u) du d(cos u) du
5 7 9 9. = cos u , 10. = sin u ,
dx dx dx dx
Newtons series:
d(tan u) du d(cot u) du
1 1 13 11. = sec2 u , 12. = csc2 u ,
dx dx dx dx
6 = 2 + 2 3 23 + 2 4 5 25 +
d(sec u) du d(csc u) du
Sharps series: 13. = tan u sec u , 14. = cot u csc u ,
dx dx dx dx
1 1 1 1 d(arcsin u) 1 du d(arccos u) 1 du
= 1 1 + 2 3 + 15. = , 16. = ,
6 3 3 3 5 3 7 dx 2
1 u dx dx 1 u2 dx
3
Eulers series: d(arctan u) 1 du d(arccot u) 1 du
17. = , 18. = ,
dx 1 + u2 dx dx 1 + u2 dx
2 1 1 1 1 1
6 = 12 + 22 + 32 + 42 + 52 + d(arcsec u) 1 du d(arccsc u) 1 du
2 1 1 1 1 1
19. = , 20. = ,
2
u 1 u dx 2
u 1 u dx
8 = 12 + 32 + 52 + 72 + 92 + dx dx
2 1 1 1 1 1 d(sinh u) du d(cosh u) du
12 = 12 22 + 32 42 + 52 21. = cosh u , 22. = sinh u ,
dx dx dx dx
Partial Fractions d(tanh u) du d(coth u) du
23. = sech2 u , 24. = csch2 u ,
Let N (x) and D(x) be polynomial func- dx dx dx dx
tions of x. We can break down d(sech u) du d(csch u) du
N (x)/D(x) using partial fraction expan- 25. = sech u tanh u , 26. = csch u coth u ,
dx dx dx dx
sion. First, if the degree of N is greater
than or equal to the degree of D, divide d(arcsinh u) 1 du d(arccosh u) 1 du
27. = , 28. = ,
dx 2
1 + u dx dx 2
u 1 dx
N by D, obtaining
N (x) N 0 (x) d(arctanh u) 1 du d(arccoth u) 1 du
= Q(x) + , 29. = , 30. = 2 ,
D(x) D(x) dx 1 u2 dx dx u 1 dx
where the degree of N 0 is less than that of d(arcsech u) 1 du d(arccsch u) 1 du
31. = , 32. = .
D. Second, factor D(x). Use the follow- dx u 1 u2 dx dx |u| 1 + u2 dx
ing rules: For a non-repeated factor: Integrals:
N (x) A N 0 (x) Z Z Z Z Z
= + ,
(x a)D(x) xa D(x) 1. cu dx = c u dx, 2. (u + v) dx = u dx + v dx,
where Z Z Z
N (x) 1 1
A= . 3. n
x dx = xn+1 , n 6= 1, 4. dx = ln x, 5. ex dx = ex ,
D(x) x=a
n+1 x
Z Z Z
For a repeated factor: dx dv du
6. = arctan x, 7. u dx = uv v dx,
N (x) X
m1
Ak N 0 (x) 1 + x2 dx dx
= + , Z Z
(x a) D(x)
m (x a)mk D(x) 8. sin x dx = cos x, 9. cos x dx = sin x,
k=0
where Z Z
1 dk N (x) 10. tan x dx = ln | cos x|, 11. cot x dx = ln | cos x|,
Ak = .
k! dxk D(x) x=a Z Z
12. sec x dx = ln | sec x + tan x|, 13. csc x dx = ln | csc x + cot x|,
The reasonable man adapts himself to the
world; the unreasonable persists in trying Z p
to adapt the world to himself. Therefore 14. arcsin xa dx = arcsin xa + a2 x2 , a > 0,
all progress depends on the unreasonable.
George Bernard Shaw
Theoretical Computer Science Cheat Sheet
Calculus Cont.
Z p Z
15. arccos x
a dx = arccos x
a a2 x2 , a > 0, 16. arctan xa dx = x arctan xa a
2 ln(a2 + x2 ), a > 0,
Z Z
17. sin2 (ax)dx = 1
2a ax sin(ax) cos(ax) , 18. cos2 (ax)dx = 1
2a ax + sin(ax) cos(ax) ,
Z Z
19. sec2 x dx = tan x, 20. csc2 x dx = cot x,
Z Z Z Z
sinn1 x cos x n 1 cosn1 x sin x n 1
21. sinn x dx = + sinn2 x dx, 22. cosn x dx = + cosn2 x dx,
n n n n
Z Z Z Z
tann1 x cotn1 x
23. n
tan x dx = tan n2
x dx, n 6= 1, 24. cot x dx =
n
cotn2 x dx, n 6= 1,
n1 n1
Z Z
tan x secn1 x n 2
25. secn x dx = + secn2 x dx, n 6= 1,
n1 n1
Z Z Z Z
cot x cscn1 x n 2
26. cscn x dx = + cscn2 x dx, n 6= 1, 27. sinh x dx = cosh x, 28. cosh x dx = sinh x,
n1 n1
Z Z Z Z
29. tanh x dx = ln | cosh x|, 30. coth x dx = ln | sinh x|, 31. sech x dx = arctan sinh x, 32. csch x dx = ln tanh x2 ,
Z Z Z
2 2
33. sinh x dx = 1
4 sinh(2x) 1
2 x, 34. cosh x dx = 1
4 sinh(2x) + 1
2 x, 35. sech2 x dx = tanh x,
Z p Z
36. arcsinh x
a dx = x arcsinh x
a x2 + a2 , a > 0, 37. arctanh xa dx = x arctanh xa + a
2 ln |a2 x2 |,
Z
x p
x arccosh x2 + a2 , if arccosh xa > 0 and a > 0,
38. arccosh xa dx = a
p
x arccosh x + x2 + a2 , if arccosh x < 0 and a > 0,
a a
Z p
dx
39. = ln x + a2 + x2 , a > 0,
a2 + x2
Z Z p p
dx 1 2
40. 2 2
= a arctan x
a , a > 0, 41. a2 x2 dx = x2 a2 x2 + a2 arcsin xa , a > 0,
a +x
Z p 4
42. (a2 x2 )3/2 dx = x8 (5a2 2x2 ) a2 x2 + 3a8 arcsin xa , a > 0,
Z Z Z
dx dx 1 a + x dx x
43. x
= arcsin a , a > 0, 44. = ln , 45. = ,
2
a x 2 2
a x 2 2a ax 2
(a x ) 2 3/2
a a2 x2
2
Z p p p Z p
2 dx
46. a2 x2 dx = x2 a2 x2 a2 ln x + a2 x2 , 47. = ln x + x2 a2 , a > 0,
x2 a2
Z Z
dx 1 x 2(3bx 2a)(a + bx)3/2
48. 2
= ln , 49. x a + bx dx = ,
ax + bx a a + bx 15b2
Z Z Z
a + bx 1 x 1 a + bx a
50. dx = 2 a + bx + a dx, 51. dx = ln , a > 0,
x x a + bx a + bx 2 a + bx + a
Z 2 p a + a2 x2 Z p
a x2
52. 2 2
dx = a x a ln , 53. x a2 x2 dx = 13 (a2 x2 )3/2 ,
x x
Z p p Z a + a2 x2
4 dx
54. x2 a2 x2 dx = x8 (2x2 a2 ) a2 x2 + a8 arcsin xa , a > 0, 55. = a1 ln ,
2
a x 2 x
Z p Z 2 p
x dx x dx 2
56. = a2 x2 , 57. = x2 a2 x2 + a2 arcsin a, x
a > 0,
2
a x 2 a2 x2
Z Z
a2 + x2 p a + a2 + x2 x2 a2 p
58. dx = a2 + x2 a ln , 59. dx = x2 a2 a arccos |x| a
, a > 0,
x x x
Z p Z
dx x
60. x x2 a2 dx = 13 (x2 a2 )3/2 , 61. = a1 ln ,
x x2 + a2 a + a2 + x2
Theoretical Computer Science Cheat Sheet
Calculus Cont. Finite Calculus
Z Z
dx 1 dx x2 a2 Difference, shift operators:
62. a
= a arccos |x| , a > 0, 63. = ,
x x2 a2 x2 x2 a2 a2 x f (x) = f (x + 1) f (x),
Z Z
x dx p x2 a2 (x2 + a2 )3/2 E f (x) = f (x + 1).
64. = x2 a2 , 65. dx = ,
x2 a2 x4 3a2 x3 Fundamental Theorem:
2ax + b b2 4ac X
1 f (x) = F (x) f (x)x = F (x) + C.
Z
ln , if b2 > 4ac,
dx 2
b 4ac 2ax + b + b 4ac
2
66. = X
b X
b1
ax2 + bx + c 2 2ax + b f (x)x = f (i).
arctan , if b2 < 4ac, a
4ac b2 4ac b2 i=a
Differences:
p
1 (cu) = cu, (u + v) = u + v,
Z
ln 2ax + b + 2 a ax2 + bx + c , if a > 0,
dx a
67. = (uv) = uv + E vu,
ax2 + bx + c 1 2ax b
arcsin , if a < 0, (xn ) = nxn1 ,
a b2 4ac
Z Z (Hx ) = x1 , (2x ) = 2x ,
p 2ax + b p 2 4ax b2 dx
68. ax2 + bx + c dx = ax + bx + c + , (cx ) = (c 1)cx , x
m x
= m1 .
4a 8a 2
ax + bx + c
Sums:
Z Z P P
x dx ax2 + bx + c b dx cu x = c u x,
69. = ,
2
ax + bx + c a 2a 2
ax + bx + c P P P
(u + v) x = u x + v x,
1 2 c ax2 + bx + c + bx + 2c P P
uv x = uv E vu x,
Z
c ln , if c > 0,
dx x P n n+1 P 1
70. = x x = xm+1 , x x = Hx ,
2
x ax + bx + c 1 bx + 2c
arcsin , if c < 0, P x x P x
x
c
c |x| b2 4ac c x = c1 , m x = m+1 .
Z p Falling Factorial Powers:
71. x3 x2 + a2 dx = ( 13 x2 15
2 2
a )(x2 + a2 )3/2 , xn = x(x 1) (x n + 1), n > 0,
Z Z
x0 = 1,
72. xn sin(ax) dx = a1 xn cos(ax) + n
a xn1 cos(ax) dx,
1
Z Z xn = , n < 0,
(x + 1) (x + |n|)
1 n
73. n
x cos(ax) dx = ax sin(ax) n
x n1
sin(ax) dx,
a xn+m = xm (x m)n .
Z Z Rising Factorial Powers:
xn eax
74. xn eax dx = n
xn1 eax dx,
a a xn = x(x + 1) (x + n 1), n > 0,
Z
75. xn ln(ax) dx = xn+1
ln(ax)
1
, x0 = 1,
n+1 (n + 1)2 1
Z Z xn = , n < 0,
xn+1
m (x 1) (x |n|)
76. xn (ln ax)m dx = (ln ax)m xn (ln ax)m1 dx.
n+1 n+1 xn+m = xm (x + m)n .
Conversion:
x1 = x1 = x1 xn = (1)n (x)n = (x n + 1)n
x2 = x2 + x1 = x2 x1 = 1/(x + 1)n ,
x3 = x3 + 3x2 + x1 = x3 3x2 + x1 xn = (1)n (x)n = (x + n 1)n
x4 = x + 6x3 + 7x2 + x1
4
= x 6x3 + 7x2 x1
4
= 1/(x 1)n ,
x5 = x5 + 15x4 + 25x3 + 10x2 + x1 x5 15x4 + 25x3 10x2 + x1 Xn n
= n k X n
xn = x = (1)nk xk ,
k k
x1 = x1 x1 = x1 k=1 k=1
Xn
x2 = x + x1
2
x2 = x x1
2
xn =
n
(1)nk xk ,
x3 = x3 + 3x2 + 2x1 x3 = x3 3x2 + 2x1 k=1
k
Xn
x4 = x4 + 6x3 + 11x2 + 6x1 x4 = x4 6x3 + 11x2 6x1 n n k
x = x .
x5 = x5 + 10x4 + 35x3 + 50x2 + 24x1 x5 = x5 10x4 + 35x3 50x2 + 24x1 k
k=1
Theoretical Computer Science Cheat Sheet
Series
Taylors series: Ordinary power series:
X (x a)i
(x a)2 00
0
X
f (x) = f (a) + (x a)f (a) + f (a) + = f (i) (a). A(x) = ai xi .
2 i=0
i!
i=0
Expansions:
X Exponential power series:
1
= 1 + x + x2 + x3 + x4 + = xi , X
xi
1x i=0 A(x) = ai .
X i!
1 i=0
= 1 + cx + c2 x2 + c3 x3 + = ci xi ,
1 cx i=0
Dirichlet power series:
X
1 X ai
= 1 + x n
+ x 2n
+ x3n
+ = xni , A(x) = .
1 xn i=1
ix
i=0
X Binomial theorem:
x 2 3 4 n
= x + 2x + 3x + 4x + = ixi , X n nk k
(1 x)2 (x + y)n = x y .
i=0
X k
dn 1 k=0
xk n = x + 2n x2 + 3n x3 + 4n x4 + = in xi , Difference of like powers:
dx 1x i=0
X
xi X
n1
ex = 1 + x + 12 x2 + 16 x3 + = , xn y n = (x y) xn1k y k .
i=0
i! k=0
X
xi For ordinary power series:
ln(1 + x) = x 12 x2 + 13 x3 14 x4 = (1)i+1 ,
X
i
i=1
A(x) + B(x) = (ai + bi )xi ,
1 Xx i
= x + 12 x2 + 13 x3 + 14 x4 +
i=0
ln = ,
1x i X
i=1
X xk A(x) = aik xi ,
1 3 1 5 1 7 x2i+1
sin x = x 3! x + 5! x 7! x + = (1)i , i=k
(2i + 1)! Pk1
X
i=0
A(x) ai xi
X x2i
i=0
= ai+k xi ,
cos x = 1 2! 1 2
x + 4! 1 4
x 6! 1 6
x + = (1)i , xk i=0
i=0
(2i)!
X
X ci ai xi ,
x2i+1 A(cx) =
tan1 x = x 13 x3 + 15 x5 17 x7 + = (1)i , i=0
(2i + 1)
i=0 X
X n i A0 (x) = (i + 1)ai+1 xi ,
2
(1 + x)n = 1 + nx + n(n1) 2 x + = x,
i i=0
i=0
X X
1 n+2 2
i+n i xA0 (x) = iai xi ,
= 1 + (n + 1)x + 2 x + = x,
(1 x)n+1 i i=1
i=0
X Z
X
x 1 1 2 1 4 Bi xi ai1
= 1 2 x + 12 x 720 x + = , A(x) dx = xi ,
e 1
x i! i=1
i
i=0
X
1 2 3 1 2i i A(x) + A(x)
X
(1 1 4x) = 1 + x + 2x + 5x + = x, = a2i x2i ,
2x i+1 i 2
i=0 i=0
1 X 2i i
= 1 + x + 2x2 + 6x3 + = x, A(x) A(x) X
1 4x i = a2i+1 x2i+1 .
n 2
i=0
1 1 1 4x X 2i + n i Pi
i=0
4+n 2
= 1 + (2 + n)x + 2 x + = x, Summation: If bi = j=0 ai then
1 4x 2x i=0
i
X 1
1 1 B(x) = A(x).
ln = x + 32 x2 + 11 6 x 3
+ 25 4
12 x + = Hi xi , 1x
1x 1x Convolution:
2 i=1
1 1 X Hi1 xi
ln = 12 x2 + 34 x3 + 11 x 4
+ = , X Xi
2 1x 24 i A(x)B(x) = aj bij xi .
i=2
X i=0 j=0
x 2 3 4
= x + x + 2x + 3x + = Fi xi ,
1 x x2 i=0 God made the natural numbers;
X
Fn x 2 3 all the rest is the work of man.
= F n x + F 2n x + F 3n x + = Fni xi .
1 (Fn1 + Fn+1 )x (1)n x2 i=0
Leopold Kronecker
Theoretical Computer Science Cheat Sheet
Series Eschers Knot
Expansions:
X n X
1 1 n+i i 1 i
ln = (Hn+i Hn ) x, = xi ,
(1 x)n+1 1x i x n
i=0 i=0
X n i X i n!xi
xn = x, (e 1)
x n
= ,
i n i!
n X
i=0 i=0
X
1 i n!xi (4)i B2i x2i
ln = , x cot x = ,
1x i=0
n i! i=0
(2i)!
X 2i 2i 2i1 X
i1 2 (2 1)B2i x 1
tan x = (1) , (x) = x
,
i=1
(2i)! i=1
i
X X
1 (i) (x 1) (i)
= x
, = ,
(x) i=1
i (x) i=1
ix
Y 1
(x) = , Stieltjes Integration
p
1 px
If G is continuous in the interval [a, b] and F is nondecreasing then
X d(i) P Z b
2 (x) = where d(n) = d|n 1,
i=1
xi G(x) dF (x)
a
X S(i) P exists. If a b c then
(x)(x 1) = where S(n) = d|n d, Z c Z b Z c
i=1
xi
G(x) dF (x) = G(x) dF (x) + G(x) dF (x).
2n1
2 |B2n | 2n a a b
(2n) = , n N, If the integrals involved exist
(2n)! Z b Z Z
X b b
x (4i 2)B2i x2i G(x) + H(x) dF (x) = G(x) dF (x) + H(x) dF (x),
= (1)i1 , a a a
sin x (2i)! Z Z Z
n
i=0 b b b
X G(x) d F (x) + H(x) = G(x) dF (x) + G(x) dH(x),
1 1 4x n(2i + n 1)!
= xi , a a a
2x i!(n + i)! Z Z Z b
i=0 b b
X i/2 i c G(x) dF (x) = G(x) d c F (x) = c G(x) dF (x),
x 2 sin 4 i a a a
e sin x = x, Z b Z b
i!
s
i=1
G(x) dF (x) = G(b)F (b) G(a)F (a) F (x) dG(x).
1 1x X (4i)!
a a
= xi , If the integrals involved exist, and F possesses a derivative F 0 at every
x i=0
i
16 2(2i)!(2i + 1)! point in [a, b] then
2
X Z b Z b
arcsin x 4i i!2
= x2i . G(x) dF (x) = G(x)F 0 (x) dx.
x i=0
(i + 1)(2i + 1)! a a