Docsity

formulas, Resumos de Informática

Pré-visualização parcial do texto

Baixe formulas e outras Resumos em PDF para Informática, somente na Docsity!

Theoretical Computer Science Cheat Sheet Delinitions Series fin) = Ololm) | 83 nei no auch hs ato +) re DEEM oa t+ j — — — i— 2 6 '& 4 Fm) = Ug(n)) iff 9 positivo e. no such that a H(n) > egtn) > 0Yn 2 no. In gencral: A 1 FU) = 90) E fo) = 060) ma 3 -—a [n+ neto > (+ Do et o (mn + 1) i=1 i=1 Feu) = Ng(n)). no Te) = (om) | if lime f(n)/g(n) = 0. lim a, =—a iff Ve > O, Jng such that = na, Jan — a] < e, Yn > no. n 3 Geometric seri m E(i mare , 1 m+1 m — E -1 sup S kasthe sithados | À cl, Wes. = — at , inf S greatest b € suchthatbn.1€). Harmonic series: a nos n>+06 E 51 H =20+D ntn—1 lim sup Gy, lim supfa; [i>n,ie). "og a 2 ” 4 asso n=00 = i= n no, TO inations: Si ê n+1 1 (3 Combinations: Size k sub- Hi= (n+ DHa— ma ( Ja = ( ) (1 a ) . sets of a size n set. x ” x mm) m+1 ” m+1 E] Stirling numbers (1st kind): 1 2 Lim pu a(o Arrangements of an n cle- * : & Ke) É “AR An-k ment set into k cycles. E k UJ Stirling numbers (2nd kind): Partitions of an 7 clement, set into k non-empty sets. 1st order Eulerian numbers: Pormutations m172...7p ON (1.2,...,n) with k asconts. 2nd order Eulerian numbers. Catalan Numbers: Binary trees with n + 1 vertices. 14, «fo )Gos 18. amo). 19. (ar na] (5). 20. [i)-"3 a. Ga 0). k—0 legs (DMD ae) teen) 25. (= EA 26. (1)="-n-1 27. (rms +(55. 28. 9" E ((1). 29. (1) -» (1) (mL, 30. auf) =D (am) 31. (1) SE ento, 32. (1)-a 33. (1-0 for n %0, fr À 34 (1) -aen(riD)renion(ioo. 35. EM) =S —— e LE EMO. e (=D) E) = Elo Theoretical Computer Science Cheat Sheet ms 3.14159, em 2.71828, YR OST, é = Livã as 1.61803, é= E a —.61803 i a Pi General Probability 1 2 2 Bernoulli Numbers (B, = 0, odd i £ D: Continuous distributions: Tf b 2 3 Bo=1,B/= = Pla). BI + = ElXI+ RIA, 28 | 268435456 107 Tinomial disiribution: FIcX] = RI. 29 536,870,912 109 kk Bayes' Lheorem: 586.870, PN =k]= Th o qr q=1-p. PAdBl= PríB|44] Pr[4,] 30 1,073,741,824 113 a|B] = Th PrA;PriBiA] Pá, PrBIA,] 31 2.147, 483,648 nr -5 a(s rar *=np. Inelusion-exclusion: 32 4,294,067,296 131 n n Tascals Tranele Poisson disteibution: Pr [ Vi = SS Prxi + - - em ARE . = = 1 Pqxr=m=D55, euri=A. n e j FIL q 11 Normal (Caussian) distribution: »t-n »” Pr [ TA, X ] 121 1 aan [mr uócei j= 13: (a) = feno”, plx]=m. | Moment inequalities: 331 q 1 14641 The “coupon collector”: We arc given a Pr[|X| > AE[X]] < x 15101051 random coupon each day, and there are n 1 - - different types of coupons. The distribu- Pr [ X— E(X]| DA- o] b arc in- tegers Lhen ged(a,b) = ged(a mod b, b). E [b, p$' is the prime factorization of x then no stt S(a) Da da i= Perfect Numbers ber ill x = 2"—1(2 Wilson's Lheorem: is an even perfect num- 1)and2º—1 is prime. à is à prime ill (n-1)t= —Imoda. Moôbius inversion: fi=l. u= O if é is not square-free. nt) = (=1)7 ifá is the produet of + distinct primes. Di Ga) =5 Fa), aja then Fl) = ao (5) . da Prime numbers: Inlun Ina pr=nlnn+nlnlon>-n+a n m=+ nos 2m "an on Quny o) Definitions: Notation: Loop An edge connecting a ver- | E(G) Edge set tex to itself. V(G) Vortex set Directed edge has a direction. | c(G) Number of components Simple Graph with no loops or G[S] Induced subgraph multi-cdges. deg(v) Degree of w Walk A sequence vero ... este. MG) Maximum degree Trail A walk with distinct edges. | SC) Minimum degree Path A trail with distinct | X(G) Chromatic number verticos. xE(G) Edge ehromatic number Connected A graph where there exists | Gº Complement graph a path beiween any Lwo vertices. Component A maximal connected subgraph. Tree À connected acyelic graph. Free tree A tree with no root. DAG Directed acyclie graph. Eulerian Graph with a trail visiting cach edge exactly onec. Hamiltonian Graph with a cycle visiting each vertex exactly once. Cut A of edges whose re- moval increases the num- ber of components. Cut-set A minimal cut. Cut edge À size 1 cut. k-Connected A graph comected with the removal of any k— 1 vertices. kTough VSCYS O weave R-dG-S)< Is]. A graph where all vertices have degree k. A k-xcgular subgraph. Regular k-F spanning Matching A set of cdges, no two of which arc adjacent. Clique A set of verticos, all of which arc adjacent. Ind. set A set of vertices, none of which are adjacent., Veriex cover A sel ol vertices which cover all eslges. Planor graph À grapb which can be em- beded im the plane. Plane graph An embedding ol a planar graph. x deg(v) = 2m. ver WGis planarthenn—m+f=2,s0 I<2ân-4 m<3n—6 Any planar graph has a vertex with de- gre <5. Ky Complete graph Kama Complete bipartite graph r(k.€) Ramscy number Geometry Projective coordinates: triples (z.y,2), not all x, y and z zero. (2,9,2) = (ex,cy,ez) Vez. Cartesian Projective (2,3) (e.g, 1) v=mz+b (m,-1,b) g=e (1,0,-e) Distance formula, Lp and Lx metri 0)? + (gn — yo)? H [es = of? + Ita — vol], 1/p (x dim, [ley — zo]? + |ys — 30)" Arca of triangle (x0,40), (21,41) and (2,92): tr %o ge =—%o | Angle formed by three points: Sa, 42) cosô — Line through two points (z0,%0) and (27,31): Ly dl zo yo 1|=0. ey Area of circle, volume of sphere: A=qr, V=gm. HI have seen farther than others, it is because 1 have stood on the shoulders of giants. Tssac Newton Theoretical Computer Science Cheat Sheet E Caleulus Derivatives: d(cu) du div +e) 1. = : 2.——— ds É dy d(u”) nda d(u/v) =m —— 5. = de qr da dee) du dine) Ida =(noe, . = dr Em cje da 8 da ude' li du dícosu du 9. SU 10. ( iz 1 sn, aa. = sec? uol 12. col u) = esc? ut dz da dz 13. = tanw secu du 14. Hescu) =—cotu escntt, da dz dz 15. d(arcsin wu) = 1º du 16. darccosu) du dz de vl-w de d(arctanu) 1º du darecotu) =1 du 17. DT = ST 18. > = — 7 da — wu? dy” 5 da 1-wl dz” areseo 1 arcese - 19. dresecu) — 20. [o . du de uvl — uvl— ul dz d(sinhe) du d(coshu) du 21. dz = coshu, 22. Em = sinhugo, Partial Fractions d(tanh a) > dy d(cothu) 2, bu 23. = sechºu— 24, —>——— = cesdíu— Let N(x) and D(z) be polynomial fune- da Seca qe» dz Se to tions of x. We can break down dsech a 7 dleschr du N(w)/D(x) using partial fraction expan- 25. decor) = ha tanh y— 26. der) = —eschu coth Lira sion. First, if the degree of N is greater . than or equal to the degree of D, divide 97. - ! du 28. arecoshu) = du N by D, obtaining VI Fal de dz Va Idr (ae) N'(a) d(arctanha) 1 du d(arccothu) 1 du = (x) + , ag, DE O, AR O 2) Dia) á de 1-1 dr” ao de ul Lda where the degree of Nº is less than that of a 32 d(arceschu) — du D. Second, factor D(x). Use the follow- . . de - fulVT FE de” ing rules: For a non-repcated factor: Ne) N'(x) (e a)D(a) “DO here Nx) A= 58. For a repeated factor: —a Ne) E AM Na) ED) » EaD” where a s[E (SE) The reasonable man 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 Integral: 1 feudo- 3 fardo- . de 8. / 1+2? 8. finca =-—cost, =arctang, 10. [ ianxar =-In[cosa!l, 12. [sena =In|sccx + tan, 14. fxesin Edir = arcsinê + 02 — 2. fa+o de= fudo+ [ ode, 1 4. fode =mz, 5. fe de=, z de du T. fugas ue fuíãas, 9. [cassado = sina, 1. [ cosas =In|cosal, 13. [oscar = In [esc x + cota], a>0, Theoretical Computer Science Cheat Sheet Calculus Cont. Finite Calculus a>0, a q Arecos To, 1 y . In SEDÊ > dar 66 / da -) VP -dac |2ar+d+ vB — dae eta bete + arctan Darth if b? < due. E > o, Viac— vViac— 2 ' 1 E . ln [lar +b+2vav ar +bo+o), ifa>0, dz va 7. TE ja 2a = d va br +e 2oz — , aresin =, fa>, ife cuô. Xturu)dr= 3 ude+DS vôo, Dudvor=uv- SD Evâude, Duzdr = = Dulde= Ho Ler : DG) da = (ia) Falling Factorial Powers: =e(x>-D)-(r>n+D, n>0, = EEE n0, =, E n 2"! tyt =0 Tor ordinary power series: ES Dama; + Boat, i=0 so xt A(x) = ” at, it Ala) = Dia Eos do Prot Su, 4 a A(a) + 8B(z) = E AG) =5 + Dame, i=0 5 24(a) = a Summasion: Tb; = Ra o Ri then Bla) = 548). Convolution: Ag)B(x) = > i=0 ; Debi; j=u God made the natural numbers; all the rest is the work ol man. Leopold Kronecker