Download presentation
Presentation is loading. Please wait.
Published byCamilla Small Modified over 6 years ago
1
Mathematics for Computer Science MIT 6.042J/18.062J
Sums, Products & Asymptotics Copyright © Albert Meyer, 2002. Prof. Albert Meyer & Dr. Radhika Nagpal
2
C. F. Gauss Picture source:
3
Sum for children 89 + 102 + 115 + 128 + 141 + 154 + ··· 193 + ···
··· ··· ··· ···
4
Sum for children Nine-year old Gauss (so the story goes) saw that each number was 13 greater than the previous one.
5
Sum for children A ::= 89 + (89+13) + (89+2·13) + … + (89+24·13)
+ 89+(89+24·13)
6
first + last A = · #terms 2 Sum for children 2A = [89+ (89+24·13)]·25
7
A = Average · #terms Sum for children 2A = [89+ (89+24·13)]·25 first
last #terms A = Average · #terms
8
Sum for children Example: … + (n-1) + n =
9
Geometric Series
10
Geometric Series
11
Geometric Series G-xG= xn+1
12
Geometric Series G-xG= 1- xn+1
13
Geometric Series G-xG= 1- xn+1 n+1
14
The future value of $$. Annuities I will promise to pay you $100
in exactly one year, if you will pay me $X now.
15
1.03 X 100. Annuities My bank will pay me 3% interest.
If I deposit your $X for a year, I can’t lose if 1.03 X 100.
16
Annuities I can’t lose if you pay me: X = $100/1.03 ≈ $97.09
17
Annuities 97.09¢ today is worth $1.00 in a year
$1.00 in a year is worth $1/1.03 today $n in a year is worth $nr today, where r = 1/1.03.
18
Annuities $n in two years is worth $nr2 today
$n in k years is worth $nr k today
19
Annuities I will pay you $100/year for 10 years
If you will pay me $Y now. I can’t lose if you pay me 100r + 100r r3 + … + 100r10 =100r(1+ r + … + r9) = 100r(1-r10)/(1-r) = $853.02
20
In-Class Problem Problems 1 & 2
21
Book Stacking Rosen Rosen Rosen Rosen Rosen Rosen table
22
Book Stacking How far out? ?
23
Book Stacking One book center of mass of book 1 2
24
Book Stacking One book center of mass of book
25
Book Stacking One book center of mass of book
26
n books
27
n books center of mass
28
n books Need center of mass over table
29
n books center of mass of the whole stack overhang
30
n+1 books ∆overhang center of mass of all n+1 books at table edge
of top n books at edge of book n+1 ∆overhang
31
overhang = Horizontal distance from n-book to n+1-book centers-of-mass
32
Choose origin so center of n-stack at x = 0. Now center of n+1st book is at x = 1/2, and x-coordinate for center of n+1-stack is:
33
n+1 books center of mass of all n+1 books at table edge
of top n books at edge of book n+1
34
Bn ::= overhang of n books B1 = 1/2 Bn+1 = Bn + 1/2(n+1)
Book stacking summary Bn ::= overhang of n books B1 = 1/2 Bn+1 = Bn + 1/2(n+1) Bn = 1/2(1 + 1/2 + … + 1/n)
35
nth Harmonic number Bn = Hn/2
36
Integral Method Estimate Hn : 1 x+1 0 1 2 3 4 5 6 7 8 1 1 2 1 3 1 2 1
38
overhang can be any desired size.
Book stacking So Hn as n , and overhang can be any desired size.
39
Book stacking Overhang 3: need Bn 3 Hn 6 Integral bound: ln (n+1) 6 So can do with n e6-1 = 403 books Actually calculate Hn : 227 books are enough.
40
Crossing a Desert How big a desert can the truck cross? Gas depot
41
Dn ::= max distance on n tank
42
1 tank 1 tank truck D1= max distance on 1 tank = 1
43
n+1 tanks x 1-2x truck 1-2x 1-2x 1-x
44
n+1 tanks x 1-2x 1-2x n 1-2x 1-x
45
n+1 tanks x (1-2x)n + (1-x)
46
(1-2x)n + (1-x)
47
(1-2x)n + (1-x) If (1-2x)n + (1-x) = n,
48
(1-2x)n + (1-x) If (1-2x)n + (1-x) = n, then use n tank strategy from position x.
49
(1-2x)n + (1-x) If (1-2x)n + (1-x) = n, then use n tank strategy from position x. Dn+1 = Dn + x
50
(1-2x)n + (1-x) = n 1 2n+1 x = 1 2n+1 Dn+1 = Dn +
51
Can cross any desert!
52
In-Class Problem Problem 3
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.