3. ALGORITHMIC COMPLEXITY
• The term algorithm complexity measures how many steps are required by the
algorithm to solve the given problem.
• It evaluates the order of count of operations executed by an algorithm as a
function of input data size.
• To assess the complexity, the order (approximation) of the count of operation
is always considered instead of counting the exact steps.
4. CONT…..
• O(f) notation represents the complexity of an algorithm, which is also termed
as an Asymptotic notation or "Big O" notation. Here the f corresponds to the
function whose size is the same as that of the input data.
• The complexity of the asymptotic computation O(f) determines in which
order the resources such as CPU time, memory, etc. are consumed by the
algorithm that is articulated as a function of the size of the input data.
5. CONT…..
• The complexity can be found in any form such as constant, logarithmic, linear,
n*log(n), quadratic, cubic, exponential, etc.
• It is nothing but the order of constant, logarithmic, linear and so on, the
number of steps encountered for the completion of a particular algorithm.
• To make it even more precise, we often call the complexity of an algorithm as
"running time".
6. SMALL-O AND BIG-O NOTATION
• They are both asymptotic notations that specify upper-bounds for functions and
running times of algorithms.
• However, the difference is that big-O may be asymptotically tight while little-o
makes sure that the upper bound isn’t asymptotically tight.
• Big-O and little-o notations have very similar definitions, and their difference lies in
how strict they are regarding the upper bound they represent.
7.
8. DIAGRAM EXPLAINED
• little o() means loose upper-bound of f(n).
• Little o is a rough estimate of the maximum order of growth whereas Big-Ο may be the actual order of
growth.
9. LITTLE O NOTATIONS
• There are some other notations present except the Big-Oh, Big-Omega and Big-Theta notations. The
little o notation is one of them.
• Little o notation is used to describe an upper bound that cannot be tight. In other words, loose upper
bound of f(n).
• Let f(n) and g(n) are the functions that map positive real numbers. We can say that the function f(n) is
o(g(n)) if for any real positive constant c, there exists an integer constant n0 ≤ 1 such that f(n) > 0.
10. BIG O NOTATION
• Big-Oh (O) notation gives an upper bound for a function f(n) to within a constant factor.
• We write f(n) = O(g(n)), If there are positive constants n0 and c such that, to the right of n0 the f(n)
always lies on or below c*g(n).
• O(g(n)) = { f(n) : There exist positive constant c and n0 such that 0 ≤ f(n) ≤ c g(n), for all n ≤ n0}
11. RECURRENCE RELATIONS
• A recurrence is an equation or inequality that describes a function in terms of its values on smaller
inputs. To solve a Recurrence Relation means to obtain a function defined on the natural numbers that
satisfy the recurrence.
• There are four methods for solving Recurrence:
• Substitution Method
• Iteration Method
• Recursion Tree Method
• Master Method
12. THANK YOU
• https://www.javatpoint.com/daa-recurrence-relation