A recurrence relation is an equation that defines each term of a sequence based on one or more previous terms, typically with specified initial values. Recurrence relations are common in both mathematics and computer science, especially in the analysis of recursive algorithms such as mergesort or binary search.
They describe how a problem of size \( n \) is reduced into smaller subproblems, which helps estimate time or space complexity of divide-and-conquer solutions. Many recurrence relations can be solved (= expressed just in terms of the variable $n$.)
For example, a relation like \( T(n) = 2T(n/2) + n \) models a recursive algorithm that splits a problem into two halves and does work of $n$ steps at each level. As you'll learn in the Analysis of Algorithms course, the solution to this recurrence is $T(n) = c \cdot n \log n$. We use the letter $T$, which represents an algorithm's runTime as a generic function name.
Summary so far: Recursion is the process of a function calling itself, while a recurrence relation is the formula for the computations done by the recursive function.