recursion describing the present state in terms of the previous state(s) modeling and solving...
TRANSCRIPT
Recursion
• Describing the present state in terms of the previous state(s)
• Modeling and solving problems involving sequential change
• Deepening understanding through another powerful representation
Example: Recursive View of Functions …
Recursive View of Functions
• Linear
• Exponential
• Polynomial
Recursive View of Functions 1
Describe patterns shown in the table.
A B
0 5
1 7
2 9
3 11
Look down the column of B’s
NEXT = NOW + 2
Bn+1 = Bn + 2
A B
0 5
1 7
2 9
3 11
Look across from A to BB = 5 + 2A
A B
0 5
1 7
2 9
3 11
Recursive View ofLinear Functions
• Explicit form: B = 5 + 2A• Recursive form:
NEXT = NOW + 2, start at 5 Bn+1 = Bn + 2, B0 = 5
• Slope seen concretely in recursive form• Rate of Change seen concretely• Note also: arithmetic sequence
Recursive View of Functions 2
Describe patterns shown in the table.
A B
0 5
1 10
2 20
3 40
Look down the column of B’s
NEXT = NOW * 2
Bn+1 = Bn * 2
A B
0 5
1 10
2 20
3 40
Look across from A to B
B = 5 * 2A
A B
0 5
1 10
2 20
3 40
Recursive View ofExponential Functions
• Explicit form: B = 5 * 2A
• Recursive form: NEXT = NOW * 2, start at 5 Bn+1 = Bn * 2, B0 = 5
• Potent comparison to linear – add constant vs. multiply by constant at each step
• Note also: geometric sequence
Common ApplicationsLinear and Exponential
Recursive point of view gives powerful information and insights
Distance-Rate-Time Compound Interest
Represent each situation with a table, graph, and equations (recursive and explicit)
Distance traveled from DT Chicago:1 hr to get out of town (30 mi), then cruise at 70 mph
Money saved: $1000 initial deposit, 6% interest compounded annually
Tables and Equations
Distance traveled from DT Chicago:1 hr to get out of town (30 mi), then cruise at 70 mph.
NEXT = NOW + 70start at 30
d = 30 + 70(t – 1)
Money saved: $1000 initial deposit, 6% interest compounded annually.
NEXT = NOW(1.06)start at 1000
Time (t) Dist (d)
1 30
2 100
3 170
4 240
A=1000×1.06t
Time (t) Amt (A)
0 1000
1 1060
2 1123.60
3 1191.02
Distance traveled from DT Chicago:1 hr to get out of town (30 mi), then cruise at 70 mph.
Recursive Form Gives Potent
NEXT = NOW + 70
• add constant at each step
• constant difference between steps, 70 mph constant, that’s what it means to have:
constant rate of change
linear function
arithmetic sequence
repeated addition: multiplication
d = 30 + 70(t – 1)
Money saved: $1000 initial deposit, 6% interest compounded annually.
Information and Insights
NEXT = NOW(1.06)
• multiply by constant each step
• not constant difference (but constant ratio, and I wonder about quadratics), which means:
not constant rate of chg
exponential function
geometric sequence
repeated mult: exponentiationA=1000×1.06t
Dn+1 =Dn + 70 an+1 =1.06an
Distance traveled from DT Chicago:1 hr to get out of town (30 mi), then cruise at 70 mph.
NEXT = NOW + 70
d = 30 + 70(t – 1)
Graph: line (constant rate,slope)
y-int: meaningful?For this situation, the graph starts at (1, 30)
Money saved: $1000 initial deposit, 6% interest compounded annually.
NEXT = NOW(1.06)
Graph: definitely not a line, even though it looks linear, doesn’t go up same amount for each unit over (mult, not add, a constant).
y-int: initial dep, (0, 1000)
A=1000×1.06t
Common ApplicationsLinear and ExponentialRecursive point of view gives powerful
information and insights
Distance-Rate-Time Compound Interest
Distance traveled from DT Chicago:1 hr to get out of town (30 mi), then cruise at 70 mph.
Money saved: $1000 initial deposit, 6% interest compounded annually.
Recursive View of Functions 3
Describe patterns shown in the table….
Time n Inst speed
at time nAvg spd during
each secDist fallen
during each sec
Total dist fallen after
n secs
0 sec 0 ft/sec 0 ft/sec 0 ft 0 ft
1 32 16 16 16
2 64 48 48 64
3
4
n
Skydiver falls at 32 ft/sec/sec. Ignore all other factors.
Time n
Inst speed at
time n
Avg spd during each
sec
Dist fallen during
each sec
Total dist fallen after n secs
0 sec 0 ft/sec 0 ft/sec 0 ft 0 ft
1 32 16 16 16
2 64 48 48 64
3 96 80 80 144
4 128 112 112 256
n Add 32 each sec:
32n
Start with 16, add 32 each sec:
16+32(n-1)=32n-16
32n-16 T(n)=T(n-1)+D(n)
T(n)=T(n-1)+32n-16
T(n)=(4n)2
T(n)=16n2
Quadratic Function: T(n) = an2 + bn + c
T(n) 1st difference 2nd difference
0 16 32
16 48 32
64 80 32
144 112
256
c a + b 2a
a +b + c 3a + b 2a
4a + 2b + c 5a + b 2a
9a + 2b + c 7a + b
16a + 2b+ c
Recursive View of Functions
• Linear
• Exponential
• Polynomial