foundations of computer science lecture 9 sums and
play

Foundations of Computer Science Lecture 9 Sums And Asymptotics - PowerPoint PPT Presentation

Foundations of Computer Science Lecture 9 Sums And Asymptotics Computing Sums Asymptotics: big-( ), big- O ( ), big-( ) The Integration Method ( 1) k +1 k 2 = ?? k 3 + 1 k =1 Last Time 1 Structural induction: proofs


  1. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  2. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j � Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  3. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  4. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � j × 10 Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  5. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � j × 10 10 � S 3 = i =1 i Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  6. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � j × 10 10 � S 3 = i =1 i = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  7. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � j × 10 10 1 � S 3 = i =1 i = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 2 × 10 × (10 + 1) Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  8. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � j × 10 10 1 � S 3 = i =1 i = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 2 × 10 × (10 + 1) The index of summation is i in these examples. Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  9. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � j × 10 10 1 � S 3 = i =1 i = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 2 × 10 × (10 + 1) The index of summation is i in these examples. Constants (independent of summation index) can be taken outside the sum. 10 10 10 10 S 1 = i =1 3 = 3 � i =1 1 = 3 × 10 � S 2 = i =1 j = j � i =1 1 = j × 10 . � Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  10. Computing Sums: Tool 1: Constant Rule 10 � S 1 = i =1 3 = 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 3 × 10 10 S 2 = i =1 j = j + j + j + j + j + j + j + j + j + j � j × 10 10 1 � S 3 = i =1 i = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 2 × 10 × (10 + 1) The index of summation is i in these examples. Constants (independent of summation index) can be taken outside the sum. 10 10 10 10 S 1 = i =1 3 = 3 � i =1 1 = 3 × 10 � S 2 = i =1 j = j � i =1 1 = j × 10 . � n Pop Quiz 9.2 Compute T 4 ( n ) = 5 + i =1 10 . � Creator: Malik Magdon-Ismail Sums And Asymptotics: 6 / 16 Addition Rule →

  11. Computing Sums: Tool 2: Addition Rule 5 i =1 ( i + i 2 ) S = � Creator: Malik Magdon-Ismail Sums And Asymptotics: 7 / 16 Common Sums →

  12. Computing Sums: Tool 2: Addition Rule 5 i =1 ( i + i 2 ) S = � = (1 + 1 2 ) + (2 + 2 2 ) + (3 + 3 2 ) + (4 + 4 2 ) + (5 + 5 2 ) Creator: Malik Magdon-Ismail Sums And Asymptotics: 7 / 16 Common Sums →

  13. Computing Sums: Tool 2: Addition Rule 5 i =1 ( i + i 2 ) S = � = (1 + 1 2 ) + (2 + 2 2 ) + (3 + 3 2 ) + (4 + 4 2 ) + (5 + 5 2 ) = (1 + 2 + 3 + 4 + 5) + (1 2 + 2 2 + 3 2 + 4 2 + 5 2 ) (rearrange terms) Creator: Malik Magdon-Ismail Sums And Asymptotics: 7 / 16 Common Sums →

  14. Computing Sums: Tool 2: Addition Rule 5 i =1 ( i + i 2 ) S = � = (1 + 1 2 ) + (2 + 2 2 ) + (3 + 3 2 ) + (4 + 4 2 ) + (5 + 5 2 ) = (1 + 2 + 3 + 4 + 5) + (1 2 + 2 2 + 3 2 + 4 2 + 5 2 ) (rearrange terms) 5 5 i =1 i 2 . � � = i =1 i + Creator: Malik Magdon-Ismail Sums And Asymptotics: 7 / 16 Common Sums →

  15. Computing Sums: Tool 2: Addition Rule 5 i =1 ( i + i 2 ) S = � = (1 + 1 2 ) + (2 + 2 2 ) + (3 + 3 2 ) + (4 + 4 2 ) + (5 + 5 2 ) = (1 + 2 + 3 + 4 + 5) + (1 2 + 2 2 + 3 2 + 4 2 + 5 2 ) (rearrange terms) 5 5 i =1 i 2 . � � = i =1 i + The sum of terms added together is the addition of the individual sums. � i ( a ( i ) + b ( i ) + c ( i ) + · · · ) = � i a ( i ) + � i b ( i ) + � i c ( i ) + · · · Creator: Malik Magdon-Ismail Sums And Asymptotics: 7 / 16 Common Sums →

  16. Computing Sums: Tool 3: Common Sums n n i =0 2 i = 2 n +1 − 1 n i = k 1 = n + 1 − k � � 1 � i =1 i = 2 n ( n + 1) n 2 i = 2 − 1 1 n i =1 i 2 = n i =1 f ( x ) = nf ( x ) � 1 � 6 n ( n + 1)(2 n + 1) � 2 n i =0 i =0 r i = 1 − r n +1 n i =1 i 3 = n n 4 n 2 ( n + 1) 2 1 � i =1 log i = log n ! � � ( r � =1) 1 − r n i =1 (1 + 2 i + 2 i +2 ) � Example: n i =1 (1 + 2 i + 2 i +2 ) = � Creator: Malik Magdon-Ismail Sums And Asymptotics: 8 / 16 Nested Sums →

  17. Computing Sums: Tool 3: Common Sums n n i =0 2 i = 2 n +1 − 1 n i = k 1 = n + 1 − k � � 1 � i =1 i = 2 n ( n + 1) n 2 i = 2 − 1 1 n i =1 i 2 = n i =1 f ( x ) = nf ( x ) � 1 � 6 n ( n + 1)(2 n + 1) � 2 n i =0 i =0 r i = 1 − r n +1 n i =1 i 3 = n n 1 4 n 2 ( n + 1) 2 � i =1 log i = log n ! � � ( r � =1) 1 − r n i =1 (1 + 2 i + 2 i +2 ) � Example: n n n n i =1 (1 + 2 i + 2 i +2 ) = i =1 2 i +2 � � � � i =1 1 + i =1 2 i + (addition rule) Creator: Malik Magdon-Ismail Sums And Asymptotics: 8 / 16 Nested Sums →

  18. Computing Sums: Tool 3: Common Sums n n i =0 2 i = 2 n +1 − 1 n i = k 1 = n + 1 − k � � 1 � i =1 i = 2 n ( n + 1) n 2 i = 2 − 1 1 n i =1 i 2 = n i =1 f ( x ) = nf ( x ) � 1 � 6 n ( n + 1)(2 n + 1) � 2 n i =0 i =0 r i = 1 − r n +1 n i =1 i 3 = n n 1 4 n 2 ( n + 1) 2 � i =1 log i = log n ! � � ( r � =1) 1 − r n i =1 (1 + 2 i + 2 i +2 ) � Example: n n n n i =1 (1 + 2 i + 2 i +2 ) = i =1 2 i +2 � � � � i =1 1 + i =1 2 i + (addition rule) n n n i =1 2 i � � � = i =1 1 + 2 i =1 i + 4 (constant rule) Creator: Malik Magdon-Ismail Sums And Asymptotics: 8 / 16 Nested Sums →

  19. Computing Sums: Tool 3: Common Sums n n i =0 2 i = 2 n +1 − 1 n i = k 1 = n + 1 − k � � 1 � i =1 i = 2 n ( n + 1) n 2 i = 2 − 1 1 n i =1 i 2 = n i =1 f ( x ) = nf ( x ) � 1 � 6 n ( n + 1)(2 n + 1) � 2 n i =0 i =0 r i = 1 − r n +1 n i =1 i 3 = n n 4 n 2 ( n + 1) 2 1 � i =1 log i = log n ! � � ( r � =1) 1 − r n i =1 (1 + 2 i + 2 i +2 ) � Example: n n n n i =1 (1 + 2 i + 2 i +2 ) = i =1 2 i +2 � � � � i =1 1 + i =1 2 i + (addition rule) n n n i =1 2 i � � � = i =1 1 + 2 i =1 i + 4 (constant rule) 2 n ( n + 1) + 4 · (2 n +1 − 1 − 1 ) = n + 2 × 1 (common sums) Creator: Malik Magdon-Ismail Sums And Asymptotics: 8 / 16 Nested Sums →

  20. Computing Sums: Tool 3: Common Sums n n i =0 2 i = 2 n +1 − 1 n i = k 1 = n + 1 − k � � 1 � i =1 i = 2 n ( n + 1) n 2 i = 2 − 1 1 n i =1 i 2 = n i =1 f ( x ) = nf ( x ) � 1 � 6 n ( n + 1)(2 n + 1) � 2 n i =0 i =0 r i = 1 − r n +1 n i =1 i 3 = n n 4 n 2 ( n + 1) 2 1 � i =1 log i = log n ! � � ( r � =1) 1 − r n i =1 (1 + 2 i + 2 i +2 ) � Example: n n n n i =1 (1 + 2 i + 2 i +2 ) = i =1 2 i +2 � � � � i =1 1 + i =1 2 i + (addition rule) n n n i =1 2 i � � � = i =1 1 + 2 i =1 i + 4 (constant rule) 2 n ( n + 1) + 4 · (2 n +1 − 1 − 1 ) = n + 2 × 1 (common sums) = n + n ( n + 1) + 2 n +3 − 8 (common sums) Creator: Malik Magdon-Ismail Sums And Asymptotics: 8 / 16 Nested Sums →

  21. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  22. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  23. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 j =1 1 � j =1 1 � j =1 1 � ( i =1) ( i =2) ( i =3) Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  24. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � ( i =1) ( i =2) ( i =3) Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  25. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  26. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) 1 2 3 S 2 j =1 1 � j =1 1 � j =1 1 � ( i =1) ( i =2) ( i =3) Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  27. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) 1 2 3 S 2 = j =1 1 + � j =1 1 + � j =1 1 � ( i =1) ( i =2) ( i =3) Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  28. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) 1 2 3 S 2 = j =1 1 + � j =1 1 + � j =1 1 � = 1 + 2 + 3 = 6 . ( i =1) ( i =2) ( i =3) Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  29. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) 1 2 3 S 2 = j =1 1 + � j =1 1 + � j =1 1 � = 1 + 2 + 3 = 6 . ( i =1) ( i =2) ( i =3) More generally: n i � � S ( n ) = j =1 1 i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  30. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) 1 2 3 S 2 = j =1 1 + � j =1 1 + � j =1 1 � = 1 + 2 + 3 = 6 . ( i =1) ( i =2) ( i =3) More generally: n i n i � � � � S ( n ) = j =1 1 = j =1 1 i =1 i =1 � �� � f ( i )= i Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  31. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) 1 2 3 S 2 = j =1 1 + � j =1 1 + � j =1 1 � = 1 + 2 + 3 = 6 . ( i =1) ( i =2) ( i =3) More generally: n i n i n � � � � � S ( n ) = j =1 1 = j =1 1 = i =1 i i =1 i =1 � �� � f ( i )= i Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  32. Computing Sums: Tool 3: Nested Sum Rule 3 3 3 i � � � � S 1 = j =1 1; S 2 = j =1 1 . i =1 i =1 To compute a nested sum, start with the innermost sum and proceed outward. 3 3 3 S 1 = j =1 1 + � j =1 1 + � j =1 1 � = 3 + 3 + 3 = 9 . ( i =1) ( i =2) ( i =3) 1 2 3 S 2 = j =1 1 + � j =1 1 + � j =1 1 � = 1 + 2 + 3 = 6 . ( i =1) ( i =2) ( i =3) More generally: n i n i n i =1 i = 1 � � � � � S ( n ) = j =1 1 = j =1 1 = 2 n ( n + 1) . i =1 i =1 � �� � f ( i )= i Creator: Malik Magdon-Ismail Sums And Asymptotics: 9 / 16 Computing T 2 ( n ) →

  33. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n  = T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  34. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  35. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  36. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 n n = 2 + 3 n + � j = i 6 � (common sum) i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  37. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 n n = 2 + 3 n + � j = i 6 � (common sum) i =1 n n = 2 + 3 n + � j = i 6 � (innermost sum) i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  38. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 n n = 2 + 3 n + � j = i 6 � (common sum) i =1 n n = 2 + 3 n + � j = i 6 � (innermost sum) i =1 n n � � = 2 + 3 n + 6 j = i 1 (constant rule) i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  39. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 n n = 2 + 3 n + � j = i 6 � (common sum) i =1 n n = 2 + 3 n + � j = i 6 � (innermost sum) i =1 n n � � = 2 + 3 n + 6 j = i 1 (constant rule) i =1 n = 2 + 3 n + 6 i =1 ( n + 1 − i ) � (common sum) Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  40. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 n n = 2 + 3 n + � j = i 6 � (common sum) i =1 n n = 2 + 3 n + � j = i 6 � (innermost sum) i =1 n n � � = 2 + 3 n + 6 j = i 1 (constant rule) i =1 n = 2 + 3 n + 6 i =1 ( n + 1 − i ) � (common sum) = 2 + 3 n + 6( n + ( n − 1) + · · · + 1) Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  41. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 n n = 2 + 3 n + � j = i 6 � (common sum) i =1 n n = 2 + 3 n + � j = i 6 � (innermost sum) i =1 n n � � = 2 + 3 n + 6 j = i 1 (constant rule) i =1 n = 2 + 3 n + 6 i =1 ( n + 1 − i ) � (common sum) = 2 + 3 n + 6( n + ( n − 1) + · · · + 1) = 2 + 3 n + 6 × 1 2 n ( n + 1) (common sum) Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  42. n n   Computing a Formula for T 2 ( n ) = 2 +  3 + j = i 6 � �  i =1   n n n n n  = 2 + T 2 ( n ) = 2 + �  3 + j = i 6 � i =1 3 + � � j = i 6 � (sum rule) i =1 i =1 n n n � � � = 2 + 3 i =1 1 + j = i 6 (constant rule) i =1 n n = 2 + 3 n + � j = i 6 � (common sum) i =1 n n = 2 + 3 n + � j = i 6 � (innermost sum) i =1 n n � � = 2 + 3 n + 6 j = i 1 (constant rule) i =1 n = 2 + 3 n + 6 i =1 ( n + 1 − i ) � (common sum) = 2 + 3 n + 6( n + ( n − 1) + · · · + 1) = 2 + 3 n + 6 × 1 2 n ( n + 1) (common sum) = 2 + 6 n + 3 n 2 (algebra) Creator: Malik Magdon-Ismail Sums And Asymptotics: 10 / 16 Practice →

  43. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i � j =1 ij = � i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  44. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i n i � j =1 ij = � � j =1 ij � (innermost sum) i =1 i =1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  45. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i n i � j =1 ij = � � j =1 ij � (innermost sum) i =1 i =1 n i � � = i =1 i j =1 j (constant rule) Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  46. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i n i � j =1 ij = � � j =1 ij � (innermost sum) i =1 i =1 n i � � = i =1 i j =1 j (constant rule) n i =1 i × 1 = � 2 i ( i + 1) (common sum) Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  47. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i n i � j =1 ij = � � j =1 ij � (innermost sum) i =1 i =1 n i � � = i =1 i j =1 j (constant rule) n i =1 i × 1 = � 2 i ( i + 1) (common sum) n i =1 ( i 3 + i 2 ) 1 = � (algebra, constant rule) 2 Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  48. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i n i � j =1 ij = � � j =1 ij � (innermost sum) i =1 i =1 n i � � = i =1 i j =1 j (constant rule) n i =1 i × 1 = � 2 i ( i + 1) (common sum) n i =1 ( i 3 + i 2 ) 1 = � (algebra, constant rule) 2 n n i =1 i 3 + 1 1 i =1 i 2 = � � (sum rule) 2 2 Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  49. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i n i � j =1 ij = � � j =1 ij � (innermost sum) i =1 i =1 n i � � = i =1 i j =1 j (constant rule) n i =1 i × 1 = � 2 i ( i + 1) (common sum) n i =1 ( i 3 + i 2 ) 1 = � (algebra, constant rule) 2 n n i =1 i 3 + 1 1 i =1 i 2 = � � (sum rule) 2 2 8 n 2 ( n + 1) 2 + 1 1 = 12 n ( n + 1)(2 n + 1) (common sums) Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  50. n i Practice: Compute a Formula for the Sum j =1 ij � � i =1 n i n i � j =1 ij = � � j =1 ij � (innermost sum) i =1 i =1 n i � � = i =1 i j =1 j (constant rule) n i =1 i × 1 = � 2 i ( i + 1) (common sum) n i =1 ( i 3 + i 2 ) 1 = � (algebra, constant rule) 2 n n i =1 i 3 + 1 1 i =1 i 2 = � � (sum rule) 2 2 8 n 2 ( n + 1) 2 + 1 1 = 12 n ( n + 1)(2 n + 1) (common sums) 8 n 2 + 5 12 n 3 + 1 8 n 4 12 n + 3 1 = (algebra) Creator: Malik Magdon-Ismail Sums And Asymptotics: 11 / 16 Summary of Max. Substring Sum →

  51. Summary of Maximum Substring Sum Algorithms 100 Runtimes T 1 ( n ) T 2 ( n ) 2 n 2 + 1 (Running Time)/n 80 T 1 ( n ) = 2 + 31 6 n + 7 3 n 3 60 T 2 ( n ) = 2 + 6 n + 3 n 2 T 3 ( n ) 40 3 n (log 2 n + 1) − 9 ≤ T 3 ( n ) ≤ 12 n (log 2 n + 3) − 9 20 T 4 ( n ) T 4 ( n ) = 5 + 10 n 0 10 20 30 40 50 n (“simple” formulas for T 1 ( n ) , . . . , T 4 ( n )) Creator: Malik Magdon-Ismail Sums And Asymptotics: 12 / 16 Linear Functions Θ( n ) →

  52. Summary of Maximum Substring Sum Algorithms 100 Runtimes T 1 ( n ) T 2 ( n ) 2 n 2 + 1 (Running Time)/n 80 T 1 ( n ) = 2 + 31 6 n + 7 3 n 3 60 T 2 ( n ) = 2 + 6 n + 3 n 2 T 3 ( n ) 40 3 n (log 2 n + 1) − 9 ≤ T 3 ( n ) ≤ 12 n (log 2 n + 3) − 9 20 T 4 ( n ) T 4 ( n ) = 5 + 10 n 0 10 20 30 40 50 n (“simple” formulas for T 1 ( n ) , . . . , T 4 ( n )) So, which algorithm is best? Creator: Malik Magdon-Ismail Sums And Asymptotics: 12 / 16 Linear Functions Θ( n ) →

  53. Summary of Maximum Substring Sum Algorithms 100 Runtimes T 1 ( n ) T 2 ( n ) 2 n 2 + 1 (Running Time)/n 80 T 1 ( n ) = 2 + 31 6 n + 7 3 n 3 60 T 2 ( n ) = 2 + 6 n + 3 n 2 T 3 ( n ) 40 3 n (log 2 n + 1) − 9 ≤ T 3 ( n ) ≤ 12 n (log 2 n + 3) − 9 20 T 4 ( n ) T 4 ( n ) = 5 + 10 n 0 10 20 30 40 50 n (“simple” formulas for T 1 ( n ) , . . . , T 4 ( n )) So, which algorithm is best? Computers solve problems with big inputs. We care about large n . Creator: Malik Magdon-Ismail Sums And Asymptotics: 12 / 16 Linear Functions Θ( n ) →

  54. Summary of Maximum Substring Sum Algorithms 100 Runtimes T 1 ( n ) T 2 ( n ) 2 n 2 + 1 (Running Time)/n 80 T 1 ( n ) = 2 + 31 6 n + 7 3 n 3 60 T 2 ( n ) = 2 + 6 n + 3 n 2 T 3 ( n ) 40 3 n (log 2 n + 1) − 9 ≤ T 3 ( n ) ≤ 12 n (log 2 n + 3) − 9 20 T 4 ( n ) T 4 ( n ) = 5 + 10 n 0 10 20 30 40 50 n (“simple” formulas for T 1 ( n ) , . . . , T 4 ( n )) So, which algorithm is best? Computers solve problems with big inputs. We care about large n . Compare runtimes asymptotically in the input size n . That is n → ∞ . Creator: Malik Magdon-Ismail Sums And Asymptotics: 12 / 16 Linear Functions Θ( n ) →

  55. Summary of Maximum Substring Sum Algorithms 100 Runtimes T 1 ( n ) T 2 ( n ) 2 n 2 + 1 (Running Time)/n 80 T 1 ( n ) = 2 + 31 6 n + 7 3 n 3 60 T 2 ( n ) = 2 + 6 n + 3 n 2 T 3 ( n ) 40 3 n (log 2 n + 1) − 9 ≤ T 3 ( n ) ≤ 12 n (log 2 n + 3) − 9 20 T 4 ( n ) T 4 ( n ) = 5 + 10 n 0 10 20 30 40 50 n (“simple” formulas for T 1 ( n ) , . . . , T 4 ( n )) So, which algorithm is best? Computers solve problems with big inputs. We care about large n . Compare runtimes asymptotically in the input size n . That is n → ∞ . Ignore additive and multiplicative constants (minutia). We care about growth rate . Creator: Malik Magdon-Ismail Sums And Asymptotics: 12 / 16 Linear Functions Θ( n ) →

  56. Summary of Maximum Substring Sum Algorithms 100 Runtimes T 1 ( n ) T 2 ( n ) 2 n 2 + 1 (Running Time)/n 80 T 1 ( n ) = 2 + 31 6 n + 7 3 n 3 60 T 2 ( n ) = 2 + 6 n + 3 n 2 T 3 ( n ) 40 3 n (log 2 n + 1) − 9 ≤ T 3 ( n ) ≤ 12 n (log 2 n + 3) − 9 20 T 4 ( n ) T 4 ( n ) = 5 + 10 n 0 10 20 30 40 50 n (“simple” formulas for T 1 ( n ) , . . . , T 4 ( n )) So, which algorithm is best? Computers solve problems with big inputs. We care about large n . Compare runtimes asymptotically in the input size n . That is n → ∞ . Ignore additive and multiplicative constants (minutia). We care about growth rate . Algorithm 4 is linear in n , T 4 ( n ) → constant. n Creator: Malik Magdon-Ismail Sums And Asymptotics: 12 / 16 Linear Functions Θ( n ) →

  57. Asymptotically Linear Functions: Θ( n ), big-Theta-of- n T ∈ Θ( n ) , if there are positive constants c, C for which c · n ≤ T ( n ) ≤ C · n . Creator: Malik Magdon-Ismail Sums And Asymptotics: 13 / 16 General Asymptotics →

  58. Asymptotically Linear Functions: Θ( n ), big-Theta-of- n T ∈ Θ( n ) , if there are positive constants c, C for which c · n ≤ T ( n ) ≤ C · n .  “ T > n ” ; T ∈ ω ( n ) ,  ∞       T ( n )  − →    constant>0 “ T = n ” ; T ∈ Θ( n ) , n →∞ n        “ T < n ” . 0 T ∈ o ( n ) ,     Creator: Malik Magdon-Ismail Sums And Asymptotics: 13 / 16 General Asymptotics →

  59. Asymptotically Linear Functions: Θ( n ), big-Theta-of- n T ∈ Θ( n ) , if there are positive constants c, C for which c · n ≤ T ( n ) ≤ C · n .  “ T > n ” ; T ∈ ω ( n ) ,  ∞       T ( n )  − →    constant>0 “ T = n ” ; T ∈ Θ( n ) , n →∞ n        “ T < n ” . 0 T ∈ o ( n ) ,     Linear means in Θ( n ) : 2 n + 15 √ n, 10 9 n + 3 , 2 log 2 n +4 . 2 n + 7 , 3 n + log n, Creator: Malik Magdon-Ismail Sums And Asymptotics: 13 / 16 General Asymptotics →

  60. Asymptotically Linear Functions: Θ( n ), big-Theta-of- n T ∈ Θ( n ) , if there are positive constants c, C for which c · n ≤ T ( n ) ≤ C · n .  “ T > n ” ; T ∈ ω ( n ) ,  ∞       T ( n )  − →    constant>0 “ T = n ” ; T ∈ Θ( n ) , n →∞ n        “ T < n ” . 0 T ∈ o ( n ) ,     Linear means in Θ( n ) : 2 n + 15 √ n, 10 9 n + 3 , 2 log 2 n +4 . 2 n + 7 , 3 n + log n, Not linear, not in Θ( n ) : 10 9 √ n + 15 , n 10 − 9 n 2 , n 1 . 0001 , n 0 . 9999 , 2 n . n log n, log n, Creator: Malik Magdon-Ismail Sums And Asymptotics: 13 / 16 General Asymptotics →

  61. Asymptotically Linear Functions: Θ( n ), big-Theta-of- n T ∈ Θ( n ) , if there are positive constants c, C for which c · n ≤ T ( n ) ≤ C · n .  “ T > n ” ; T ∈ ω ( n ) ,  ∞       T ( n )  − →    constant>0 “ T = n ” ; T ∈ Θ( n ) , n →∞ n        “ T < n ” . 0 T ∈ o ( n ) ,     Linear means in Θ( n ) : 2 n + 15 √ n, 10 9 n + 3 , 2 log 2 n +4 . 2 n + 7 , 3 n + log n, Not linear, not in Θ( n ) : 10 9 √ n + 15 , n 10 − 9 n 2 , n 1 . 0001 , n 0 . 9999 , 2 n . n log n, log n, Other runtimes from practice: log linear loglinear quadratic cubic superpolynomial exponential factorial BAD Θ( n 2 ) Θ( n 3 ) Θ( n log n ) Θ(2 n ) Θ( n n ) Θ(log n ) Θ( n ) Θ( n log n ) Θ( n !) Creator: Malik Magdon-Ismail Sums And Asymptotics: 13 / 16 General Asymptotics →

  62. General Asymptotics: Θ( f ), big-Theta-of- f ω ( f )  T ∈ ω ( f ) , “ T < f ” ;  ∞  T ( n ) /f ( n )      T ( n )  Θ( f ) f ( n ) − →    constant>0 T ∈ Θ( f ) , “ T = f ” ; n →∞        0 T ∈ o ( f ) , “ T < f ” .   o ( f )   n − → T ∈ o ( f ) T ∈ Θ( f ) T ∈ ω ( f ) “ T < f ” “ T = f ” “ T > f ” cf ( n ) ≤ T ( n ) ≤ Cf ( n ) Examples and Practice. (See also Exercise 9.6) Creator: Malik Magdon-Ismail Sums And Asymptotics: 14 / 16 The Integration Method →

  63. General Asymptotics: Θ( f ), big-Theta-of- f ω ( f )  T ∈ ω ( f ) , “ T < f ” ;  ∞  T ( n ) /f ( n )      T ( n )  Θ( f ) f ( n ) − →    constant>0 T ∈ Θ( f ) , “ T = f ” ; n →∞        0 T ∈ o ( f ) , “ T < f ” .   o ( f )   n − → T ∈ o ( f ) T ∈ Θ( f ) T ∈ ω ( f ) “ T < f ” “ T ≤ f ” “ T = f ” “ T ≥ f ” “ T > f ” cf ( n ) ≤ T ( n ) ≤ Cf ( n ) Examples and Practice. (See also Exercise 9.6) Creator: Malik Magdon-Ismail Sums And Asymptotics: 14 / 16 The Integration Method →

  64. General Asymptotics: Θ( f ), big-Theta-of- f ω ( f )  T ∈ ω ( f ) , “ T < f ” ;  ∞  T ( n ) /f ( n )      T ( n )  Θ( f ) f ( n ) − →    constant>0 T ∈ Θ( f ) , “ T = f ” ; n →∞        0 T ∈ o ( f ) , “ T < f ” .   o ( f )   n − → T ∈ o ( f ) T ∈ O ( f ) T ∈ Θ( f ) T ∈ Ω( f ) T ∈ ω ( f ) “ T < f ” “ T ≤ f ” “ T = f ” “ T ≥ f ” “ T > f ” cf ( n ) ≤ T ( n ) ≤ Cf ( n ) Examples and Practice. (See also Exercise 9.6) Creator: Malik Magdon-Ismail Sums And Asymptotics: 14 / 16 The Integration Method →

  65. General Asymptotics: Θ( f ), big-Theta-of- f ω ( f )  T ∈ ω ( f ) , “ T < f ” ;  ∞  T ( n ) /f ( n )      T ( n )  Θ( f ) f ( n ) − →    constant>0 T ∈ Θ( f ) , “ T = f ” ; n →∞        0 T ∈ o ( f ) , “ T < f ” .   o ( f )   n − → T ∈ o ( f ) T ∈ O ( f ) T ∈ Θ( f ) T ∈ Ω( f ) T ∈ ω ( f ) “ T < f ” “ T ≤ f ” “ T = f ” “ T ≥ f ” “ T > f ” T ( n ) ≤ Cf ( n ) cf ( n ) ≤ T ( n ) ≤ Cf ( n ) cf ( n ) ≤ T ( n ) Examples and Practice. (See also Exercise 9.6) Creator: Malik Magdon-Ismail Sums And Asymptotics: 14 / 16 The Integration Method →

  66. General Asymptotics: Θ( f ), big-Theta-of- f ω ( f )  T ∈ ω ( f ) , “ T < f ” ;  ∞  T ( n ) /f ( n )      T ( n )  Θ( f ) f ( n ) − →    constant>0 T ∈ Θ( f ) , “ T = f ” ; n →∞        0 T ∈ o ( f ) , “ T < f ” .   o ( f )   n − → T ∈ o ( f ) T ∈ O ( f ) T ∈ Θ( f ) T ∈ Ω( f ) T ∈ ω ( f ) “ T < f ” “ T ≤ f ” “ T = f ” “ T ≥ f ” “ T > f ” T ( n ) ≤ Cf ( n ) cf ( n ) ≤ T ( n ) ≤ Cf ( n ) cf ( n ) ≤ T ( n ) Examples and Practice. (See also Exercise 9.6) For polynomials, growth rate is the highest order. n 2 + n √ n n 2 + log 256 n n 2 + n 1 . 99 log 256 n 2 n 2 Θ( n 2 ) Θ( n 2 ) Θ( n 2 ) Θ( n 2 ) Creator: Malik Magdon-Ismail Sums And Asymptotics: 14 / 16 The Integration Method →

  67. General Asymptotics: Θ( f ), big-Theta-of- f ω ( f )  T ∈ ω ( f ) , “ T < f ” ;  ∞  T ( n ) /f ( n )      T ( n )  Θ( f ) f ( n ) − →    constant>0 T ∈ Θ( f ) , “ T = f ” ; n →∞        0 T ∈ o ( f ) , “ T < f ” .   o ( f )   n − → T ∈ o ( f ) T ∈ O ( f ) T ∈ Θ( f ) T ∈ Ω( f ) T ∈ ω ( f ) “ T < f ” “ T ≤ f ” “ T = f ” “ T ≥ f ” “ T > f ” T ( n ) ≤ Cf ( n ) cf ( n ) ≤ T ( n ) ≤ Cf ( n ) cf ( n ) ≤ T ( n ) Examples and Practice. (See also Exercise 9.6) For polynomials, growth rate is the highest order. For nested sums, growth rate is number of nestings plus order of summand. n 2 + n √ n n 2 + log 256 n n 2 + n 1 . 99 log 256 n n n i n i 2 n 2 � � � � � i =1 i j =1 1 j =1 ij i =1 i =1 Θ( n 2 ) Θ( n 2 ) Θ( n 2 ) Θ( n 2 ) Θ( n 2 ) Θ( n 2 ) Θ( n 4 ) Creator: Malik Magdon-Ismail Sums And Asymptotics: 14 / 16 The Integration Method →

  68. The Integration Method � n 0 dx f ( x ) f ( x ) f ( n ) · · · f (3) f (2) f (1) 0 1 2 3 · · · n n + 1 Theorem. (Integration Bound) For a monotonically increasing function f , Creator: Malik Magdon-Ismail Sums And Asymptotics: 15 / 16 Integration For Asymptotic Behavior →

  69. The Integration Method � n 0 dx f ( x ) f ( x ) f ( n ) · · · f (3) f (2) f (1) 0 1 2 3 · · · n n + 1 Theorem. (Integration Bound) For a monotonically increasing function f , � n n m − 1 dx f ( x ) ≤ i = m f ( i ) � Creator: Malik Magdon-Ismail Sums And Asymptotics: 15 / 16 Integration For Asymptotic Behavior →

  70. The Integration Method � n � n +1 0 dx f ( x ) dx f ( x ) 1 f ( x ) f ( n ) f ( n ) · · · · · · f (3) f (3) f (2) f (2) f (1) f (1) 0 1 2 3 · · · n n + 1 0 1 2 3 n + 1 · · · n Theorem. (Integration Bound) For a monotonically increasing function f , � n n m − 1 dx f ( x ) ≤ i = m f ( i ) � Creator: Malik Magdon-Ismail Sums And Asymptotics: 15 / 16 Integration For Asymptotic Behavior →

  71. The Integration Method � n � n +1 0 dx f ( x ) dx f ( x ) 1 f ( x ) f ( n ) f ( n ) · · · · · · f (3) f (3) f (2) f (2) f (1) f (1) 0 1 2 3 · · · n n + 1 0 1 2 3 n + 1 · · · n Theorem. (Integration Bound) For a monotonically increasing function f , � n � n +1 n m − 1 dx f ( x ) ≤ i = m f ( i ) ≤ � dx f ( x ) . m Creator: Malik Magdon-Ismail Sums And Asymptotics: 15 / 16 Integration For Asymptotic Behavior →

  72. The Integration Method � n � n +1 0 dx f ( x ) dx f ( x ) 1 f ( x ) f ( n ) f ( n ) · · · · · · f (3) f (3) f (2) f (2) f (1) f (1) 0 1 2 3 · · · n n + 1 0 1 2 3 n + 1 · · · n Theorem. (Integration Bound) For a monotonically increasing function f , � n � n +1 n m − 1 dx f ( x ) ≤ i = m f ( i ) ≤ � dx f ( x ) . m (If f is monotonically decreasing, the inequalities are reversed.) Creator: Malik Magdon-Ismail Sums And Asymptotics: 15 / 16 Integration For Asymptotic Behavior →

  73. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  74. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : n i =1 i k � Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  75. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : � n n i =1 i k ≈ 0 dx x k � Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  76. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : 0 dx x k = n k +1 � n n i =1 i k ≈ � k + 1 Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  77. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : 0 dx x k = n k +1 � n n i =1 i k ≈ k + 1 ∈ Θ( n k +1 ) . � Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  78. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : 0 dx x k = n k +1 � n n i =1 i k ≈ k + 1 ∈ Θ( n k +1 ) . � Harmonic Numbers. Set f ( x ) = 1 /x (monotonically decreasing): Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  79. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : 0 dx x k = n k +1 � n n i =1 i k ≈ k + 1 ∈ Θ( n k +1 ) . � Harmonic Numbers. Set f ( x ) = 1 /x (monotonically decreasing): 1 � n +1 n dx 1 H n = � ≤ 1 x i i =1 � �� � ln( n +1) Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  80. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : 0 dx x k = n k +1 � n n i =1 i k ≈ k + 1 ∈ Θ( n k +1 ) . � Harmonic Numbers. Set f ( x ) = 1 /x (monotonically decreasing): 1 � n +1 � n n dx 1 1 dx 1 H n = � 1 + . ≤ ≤ 1 x x i i =1 � �� � � �� � 1+ln n ln( n +1) Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

  81. Integration For Quickly Getting Asymptotic Behavior Integer Powers. Set f ( x ) = x k : 0 dx x k = n k +1 � n n i =1 i k ≈ k + 1 ∈ Θ( n k +1 ) . � Harmonic Numbers. Set f ( x ) = 1 /x (monotonically decreasing): 1 � n +1 � n n dx 1 1 dx 1 H n = � 1 + . ≤ ≤ 1 x x i i =1 � �� � � �� � 1+ln n ln( n +1) Stirling’s Approximation for ln n ! . Set f ( x ) = ln x : Creator: Malik Magdon-Ismail Sums And Asymptotics: 16 / 16

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend