ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalGE-167Recurrence Relations
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    GE-167

    Discrete Structures

    Progress0 / 67 done
    Topics67
    1Propositional and Predicate Logic
    2Logical Operators3Translations Between Symbolic Expressions and Formal English Expression4Logical Equivalences
    5Quantifiers6Nested Quantification7Equivalences in Predicate Logic8Translations Between Symbolic Forms and Formal English
    9Proof Methods and Strategies10Direct Proof11Proof by Contraposition12Proof by Induction13Proof by Implication14Existence Proof15Uniqueness Proofs16Trivial Proofs17Vacuous Proofs
    18Notations and Set Operations19Venn Diagrams20Countable and Uncountable Sets
    21Equivalence Relations and Partitions22Partial Orderings23Recurrence Relations51Reflexive, Symmetric, Transitive, and Antisymmetric52Equivalence Relations and Equivalence Classes53Partial Orders
    24Injective, Surjective, Bijective25Special Types of Functions26Function Composition27Inverse Functions28Recursive Functions29Compositions
    30Sequences and Series
    31Inclusion and Exclusion Principle32Pigeonhole Principle33Permutations and Combinations46Product Rule and Sum Rule47Principle of Inclusion-Exclusion48Binomial Coefficients49Pascal's Identity and Pascal’s Triangle50Binomial Theorem
    34Division Theorem35Modular Arithmetic36LCM and GCD37Euclidean and Extended Euclidean Method38Finding Solutions to Congruence
    39Fundamental Theorem of Arithmetic40Characterizations of Primes41Mersenne Primes
    42Weak Induction43Strong Induction
    44Formulation of Recurrences45Closed Formulas
    54Terminologies55Elements of Graph Theory56Planar Graphs57Graph Coloring58Euler Graph59Hamiltonian Path60Rooted Trees61Graph Traversals62Handshaking Lemma and Corollary63Special Families of Graphs64Graph Isomorphism65Planarity in Graphs66Eulerian and Hamiltonian Graphs67Trees in Graph Theory
    14 min read
    Topic 23 of 67
    Topic Study Note Illustration
    23

    Recurrence Relations

    A recurrence relation is an equation or inequality that describes a function in terms of its values at smaller inputs. Recurrence relations are commonly used in the...

    Recurrence Relations

    A recurrence relation is an equation or inequality that describes a function in terms of its values at smaller inputs. Recurrence relations are commonly used in the fields of mathematics and computer science to define sequences and solve problems in areas like algorithm analysis, dynamic programming, and discrete mathematics.

    Basic Concept

    A recurrence relation defines the value of a function f(n)f(n)f(n) in terms of its previous values, typically in the form:

    f(n)=expression involving f(n−1),f(n−2),…f(n) = \text{expression involving } f(n-1), f(n-2), \dotsf(n)=expression involving f(n−1),f(n−2),…

    The function’s initial conditions are usually given for some starting values, typically f(0)f(0)f(0), f(1)f(1)f(1), etc., and then the recurrence relation allows us to compute all subsequent values.

    For example, a simple recurrence relation is:

    f(n)=f(n−1)+1with the initial conditionf(0)=0f(n) = f(n-1) + 1 \quad \text{with the initial condition} \quad f(0) = 0f(n)=f(n−1)+1with the initial conditionf(0)=0

    This recurrence defines the sequence f(0),f(1),f(2),…f(0), f(1), f(2), \dotsf(0),f(1),f(2),…, and by using the recurrence, we can generate the values:

    f(0)=0,f(1)=f(0)+1=1,f(2)=f(1)+1=2,…f(0) = 0, \quad f(1) = f(0) + 1 = 1, \quad f(2) = f(1) + 1 = 2, \quad \dotsf(0)=0,f(1)=f(0)+1=1,f(2)=f(1)+1=2,…

    Thus, f(n)=nf(n) = nf(n)=n for all n≥0n \geq 0n≥0.


    Types of Recurrence Relations

    1. Linear Recurrence Relations:

      • A recurrence relation is called linear if the function f(n)f(n)f(n) can be expressed as a linear combination of its previous terms.

      • For example, a linear recurrence relation is:

        f(n)=a1f(n−1)+a2f(n−2)+⋯+akf(n−k)f(n) = a_1 f(n-1) + a_2 f(n-2) + \dots + a_k f(n-k)f(n)=a1​f(n−1)+a2​f(n−2)+⋯+ak​f(n−k)

        where a1,a2,…,aka_1, a_2, \dots, a_ka1​,a2​,…,ak​ are constants.

      • Example:

        The Fibonacci sequence is a well-known example of a linear recurrence relation:

        f(n)=f(n−1)+f(n−2)with initial conditionsf(0)=0,f(1)=1f(n) = f(n-1) + f(n-2) \quad \text{with initial conditions} \quad f(0) = 0, f(1) = 1f(n)=f(n−1)+f(n−2)with initial conditionsf(0)=0,f(1)=1

        This gives the sequence 0,1,1,2,3,5,8,…0, 1, 1, 2, 3, 5, 8, \dots0,1,1,2,3,5,8,….

    2. Nonlinear Recurrence Relations:

      • A nonlinear recurrence relation involves terms that are not just linear combinations of previous terms.

      • Example:

        f(n)=f(n−1)2+f(n−2)f(n) = f(n-1)^2 + f(n-2)f(n)=f(n−1)2+f(n−2)
    3. Homogeneous and Non-homogeneous Recurrence Relations:

      • A homogeneous recurrence relation is one where the recurrence is equal to zero when all terms are replaced by zero. It has the form:

        f(n)=a1f(n−1)+a2f(n−2)+⋯+akf(n−k)f(n) = a_1 f(n-1) + a_2 f(n-2) + \dots + a_k f(n-k)f(n)=a1​f(n−1)+a2​f(n−2)+⋯+ak​f(n−k)
      • A non-homogeneous recurrence relation has an additional term that is not dependent on previous terms:

        f(n)=a1f(n−1)+a2f(n−2)+⋯+akf(n−k)+g(n)f(n) = a_1 f(n-1) + a_2 f(n-2) + \dots + a_k f(n-k) + g(n)f(n)=a1​f(n−1)+a2​f(n−2)+⋯+ak​f(n−k)+g(n)

        where g(n)g(n)g(n) is some non-homogeneous function.


    Solving Recurrence Relations

    There are several methods for solving recurrence relations, depending on their form. Here are some common techniques:

    1. Iteration Method (Unfolding Method)

    The iteration method involves expanding the recurrence to express f(n)f(n)f(n) in terms of earlier terms until a pattern emerges. This is often useful for simple recurrences.

    • Example: Consider the recurrence:

      f(n)=f(n−1)+1withf(0)=0f(n) = f(n-1) + 1 \quad \text{with} \quad f(0) = 0f(n)=f(n−1)+1withf(0)=0

      Let's expand this recurrence:

      f(n)=f(n−1)+1f(n) = f(n-1) + 1f(n)=f(n−1)+1 f(n−1)=f(n−2)+1f(n-1) = f(n-2) + 1f(n−1)=f(n−2)+1 f(n−2)=f(n−3)+1f(n-2) = f(n-3) + 1f(n−2)=f(n−3)+1 …\dots… f(1)=f(0)+1=0+1=1f(1) = f(0) + 1 = 0 + 1 = 1f(1)=f(0)+1=0+1=1

      By repeating the steps, we can see that:

      f(n)=f(0)+n=0+n=nf(n) = f(0) + n = 0 + n = nf(n)=f(0)+n=0+n=n

      So the solution is f(n)=nf(n) = nf(n)=n.

    2. Substitution Method

    The substitution method involves guessing the form of the solution and then proving it by induction.

    • Example: Solve the recurrence:

      f(n)=2f(n−1)+1withf(0)=1f(n) = 2f(n-1) + 1 \quad \text{with} \quad f(0) = 1f(n)=2f(n−1)+1withf(0)=1

      Let's guess that f(n)=2n+1f(n) = 2^n + 1f(n)=2n+1 is the solution.

      • Base case: For n=0n = 0n=0:

        f(0)=20+1=1f(0) = 2^0 + 1 = 1f(0)=20+1=1

        which matches the initial condition.

      • Inductive step: Assume f(k)=2k+1f(k) = 2^k + 1f(k)=2k+1 holds for some k≥0k \geq 0k≥0. Now prove for k+1k+1k+1:

        f(k+1)=2f(k)+1=2(2k+1)+1=2k+1+2+1=2k+1+1f(k+1) = 2f(k) + 1 = 2(2^k + 1) + 1 = 2^{k+1} + 2 + 1 = 2^{k+1} + 1f(k+1)=2f(k)+1=2(2k+1)+1=2k+1+2+1=2k+1+1

        This matches our guess, so by induction, f(n)=2n+1f(n) = 2^n + 1f(n)=2n+1 is the solution.

    3. Characteristic Equation (For Linear Recurrences)

    For linear recurrence relations with constant coefficients, the characteristic equation can often be used to find the solution.

    • Example: Solve the recurrence:

      f(n)=3f(n−1)−2f(n−2)with initial conditionsf(0)=2,f(1)=5f(n) = 3f(n-1) - 2f(n-2) \quad \text{with initial conditions} \quad f(0) = 2, f(1) = 5f(n)=3f(n−1)−2f(n−2)with initial conditionsf(0)=2,f(1)=5

      The characteristic equation for this recurrence is:

      r2−3r+2=0r^2 - 3r + 2 = 0r2−3r+2=0

      Factoring the equation:

      (r−1)(r−2)=0(r - 1)(r - 2) = 0(r−1)(r−2)=0

      So the roots are r=1r = 1r=1 and r=2r = 2r=2. Thus, the general solution is:

      f(n)=A⋅1n+B⋅2nf(n) = A \cdot 1^n + B \cdot 2^nf(n)=A⋅1n+B⋅2n f(n)=A+B⋅2nf(n) = A + B \cdot 2^nf(n)=A+B⋅2n

      Using the initial conditions to find AAA and BBB:

      f(0)=A+B=2f(0) = A + B = 2f(0)=A+B=2 f(1)=A+2B=5f(1) = A + 2B = 5f(1)=A+2B=5

      Solving this system of equations:

      A+B=2A + B = 2A+B=2 A+2B=5A + 2B = 5A+2B=5

      Subtract the first equation from the second:

      B=3B = 3B=3

      Substituting B=3B = 3B=3 into A+B=2A + B = 2A+B=2:

      A+3=2⇒A=−1A + 3 = 2 \quad \Rightarrow \quad A = -1A+3=2⇒A=−1

      Therefore, the solution is:

      f(n)=−1+3⋅2nf(n) = -1 + 3 \cdot 2^nf(n)=−1+3⋅2n

    Applications of Recurrence Relations

    1. Algorithm Analysis: Recurrences are used to describe the running time of recursive algorithms (e.g., the merge sort recurrence T(n)=2T(n/2)+O(n)T(n) = 2T(n/2) + O(n)T(n)=2T(n/2)+O(n)).

    2. Counting Problems: Recurrence relations are frequently used in combinatorics and discrete mathematics to count the number of objects satisfying certain conditions.

    3. Dynamic Programming: In dynamic programming, recurrence relations help solve problems by breaking them down into subproblems and reusing previously computed solutions.

    4. Biological and Physical Models: Recurrence relations are used in biology (e.g., population models) and physics (e.g., particle movement in systems with discrete time steps).


    Conclusion

    Recurrence relations are essential tools for modeling a wide variety of problems, especially those involving sequences or recursive structures. The methods for solving recurrence relations, such as iteration, substitution, and characteristic equations, provide powerful techniques for analyzing and solving these problems efficiently. Understanding recurrence relations is crucial in fields such as computer science, algorithm design, and combinatorics.

    ← Previous topic 22
    Partial Orderings
    Next topic 24 →
    Functions: Injective, Surjective, Bijective

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    14mremaining
    2.4kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Discrete Structures