Theoretical Computer
Definitions iff q positive c, no such that 0 _< f(n) _< cgCn) vn >_ no.
f(n) = O(g(n)) f(n) = f~(g(n))
iff 3 positive c, no such that f(n) >_ co(m) >_ 0 Vn >_ no.
f(n) = O(g(n))
iff
f(n)
=
O(g(n))
i=i
sup S
Ei'~ i=1 n--1
and
£
limsupa,
lim sup{al [ i >__n,i 6 N}.
(~)
Combinations: Size k subsets of a size n set.
£(
1
:
m
cn+l -- I c--l"
c~ --
/=O
£icl
greatest b 6 R such that b _< s, Vs 6 S . lirn_ inf{a, l i > n, i 6 N}.
-1-
(n+
c
)
£
1,
i=0
I
£
ci = 1 - c '
(c--1) =
£ ,
cp1,
C 1-c'
"
i=1
= n c n + 2 - - ( n - I - 1)Cn+l -I-c
,=o
c'=
c_ s,
infS
~--~ 13 _ n~-(" + 1) ~4 i=l
In general:
iff Ve 6 R, qn0 such that I~- - "I < e, Vn >_ n0.
" - ' =
n
~ - ~ i ~ : nCn+l)(2n6 + I ) ' i=1
i - - nCn2+ 1 ) '
iff lin~_.~ f(n)Ig(n) = O.
lim a . = a
Sheet
Series
fCn) = n(g(n)). /(n) = o(g(n))
Science Cheat
= (n + 1 ) H , - n,
i=l
(~)
1.
£(:)
°'
co+,~(
Hi = \ r n - b 1)
2.£(:):~,
(n -7=)~k~'
-
,)
Hr*+I
-~- 1
m
D -- k
,.~(,+~):(,÷o+1). ~ o
" 1st order Eulerian numbers:
( ~>
Permutations 7r171"2_..71"r~On {1, 2 , . . . , n} with k ascents. ((~ >)
2nd order Eulerian numbers.
C.
Catlan Numbers: Binary trees with n + 1 vertices.
1,.[~]:~n_x,,.
k=o
¢:I. {o} {o}
o. k£=(O ; ) ( o : ~ ) =
\m + I)
II.
12.
2
=
13.
,o.[;]=~o_,~,~_,,
k
=
1
k
16.[:]=,,
k
=
n
+
k
k
+
19. '
,~.: = i , ~1 ~f~__o,
23.
n-1
k
=
0
otherwise
k=D
n
=
n-I
=
n-i
'
= < ~ > ~6. __~_o ~, n--l-k
24.
'
k=D
= hi,
21. C .
l;=o
1
:
-
k
n+l
'
'
= ( k + l ~ , +(n-k k
2,
-
'
20.
=I.
17. [:]>{o} --
25.
"
3. (:): (n)
k=D
, (:)=~(::~), o.(:)(:):(:)(:-~),
Stirling numbers (2nd kind): Partitions of an n element set into k non-empty sets.
n(n 4- 1)
~ :
k
- (n+
~:
1)2" +
I
(~)
_
'
2
'
--
'
32.
n--1
£ ~2o,~_
1 35.
=
2"
k=o
3°{. _-o} £ (. +o_~)2o 1_ =
37. f n - I ' 1 1 k
k=O
52
n
1)n_ k
k
k=o
'
Theoretical C o m p u t e r
Science Cheat Sheet
Identities Cont. 38.
[n+l]__~ Lm + l J
[;](k) =
£[k]
n '~-j: = n!
Trees
~__o~1 [k]
,
k=0
n
k+l
40" {:}=~(k)(rn_l_a}l,-
. i'" k,
{rn+n-I-l} =£k{n+k} m k 44. (:) = t,~{;::}[k](-l) 42.
f----O
46.
48.
""
)-
' "-k,
[.: o] _-£k=o ((:)):-+ \ 2n
,,.
41. [ : ]
(n--m),(:)
)
:~[;:~](k)(-l)m-~,
rn
45.
Every tree with n vertices has n - 1 edges.
.
k
k=0
:~[;:l]{km}(-l)
""-t,
Kraft inequality: If the depths of the leaves of a binary tree are dl, - -., d.:
'
forn>__m,
fx
E
{ n 7rn}:~(:--;)(m-l-n'~[rn: + kn+k)
k] ' {g:rn}(g~rn) =~t (k~.}{n~nk}(;) ,
[nTrn]---- rE(:--;)(:::){ +
4T.
[,:rn]('~m)
49.
re+k} k
2-a: O
where k = (log 2 ~) a - I . Full history recurrences can often be changed to limited history ones (example): Consider the following recurrence i--1
Simplify:
G(z) Z
x
Solve for G(z):
T,: 1 + ~ ,
To=I.
z
G(z) = (1 - z)(1 - 2.r)
j=0 Note that
Expand this using partial fractions:
i
T,+I= 1+ ~ T j .
G(z)=z
j=0
__.
Subtracting we find i
Ti+l - Ti = 1 + E T J ./=0
\
i--1
And so Ti+1 = 2T~ = 2 i+1.
'1--2z
1-z
i>_o
- ~
- 1- ET j =E(2i+l--l)z ~>o
./=e
=T/. 53
1 -- 2 G ( z ) + 1
S o gi :
2i -
1.
i+I.
xi
)
Theoretical Con, puter Science Cheat Sheet
i
2i
1
2
Pi 2
2
4
3
3 4
8 16
5 7 ii 13 17 19
5
32
6
64
7
128
8
256
9
512
I0
1,024
II
2,048
12
4,096
13
8,192
.14 15 16 17 18 19 20 21 22 23
23 29 31 37 41 43 47 53 59 61 67
16,384 32,768 65,536 131,072 • 262,144 524,288 1,048,576 2,097,152 4,194,304
71
B5
- - ~I,
=
97
67,108,864 134,217,728
I01 103
268,435,456 536,870,912 1,073,741,824 2,147,483,648 4,294,967,296
i Bs = --~-6, i B , o - -- ~'~" 5 ~, Change of base, quadratic formula: log s z - b 4 - ~ / b 2 - - 4ac logb z -- l o g s b ' 2a
e = 1 + ½ + ~ + 2-!~+ i-~uo+ --lira ( l + Z ) " ---- e =. Expectation: If X is discrete (1 + .1-)" < e < (i + ~)"+1 -
E[g(X)] = E
(n~) e lle ( 1 + ~)~ = e - - ~n + 2-~n2 - O
-
25 i, 3
137
' 12'
49
363
60 ' 20 I 1 4 0 '
761 7129 2SO' 2 5 2 0 1 "
H . = Inn + 7 +
O(1)
.
Factorial, Stirling's approximation: 8,
1, "
_ ,
24, 120, 720, 5040, 40320,3628SO,
.
. .
'2 j
a(i,j)=
, aCi--1,2) l a(i- l,a(i,j--1)) ~(i) = min{j [ a(j, j) >_ i}.
EIX] = ~
i= 1 j=l
i,j>2
k = lk
q = l -- p,
(;) pkq.-~
1
1 9 3 6 8 4 1 2 6 126 84 3 6 9 1 1 10 45 120 210 252 210 120 45 10 I
E [ X - Y ] = e [ X ] - ELY], iff X and Y are independent. E[X + Y] = E[X] + E [ Y ] ,
distribution: e-~Ak Pr[X=k]k!
.e_C=_~F/2,~ '
Pr[B lAd Pr[Ai] Pr[Adn] = Y]~'=i Pr[Aj] Pr[BI-4/]" Inclusion-exclusion:
= -v-
n
: i:I
' E[XI=A. Normal (Gauesian) distribution:
1
Pr[X A Y] Pr[B]
E[cX] = c E[X].
Poisson
I
-
Bayes' theorem:
113
11 121 1331 14641 1 5 10 10 5 1 6 15 20 1 5 6 1
Basics: Pr[X v YI = Pr[X] + Pr[Y] - P r [ X A ]'] Pr[X A Y] = Pr[X] - P r ~ ' ] , iff X mad Y are independent. Pr[XIY]
Pr[X = k] = (nk)pl'q "-I',
1
If X continuous then
Variance, standard deviation: VAR[X] = E[X 2] - E[XI "~,
Inn < H , < I n n + 1,
109
Pascal's Triangle
g ( z ) P r [ X = z].
Harmonic numbers:
Binomial distribution:
131
b
then p is the probability density function of X. If P d X < ,q = e(.), then P is the distributionfunction of X. If P and p both exist then
Euler's number e:
107
127
-.61803
Pr[a < x < bl = L p(~) d~:
=
Ackerm~nn's function and inverse:
33,554,432
~
t
~I , B 4 -__- - - ~ '16 ,
B2 =
83 89
26 27
1 828567056288
1, B 1
=
n' : 2x/2"~-~n(-he) ~ (1 + 0 ( 1 ) ) .
25
17213535217
Bernoulli Numbers (B~ = O, odd £ # 1): B0
= ~
Probability Continuous distributions: If
General
79
8,388,608 16,777,216
1
O = 1~V~1.61803,
73
24
28 29 30 31 32
7 ~ 0.5772i,
e ~ 2.71828,
~ 3.14159,
E[X] = ~.
The "coupon collector": We are given a random coupon each day, and there axe n different types of coupons. The distribution of coupons is uniform. The expected number of days to pass before we to collect all n types is
+
i:l k
£ (-1)'+' k=l
]=1
Moment inequalities: 1
Pr [IX I > AE[X]] _< ~,
P, [Ix- ax]l
>_
Geometric distribution: P r [ X = k] = p~-lq,
_
b are integers then gcd(a, b) = $cd(a m o d b, b). If l'I~=t P~' is the prime factorization of z then n
d =
ei+l -
Perfect Numbers: z is an even perfect number iffz = 2"-1(2" - 1 ) and 2 = - 1 is prime. Wilson's theorem: n is a prime iff ( n - 1)! -- - 1 m o d n. M~Jbius inversion: i f / = 1. 1 if i is not square-free• #(i)= 0 ( - I ) " if i is the product of r distinct primes.
If G(a) = E
F(d),
did then dla
Prime numbers:
p. = n l n n + n l n l n n - - n + n + 0
n
7r(n) = ~
•
A tree with no root. Directed acyclic graph.
Free tree DAG
Eulerian
Fermat's theorem:
s(=) =
Tree
•
In In n Inn
Graph with a trail visiting each edge exactly once. Hamiltonian Graph with a path visiting each vertex exactly once• Cut A set of edges whose removal increases the num-
ber of components. Cut-set A minimal cut. Cut edge A size 1 cut. k-Connected A graph connected with the removal of any k - 1 vertices. VS C_ V,S ~ @ we have
k-Tough
k.c(V-
k-Regular
A graph where all vertices have degree k. k-Factor A k-regular spanning subgraph. Matching A set of edges, no two of which are adjacent. Clique A set of vertices, all of which are adjacent. Ind. set A set of vertices, none of which are adjacent. Vertex cover A set of vertices which cover all edges. Planar graph A graph which can be embeded in the plane. Plane graph An embedding of a planar graph. E
,
n
2!n
+ (inn)---~-----+ (inn)-----~----
S) < ISl.
deg(v) = 2m.
-EV
If G is planar then n - m + f = 2, so f_< 2 n - 4 , m_< 3 n - f t . Any planar graph has a vertex with degree < 5i
56
(z, y, z), not all x, y and z zero. (~, y, ~) = (ca, c y , ~ )
vc # o.
Cartesian
Projective
(~, y)
(~, y, 1)
y = m z -4- b (m, --1, b) z = e (1, O, - c ) Distance formula, Lp and L=,: metric: j(z
1 -- 2:0) 2 --1-( z 1 -- Zo) "2-"
[1~ - =ol ~ + l~l pli_m [Ix1 -
-o1" +
x/~. ~ol'] 1/,
=ol']
-
Ix1 -
Area of triangle (zo, yo), (Zl. yl) and (z2, y~): l a b s l Z Z - - zo z 2 - - x0
Yl--YO[ Y 2 - - Y0
"
Angle 'formed by three points:
cos 0 = ( ~ ' m)" (~2, y~) ~192
Line through two points (xo, yo)
and (~1, m): zo Y0 I = 0. z l Yl 1 Area of circle, volume of sphere: A ~ 71"r2,
V :
~ r 4 3.
If I have seen farther than others, it is because I have stood on the shoulders of giants. - Issac Newton
Theoretical Computer
Science Cheat Sheet Calculus
Wallis' identity: 2-2-4-4-6.6--r=21-3-3-5-5.7--Brouncker's continued fraction expansion: 12 -1+ s~
2 + ~
Derivatives: 1. d(cu) dx dz
Newton's series: 1 1 ~-_ s 2 + -2 . 3-- 2+ s
2s +---
Sharp's series: 1 (1-
1
1
1
3- .3 * 3,:5
3".7
Euler's series:
T- g,+~+b+r,+~+--1
_ _
~2 1--~ =
I ~ 1"-~ - -
1 I ..~- 3 - - f f - - . ~ . - ~ -
1
~-~ . . . .
D(~) = Q(~) + n(~-----7' where the degree of N ' is less than that of D. Second, factor D ( z ) . Use the following rules: For a non-repeated factor: N(x) A N'(z) i .3L i (z- a)D(x) z- a D(x)' where
[N(=)] A = LD(x)J:=.
For a repeated factor:
IvCx)
"'X-" -'
(z - a)'~D(=) - ~
A~ N'Cz) (z - a)"~-~ + ~ ( z ) '
d~,
d--;
d(,.,) 3.
- u(~) -J
dz
6 '
--
cos u ~du z,
15.
d(arcsin u) = ~ dz
17.
d(arctan u) dz
i
19.
d(arcsec u) dx
i
1
d(e'U)
8.
d o n u) 1 du dz - udz' ..
1 du ux/T'=-~- d x '
1
-csc
2 du ~xx"
du cot u csc u~-~,
20. d(arccsc u) _ -1 du d~ ulx/i--Z~-u2 d x ' 22. d(cosh u) du dz - sinh u ~-~, 24.
25. d(sech u) du d~ -- - s e c h u tanh u ~ ,
~
du
-- -- sln u~z:
18. d ( a r c c o t u ) _ - 1 du dx 1 - u2 dz'
d(tanh u) du dz -- sech2 u ~ z '
dz
=
16. d(arccosu) _ -1 du dz lx/T=-~u2 d z '
1 du 1 - u2 dz'
27. d(arcsinhu) _
cee,~ du,
d~
14. d(csc u) d~ -
du d--~'
du
"
12. d ( c o t u ) T~x
21. d(sinhu)dz -- coshu~-~, 23.
d.
= U-~z -'k V-~z,
10. d(cos u) dz
13. d(sec u) du d~ - tan u see u~-£,
Partial Fractions Let N ( z ) and D(=) be polynomial functions of z. We can break down N ( z ) / D ( x ) rising partial fraction expansion. First, if the degree of N is greater than or equal to the degree of D, divide N by D, obtaining N(~) N'(x)
d,,
= "~z + "~z'
d(tanu) see 2 u ~duz , dx
-~=~+~+~+~+~+... x ~
dz
5. d ( u / v ) _ v ( ~ )
dz
9. d(sin u) dz 11.
1-3 2-4-5.
2.
d(cu) - u du ~ _ ( l n c ) c d'~z'
7. ....
c-~z'
dCu") = ,,u,,_,du, 4.
+ r~... Gregrory's series: ~=1-½+~-~+~
d(u + ,~)
du
=
d(cSChdxu) _
26.
du dz'
d(coth u) u du dx -- - csch2 ~z-z" duxcschu cothu~x
28. d(arccoshu) _ 1 du dz u~-x/fff=-~1 dz"
29. d(arctanhu) _ 1 du dz 1 - u -~ d z '
30. d(arccoth u) 1 du dz - u ~"- 1 dx"
31. d(arcsech u) _ -1 du dz u lvtT-z~u ~- d z ' Integrals:
32. d(arccsch u) dx
-1 du lul lx/i-V-~ d x
1. feudx = cJud,, 3.
f
zn dx = n +----'~'xr'+l''
6.
1 + z 2 - arctan~,
8.
f sin z dz = - cos z,
n ~ -1,
9, i
cos z dz = sin z,
where 1 r dk ( N ( z ) ~ ] A t = ~.. [ ~ kD(z)JJx=, The reasonable m a n adapts himself to the world; the unreasonable persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable. - George Bernard Shaw
,o.
ftan~d~ =
12. f s e c ~ d x
=
-lnlcos=l,
Inlsecx + tanzl,
14. / arcsin ~dx = arcsin -~ + ~
57
11. /
cotzdx = lnlcos=l,
13. / csc z dx = In I cscz + cot
- x2,
a>O,
Theoretical
Computer
Science
Calculus
,:.
fa.~cos~d-:.r~.os~-V::.'-.',
Cheat
Cone
,6. fa.~,..~=:.arct.,,-~-~,.(a'-+.~-),
°>o,
t~nnzdz--
23.
22-/cos"zdz=COS"-'zsinz-i-n-l/ cosn-2 x d z .
sin"-'zc°sz+n-I/sin"-'zdz, n
-
~
-~-~_~ -
~0/.~..~=,~.-o- ,~ .-2/ n--1
-
11
ta~-~zdz, +
"
.>0.
18. f cos2(az)dz---- -~:(az + sin(az) cos(a,)).
17. /sin2(az)dz = ~-:a(az- sin(az) cos(az)),
21. / s i n " z d z - -
Sheet
n =if=1,
24.
sec n-~zdz,
c°tnzdz-
n-
1
cotn-~zdz,
n ~ 1.
n~l,
rt--1
,,../~.o..~.:
oo,.o.o.-,. n -- 1
+
/
°-_, -
-
n
cscn-2~:dz,
n ~- 1
27.
/
lJ
sinhzdz
= coshz,
28.
/
coshzdz
= sinhz.
,,/,~,.~.=,°oo.,.,,o joo,,~,. ,o .in,.,,,/..o,.~=...~.o.,°,.= /o~o,.~=,.,.°~0 :z,
38. / arccosh ~dz _
34.
cosh2 ~dz = ¼ sinh(2z) + :z,
35.
sech2 z dx = tanhz,
Z--~+a2 ' ifarccosh~>O a n d a > O , za z a x c c o s h - + ~ / z 2 + a 2, ifarccosh~ < 0 a n d a > O ,
{zarccosh ( ) a
39.
/
~ ~4f~..~_.~=In z + ~
40. / a~ dz + == -- ~I ~¢tan-~, 42. f ( a ~--- ~ ) ~ n d ~
43. 46. 48.
J
= f(S. ~ -- 2~)V/~.~ - ~ + @
~ a 2 -4- z 2 d z = ~ ~
z 2 4- ~ I n z + ~
~
~
:
11~
- In
a
!
~, d= = -~(2-2 - , , ' ) ~ / a '
.dz
~v,~
a - - ~"
I
,
,
45.
47. 49.
51.
/
(a 2
~
x/z2 _ a 2 -
/
~ + ~V~-~-~ ,
dz =
s3.
a-~x/~
'nl'+ ~~-~1
zVr~'-+bz dz
4~ + b=
_ z2)_~/2
-~ In
:
°>°
2(3bz - 2a)(a + 15 b-~
,
¥~+
_ x ~-
b~) a/~:
a > O,
z~/~'-='d==-}(~---~-j
-,
z
- ~' + ~ ,,csi~, -~,
a > O.
55.
.7. f
__~/~.~_.2,
58./~dz=v~a~_i_za_alna+~l 60.
1 In a~ d_z z 2 - -- 2a
dz = 2Vfa"T bz + a
='~~
a ~> O.
. > O,
,
d==v~-~-~.-~1~
f
44.
a~c.i. ~,
I
Z
.~e.
41. / ~/a= -- ~ a~ = -~/a= - ~" + :~= arcsin ~-,
a > O,
a ~ 0,
az 2 + bz
s4.
a>O,
dz - - a x c s i n ~-, ~ - z2
/ ~
5"0.
,
.~d.~=
4::_
59. f ~ - a =
,
± a , d , = ~ ( ~ ' +.,2)~/~-.
6t.
5 8
4 " ~ - ~'
-
'
- - - ~ X / a 2 -- ~ + :., ~ c s i n ~
. > 0,
d~ = x / ~ ~ - a" - a ~ccos l~I'
a > O,
/
~,/::+,,
:
"HI .
, +
Theoretical C o m p u t e r
Science C h e a t S h e e t
Calculus Cont.
62.
f
dz ZV/-~ __ a z
1
~ arccos ~ [ ,
~ zdz
64.
0,
a >
Finite Calculus
63.
V/~z~+ a 2 , .
65.
f
In 2a2 + b -
~
2az + b + ~
66.
az 2
+
bz
~
a ~ -- ~ a2--------~-- ,
-
2
+ c
dx
b~V"~"L-'~4ac c-
' if
~
b2
axctaa ~
2as + b ,
if b 2
= { -~a ln ]2az + b + 2 V ~ / a z ~ + b2 + c '
/ %lax~ Jr bz -I-
(Z 2 -I- a2) -a/2
dz=q:
,
>4at,
fCz) = / ' F ( z ) ~ ~
J'Cz)6z = r ( z ) + C.
b
~vq-~- b~
67.
z2%/~
Difference, shift operators: a f ( z ) ----f ( z -I- 1) -- f(m). Z f(z) ----f ( z -I-i). Fundamental Theorem: b-1
< 4ac,
i f a > 0,
|
Differences: ~(c,.O = ~ ' ~ ,
a
~(~ + ~) = ± . + ~.,,,
A(uv) = u A v + E v A u , 1
c
. -2as - b arcsln ~ %/b 2 - - 4ac
x/-a
i r a < 0,
A(~"--) = n ~ -1, , x ( n ~ ) = ~-1
68. / ~/az2 + bz + cdz - 2az + b~/az 2
4"------'~
4ax - ba / dz Jr bz + c "l- -8; ~/az~ Jr bz Jr c'
"x(2":) = 2".
ACez) = (c - 1)e =,
A(~) =
(roSs)-
Sums:
z dz ~/az ~ + bz + c x/az 2 + bz + c = a
69.
TO.
/
dz
E CU~. = C E U ~ 2 ,
E ( u + v) 6~ = E u 6. + E ~ 6,.
~-1 In 2v/EV'az~ + bz_z+ c + bz + 2c ,
z ~ / a z 2 + bz + c
rl. /.s~
b f dz 2a J "Vaz ~ + bz + c I
EZn6
bz + 2c ar~in i~l~Z=_~_~_ ~ ,
1
uAv 6z = uv - ~_, E vAu 6z.
i f e > 0,
z =
i r e < 0,
z.+l m+l,
e--l' • "-= z(z-
f=.-1cos(.~) d.,
"~
.n--le "
75. f z . ln(az)dz=z.+lfln(az) \n+l
7s.
,"(ln,,~) ~ d, = .
+ l(ln"') '~
1 ) ( n + l ) z' '
z[
Z2 :
Z~ + Z !
:
z ~ _ zT
zs =
z ~ + 3 z ~ + z!
=
z • _ 3z ~ + z T
z4 =
z ! + 6 z ~ + 7 z ~ + z!
=
24 _ 6 z ~ + 7z ~ _ z T
zs =
z~+ 15z~+ 25z~+ 10z~+ z!
=
z £ - 15z ~ + 25z ~ - l o s 2 + z [
Z!
),
z(z+l)---Cz+rn-1),
z°=
i,
zI
:
z~ :
z2 + z I
¢~ =
z~ =
z s + 3Z 2 + 2 z I
z~ =
zT=
z 4 + 6 z s + 11z 2 + 6z I
z!=
z 4 _ 6zs + I 1 2 2 - 6zI
z~ =
z s + l O z 4 + 3 5 z s + 50z ~ + 24z*
zE =
z s _ 1024 + 35z s - 50z 2 + 24z z
z 2 -- z I zs
n>O.
(2-
_
59
3z 2 + 2z I
1)-..(z-In[)
n0,
1
. . ( l ~ a 2 ) ~ - ~ d~.
=
Z I
rn + 1).
z"
-
Z!
:
1)-.-(.I
Z1 =
Z~
= War.
E (z) 62 = (re+l)"
• "--=(.+1)...(.+1.1 z " + ~ = zw_(z _ m)"-. Kising Factorial Powers:
dz,
~
~,Z
z°-= i,
73. /znc°s(az) dz= lZznsin(az)-ha/zn-lsin(az)d2' II
-1
Falling Factorial Powers:
+ a~ d. = (1~, _ A # ) ( . ~ + .~)s/L
rz. / . " sin(.=)d. = - ~ . ' ~ c o s ( - ~ ) + ~
E2~
'
n (.).
Expansions: 1 1--z
=
A(~)
i=o
1
=
£
1 + CZ + C2X 2 "~ C3Z 3 "Jr - • •
1 ~ Cg
~
a i ~~; -
i=0
Ci Z i
D i r i c h l e t p o w e r series:
~=0
1
:l+z
n+z
A(~) = 2.~ 7a i;
2,'+z an+-'-
1 - z"
(1 -
E x p o n e n t i a l p o w e r series:
= ~Zil
1 --~ Z -~- X2 + Z 3 --~ X4 --~ - - -
a;~'
I
i=0
= z+2z
z) 2
= £
2+3z a+4z 4+-'"
1
Binomial theorem: izi,
i=o
.,r_ ( 1 )
OD
= z+2nz
k=O
~---~ - ~ i n z i '
2 + 3riz 3 + 4 n z 4 + ' ' "
dz n
Difference o f like p o w e r s :
ff=O
= l+z+
e¢
{z2+
n--1
~Z'~ + . . . . k=O
i=0
2)
In(1 +
=z--~z
2
1 3 + ~z -- ~1 z 4 . . . .
=
~,A(~) + ~B(~) = ~ ( ~ - ~ + pb,)~ ~
1
ln--
1
F o r o r d i n a r y p o w e r series:
=x+~'+
+~z
+-.-
=
1--z
i=1
=z-~~+~z
sin z
5-~-
+
£( _1)i
....
i=o
=l-~z
C O S ~C
1
2
I
4
+T,z
1
6
= x - - ~ - z1
(1 + z)" 1
(1
-
~)n-I-1
~-~.(1--
+ ~ iz
5
-- 1 Z 7 + ' - "
=
k-x fliXz
Ei=0
= 1 + n z + ~(~2-~L~z2 + - - -
=
= l+(n+l)x+
=
("+")z'~ + ---
.
.
A(cz) = ~ om
zA'(z) = £ x,
= l+z+2z
2+5z a+---
iaix i. -
i=1
{2i'~
1
+ 1)ai+lX i
i=1
Biz i i! '
=£
c'aix i.
i=0
) i
.
Oi--kZJ "
" "
Z2i+I
£(i+
i=O
4z)
= i=O
(~7¥i1'
(-)
•
Qgk
A'(z) = ~(i
= l -- l z + l z U -- ~-~z'l- t- .
qT-
A(x) - -
i=O
e~ - 1 1
3
"
1 i
°,'-A-xi,
i----0
(-1) (~,,
= i--=O
t a b l 1 - 1 ~g
(2i + 1)!'
- i Z:2i
--~.,x +..-
z~A(z) = ~
~2i+1
,
A(z) + A(-z) 2
----
£
i
z',
a2iz2i'
i=o
A(~)
=.: t , i ) "
= l+z+2zz+6za+...
V ~ ' - 4z
-
2
A(-~) = £
a21+lz2i+l"
i=O
= 1 + (2 + n ) x + ( 4 V ) ~ + " " 1 m l--z -1( 2
In
1 l--z -
= ~ + ~ z 2 + ~ ~ + ~ * 25 - 4 +
-
l n ~1 )
....
=
i=0
~
i
= i~+~3+~.
1 1 _ 4 -~-
. . . .
2
1 - (F.-1 + F.+l)x - (-1)nz 2
.
i
i=O
£ F . i ~ i. i=D
6O
J
A(~)B(~)=
ajbi_j
)
~'.
Fiz i,
= z + z 2 + 2z -~ + 3 z 4 + . . . .
= F . z + F~..z ~-+ F ~ . z a + . . . .
S u m m a t i o n : If bi = ~ ' ~ = 0 ai t h e n
Convolution:
i=1
~
!
1 B ( z ) -- 1 -- z "A(z)"
Hiz i,
i=2
1-z-z
~.i
God made the natural numbers: all t h e r e s t is t h e w o r k o f m a n . - Leopold Kronecker
T h e o r e t i c a l C o m p u t e r Science C h e a t Sheet Series Expansions: 1 1 In m (1 - z ) - + l I- z
z',
(e~ - 1)"
=
~-~,
~cot=
=
"----
i!
5
r, .~. ,
,
i=0
~ ( _ 1 ) ~ _ 122i(22i =
-
1)B2iz 2i-1 (2i)[ ,
£ ((z)
=
i=1
¢(=)
n i=0
:
tan -~
)
m
i=
(ln _1 - - ~ ) "
Escher's Knot
!
1 i-~,
i=1
=
.
,
-
i=1
~(Z)
__
,
i=1
1
¢(=1
Stieltjes Integration
:IIl_p-., P
¢2(z )
If G is continuous in the interval [a, b] and F is nondecreasing then
= £
d(i).
where dCn) = ~"]~dl,',1,
S(i).
where S(n) = E d l . d,
b G(z) dR(z)
i=1
¢'(x)¢(x - 1)
= £
Zt
exists. If a < b < c then
i=1
((2n)
--
sin~
=
G(z) dF(z) =
22"-11B2.1 r2., (2n)!
n • 1~,
G(z) dF(z) +
If the integrals involved exist b
(_1),_~
(4' -
i=o
2x
,I
e~ sin z
'
/
i[(n + ~)'l)[z~'. 2il2
(arc~n x.] -~
b G(=) d ( F ( z ) + H(z)) = c- G(z) d F ( z )
'"
sin "T zi,
/
~=o 16iv/'2(2i)!( 2i + 1) !x''
G(z) dF(z) +
a2,1a~l 4- a 2 , 2 z 2
-..
+
4- a 2 , n z n
:
b2
b
2
63 4
59 96 81 33
68 74
= b.
Let A = (aij) and B be the column maLrix (bi). Then there is a unique solution iff det A" # 0. Let Ai be A with column i replaced by B. Then det A~ 3: i = det A " Improvement makes strait roads, but the crooked roads without Improvement, are roads of Genius. - William Blake (The Marriage of Heaven and Hell.)
F ( z ) dV(z).
b
95 fl(] 22 67' 38 71 49 56 13
7 4 8 72 60 24 15
73 69 90 S2 44 17 5g
4- a n , 2 z 2 + " " " "~- a n , n Z n
G(z) dF(x).
If the integrals involved exist, and F possesses a derivative F" at every point in [a, b] then
86 11 57 28 7'0 39 94 45
• . . 4- a l . , n z n - : b 1
G(z) dH(.r).
b
0 4? 18 7'6 29 93 85 34 61 52
a 1 , 1 ~ 1 -[- a l , 2 Z 2 +
//
G(z) d(c- F ( z ) ) = c
V ( z ) dF(:r) = G(b)F(b) - G(a)F(a) - /
=~-~ 4ii[2 . ~=o ( i + 1)(2i + 1)[ z2'"
Crammer's Rule If we have equations:
an,lZl
b
b i=1
z
b
~'
(20!
= "= =
2)B2,~
G(x) dF(x).
37
8
9 75
91 B3 55 27
19 92 84 66 23
14 25 36 40 g l
82
21 32 43 54 65
6
42 53 64
1 35 26 12" 46
3
30
I, i, 2, 3, 5,8, 13, 21, 34, 55, 89 . . . . Definitions:
Fi = Fi_ t + Fi_ 2 ,
Fo = FI = 1:
F-i = (-1)/:IF.
50 41
77 88 99
10 89 97 7g
5 16 20 31 98 79 87
The Fibonacci number system: Every integer n has a unique representation n = Fkx + F~2 + . - . + F~,~, where ki > ki+l + 2 for all i, 1 < i < m and km >_2. 61
Fibonacci Numbers
Cassini's identity: for i > 0: F , + l F , - 1 - F? = ( - 1 ) ' .
Additive rule: F.+~ = FkF.+I + Fk-IF., F2. = F . F . + I + F,.-1F.. • Calculation by matrices:
~F._l.
F. ) = 0 1