The document discusses recurrence relations and provides examples of how they can be used to model real-world scenarios like loan payments. It explains that a recurrence relation is a function that includes itself, and provides examples of simple and more complex recurrence relations. It also gives an example of how a recurrence relation can model the remaining debt on a loan each month over the life of the loan based on the initial amount, monthly payment, and interest rate.
3. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=f(n-1)+2
4. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=f(n-1)+2
n f(n)
0 1
1 3
2 5
3 7
4 9
5 11
6 13
5. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=f(n-1)+2
n f(n)
0 1 Starting Point
1 3
2 5
3 7
4 9
5 11
6 13
6. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=f(n-1)+2
n f(n)
0 1 Starting Point
1 3 Starting Point + 2
2 5
3 7
4 9
5 11
6 13
7. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=f(n-1)+2
n f(n)
0 1 Starting Point
1 3 Starting Point + 2
2 5 (Starting Point + 2) + 2
3 7
4 9
5 11
6 13
8. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=f(n-1)+2
n f(n)
0 1 f(0)
1 3 f(1-1)+ 2
2 5 f(2-1) + 2
3 7
4 9
5 11
6 13
9. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=7f(n-1)-12f(n-2)
n f(n)
0 2
1 7
2 25
3 91
4 337
5 1267
6 4825
10. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=7f(n-1)-12f(n-2)
n f(n)
0 2 Starting Point 1
1 7 Starting Point 2
2 25
3 91
4 337
5 1267
6 4825
11. What are Recurrence Relations?
• Functions that Include Themselves
f(n)=7f(n-1)-12f(n-2)
n f(n)
0 2 Starting Point 1
1 7 Starting Point 2
2 25 7(7)-12(2)
3 91
4 337
5 1267
6 4825
12. Closed Forms
Closed Forms of Recursive Equations produce
the same values, but do not reference themselves.
93. EXAMPLE
•A car costs $10,000
• The buyer can pay a $1000 down payment
94. EXAMPLE
•A car costs $10,000
• The buyer can pay a $1000 down payment
• The buyer can then pay $350 per month
95. EXAMPLE
•A car costs $10,000
• The buyer can pay a $1000 down payment
• The buyer can then pay $350 per month
• The yearly interest rate on the loan is 5%
96. EXAMPLE
•A car costs $10,000
• The buyer can pay a $1000 down payment
• The buyer can then pay $350 per month
• The yearly interest rate on the loan is 5%
• The seller wants the loan paid off in 24 months
97. Remaining debt per month
n = The number of months since the start of the loan
m = The monthly payment
i = The yearly interest rate (decimal)
b(n,m,i) = { 9000
(1+(i/12))*b(n-1,m,i)-m
if n = 0
if n > 0
98. Remaining debt per month
n = The number of months since the start of the loan
b(n) = { 9000 if n = 0
(1+(.05/12))*b(n-1)-350 if n > 0
101. Remaining debt per month
It takes 28 months to pay off the loan
The seller wants it payed off in 24 months
The total cost, down payment, and interest rate can’t be changed
The monthly payment must be increased
103. How much greater?
Need to Solve the Equation for m (Monthly Payment)
b(n,m,i) = { 9000
(1+(i/12))*b(n-1,m,i)-m
if n = 0
if n > 0
104. Remaining debt per month
n = The number of months since the start of the loan
b(n) = { 9000 if n = 0
(1+(.05/12)) *b(n-1)-350 if n > 0
105. Remaining debt per month
n = The number of months since the start of the loan
b(n) = { 9000 if n = 0
(1+(.05/12))*b(n-1)-350 if n > 0
a c
Formula
c-(1-a n)
b(n) = x*a n-1 -
a-1
106. Remaining debt per month
n = The number of months since the start of the loan
350-(1-(1+(.05/12))n)
b(n) = x * (1+(.05/12))n-1 -
.05/12
107. Remaining debt per month
n = The number of months since the start of the loan
350-(1-(1+(.05/12))0)
9000 = x * (1+(.05/12))0-1 -
.05/12
108. Remaining debt per month
n = The number of months since the start of the loan
350-(1-1)
9000 = x * 1/(1+(.05/12)) -
.05/12
109. Remaining debt per month
n = The number of months since the start of the loan
9000 = x * 0.99585 - 84000
+84000 +84000
110. Remaining debt per month
n = The number of months since the start of the loan
93000 = x * 0.99585
0.99585 0.99585
111. Remaining debt per month
n = The number of months since the start of the loan
93387 = x
112. Remaining debt per month
n = The number of months since the start of the loan
350-(1-(1+(.05/12))n)
bn = 93387 * (1+(.05/12))n-1 -
.05/12
113. Remaining debt per month
n = The number of months since the start of the loan
m-(1-(1+(.05/12))24)
0 = 93387 * (1+(.05/12))24-1 -
.05/12
114. Remaining debt per month
n = The number of months since the start of the loan
m+0.104941
0 = 93387 * 1.100357 -
.05/12
115. Remaining debt per month
n = The number of months since the start of the loan
0 = 102374.419 - (1/(.05/12))(m+0.104941)
116. Remaining debt per month
n = The number of months since the start of the loan
102374.419 = (1/(.05/12))(m+0.104941)
/(1/(.05/12)) /(1/(.05/12))
117. Remaining debt per month
n = The number of months since the start of the loan
406.56 = (m+0.104941)
-0.104941 -0.104941
118. Remaining debt per month
n = The number of months since the start of the loan
404.46 = m
120. Loan Conclusion
The buyer will have to pay somewhere around $406.46 per
month in order to pay of his loan in time.
121. Recurrence Relations Conclusion
Any function that references itself.
A common example is the fibonacci sequence.
Can be solved for a non self-referential ‘closed form’
Can be used to calculate loan payment schedules