cheat - Theoretical Computer Science Cheat Sheet...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Theoretical Computer Science Cheat Sheet Definitions Series f ( n )= O ( g ( n )) iff positive c, n 0 such that 0 f ( n ) cg ( n ) n n 0 . n X i =1 i = n ( n +1) 2 , n X i =1 i 2 = n ( n + 1)(2 n 6 , n X i =1 i 3 = n 2 ( n 2 4 . In general: n X i =1 i m = 1 m +1 ± ( n m +1 - 1 - n X i =1 ( ( i m +1 - i m +1 - ( m i m ) ² n - 1 X i =1 i m = 1 m m X k =0 ³ m k ´ B k n m +1 - k . Geometric series: n X i =0 c i = c n +1 - 1 c - 1 ,c 6 =1 , X i =0 c i = 1 1 - c , X i =1 c i = c 1 - c , | c | < 1 , n X i =0 ic i = nc n +2 - ( n c n +1 + c ( c - 1) 2 6 , X i =0 ic i = c (1 - c ) 2 , | c | < 1 . Harmonic series: H n = n X i =1 1 i , n X i =1 iH i = n ( n 2 H n - n ( n - 1) 4 . n X i =1 H i =( n H n - n, n X i =1 ³ i m ´ H i = ³ n m ´³ H n +1 - 1 m ´ . f ( n )=Ω( g ( n )) iff positive c, n 0 such that f ( n ) cg ( n ) 0 n n 0 . f ( n )=Θ( g ( n )) iff f ( n O ( g ( n )) and f ( n g ( n )). f ( n o ( g ( n )) iff lim n →∞ f ( n ) /g ( n )=0 . lim n →∞ a n = a iff ±> 0, n 0 such that | a n - a | , n n 0 . sup S least b R such that b s , s S . inf S greatest b R such that b s , s S . lim inf n →∞ a n lim n →∞ inf { a i | i n, i N } . lim sup n →∞ a n lim n →∞ sup { a i | i n, i N } . ( n k ) Combinations: Size k sub- sets of a size n set. µ n k Stirling numbers (1st kind): Arrangements of an n ele- ment set into k cycles. 1. ³ n k ´ = n ! ( n - k )! k ! , 2. n X k =0 ³ n k ´ =2 n , 3. ³ n k ´ = ³ n n - k ´ , 4. ³ n k ´ = n k ³ n - 1 k - 1 ´ , 5. ³ n k ´ = ³ n - 1 k ´ + ³ n - 1 k - 1 ´ , 6. ³ n m ´³ m k ´ = ³ n k ´³ n - k m - k ´ , 7. n X k =0 ³ r + k k ´ = ³ r + n n ´ , 8. n X k =0 ³ k m ´ = ³ n m ´ , 9. n X k =0 ³ r k ´³ s n - k ´ = ³ r + s n ´ , 10. ³ n k ´ - 1) k ³ k - n - 1 k ´ , 11. · n 1 ¸ = · n n ¸ , 12. · n 2 ¸ n - 1 - 1 , 13. · n k ¸ = k · n - 1 k ¸ + · n - 1 k - 1 ¸ , ¹ n k º Stirling numbers (2nd kind): Partitions of an n element set into k non-empty sets. » n k ¼ 1st order Eulerian numbers: Permutations π 1 π 2 ...π n on { 1 , 2 ,...,n } with k ascents. »» n k ¼¼ 2nd order Eulerian numbers. C n Catalan Numbers: Binary trees with n + 1 vertices. 14. ± n 1 ² n - 1)! , 15. ± n 2 ² n - 1)! H n - 1 , 16. ± n n ² , 17. ± n k ² · n k ¸ , 18. ± n k ² n - 1) ± n - 1 k ² + ± n - 1 k - 1 ² , 19. · n n - 1 ¸ = ± n n - 1 ² = ³ n 2 ´ , 20. n X k =0 ± n k ² = n ! , 21. C n = 1 n ³ 2 n n ´ , 22. ½ n 0 ¾ = ½ n n - 1 ¾ , 23. ½ n k ¾ = ½ n n - 1 - k ¾ , 24. ½ n k ¾ k ½ n - 1 k ¾ +( n - k ) ½ n - 1 k - 1 ¾ , 25. ½ 0 k ¾ = n 1i f k =0, 0 otherwise 26. ½ n 1 ¾ n - n - 1 , 27. ½ n 2 ¾ =3 n - ( n + 1)2 n + ³ n 2 ´ , 28. x n = n X k =0 ½ n k ¾³ x + k n ´ , 29. ½ n m ¾ = m X k =0 ³ n k ´ ( m - k ) n ( - 1) k , 30. m ! · n m ¸ = n X k =0 ½ n k ¾³ k n - m ´ , 31. ½ n m ¾ = n X k =0 · n k ¸³ n - k m ´ ( - 1) n - k - m k ! , 32. ½½ n 0 ¾¾ , 33. n n = 0 for n 6 =0 , 34. n k k n - 1 k +(2 n - 1 - k ) n - 1 k - 1 , 35. n X k =0 n k = (2 n ) n 2 n , 36. · x x - n ¸ = n X k =0 n k ¾¾³ x + n - 1 - k 2 n ´ , 37. · n m ¸ = X k ³ n k ´· k m ¸ = n X k =0 · k m ¸ ( m n - k ,
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Theoretical Computer Science Cheat Sheet Identities Cont. Trees 38. ± n +1 m ² = X k ± n k ²³ k m ´ = n X k =0 ± k m ² n n - k = n ! n X k =0 1 k !
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

cheat - Theoretical Computer Science Cheat Sheet...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online