24.6k views
2 votes
Solve recurrence relation using substitution method.

T(1) = 1

T(n) = T(n-1) + n + 18

1 Answer

2 votes

Final answer:

To solve the given recurrence relation using the substitution method, plug in values and observe patterns to find a general formula. The general formula for T(n) is 20n for all n >= 1.

Step-by-step explanation:

To solve the given recurrence relation using the substitution method, we can plug in values and observe patterns to find a general formula.

Step 1: Substitute n = 1 into the equation to find T₁: T(1) = T(1-1) + 1 + 18 = T(0) + 1 + 18 = 1 + 1 + 18 = 20.

Step 2: Use the general form T₂ = T(2-1) + 2 + 18 = T₁ + 2 + 18 = 20 + 2 + 18 = 40. By observing the pattern, we can deduce that T(n) = 20n for all n >= 1.

User Ivano
by
7.8k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories