recurrence_growth function
The order of growth of a divide-and-conquer recurrence, as big_theta of a simple function.
How to write it
recurrence_growth(equations, unknown, variable)
The class big_theta(g) for large n, by the master or Akra-Bazzi theorem with its conditions, else as written.
- equations
- The recurrence, such as t(n) = 2 t(n/2) + n. A list that includes starting values like t(1) = 1 is read too. Takes an equation, or a list of equations in brackets.
- unknown
- The unknown to solve for, such as y. Takes a variable, or a list of variables.
- variable
- The variable to work with, a name such as x. Takes a variable, or a list of variables.
Examples
recurrence_growth(t(n) = 2 t(n/2) + n, t, n)In the solver,
Open in the solverrecurrence_growth(t(n) = 2 t(n/2) + n, t, n)givesbig_theta(n*ln(n)).recurrence_growth(t(n) = t(n/3) + t(2n/3) + n, t, n)In the solver,
Open in the solverrecurrence_growth(t(n) = t(n/3) + t(2n/3) + n, t, n)givesbig_theta(n*ln(n)).recurrence_growth(t(n) = t(sqrt(n)) + 1, t, n)In the solver,
Open in the solverrecurrence_growth(t(n) = t(sqrt(n)) + 1, t, n)givesbig_theta(ln(ln(n))).
Functions its examples use
- sqrt
Square root; sqrt(x) is the power x^(1/2).
Related functions
- solve_recurrence
Solve a recurrence relation for a sequence.
- solve_ode
Solve a differential equation, or a system, with optional initial conditions.