Back to Course


0% Complete
0/82 Steps
  1. Getting Started with Algorithm
    What is an Algorithm?
  2. Characteristics of Algorithm
    1 Topic
  3. Analysis Framework
  4. Performance Analysis
    3 Topics
  5. Mathematical Analysis
    2 Topics
  6. Sorting Algorithm
    Sorting Algorithm
    10 Topics
  7. Searching Algorithm
    6 Topics
  8. Fundamental of Data Structures
  9. Queues
  10. Graphs
  11. Trees
  12. Sets
  13. Dictionaries
  14. Divide and Conquer
    General Method
  15. Binary Search
  16. Recurrence Equation for Divide and Conquer
  17. Finding the Maximum and Minimum
  18. Merge Sort
  19. Quick Sort
  20. Stassen’s Matrix Multiplication
  21. Advantages and Disadvantages of Divide and Conquer
  22. Decrease and Conquer
    Insertion Sort
  23. Topological Sort
  24. Greedy Method
    General Method
  25. Coin Change Problem
  26. Knapsack Problem
  27. Job Sequencing with Deadlines
  28. Minimum Cost Spanning Trees
    2 Topics
  29. Single Source Shortest Paths
    1 Topic
  30. Optimal Tree Problem
    1 Topic
  31. Transform and Conquer Approach
    1 Topic
  32. Dynamic Programming
    General Method with Examples
  33. Multistage Graphs
  34. Transitive Closure
    1 Topic
  35. All Pairs Shortest Paths
    6 Topics
  36. Backtracking
    General Method
  37. N-Queens Problem
  38. Sum of Subsets problem
  39. Graph Coloring
  40. Hamiltonian Cycles
  41. Branch and Bound
    2 Topics
  42. 0/1 Knapsack problem
    2 Topics
  43. NP-Complete and NP-Hard Problems
    1 Topic
Lesson 3 of 43
In Progress

Analysis Framework

Once the algorithm is built, the next step is to analyze how efficient the algorithm is ?

In order to analyze the algorithm, we actually consider two parameters.


We measure efficiency of an algorithm in terms of how fast it runs (executes) and we refer to it as time efficiency.

And we also measure efficiency of an algorithm in terms of how much extra (more) space the algorithm requires to run(executes).

Time efficiency can be analyzed on following 2 factors:

1)Based on number of inputs the algorithm accepts.

It is known fact that as number of inputs given to the algorithm increases , the consumed to execute the same would also increase .

For Example, it always takes a longer time to solve a tower of Hanoi problem with 5 discs when compared it with 3 discs

2)Measuring Unit of Time.

An Algorithm running time can be measured in several units of time

For Example, we may use a few standard units such as milliseconds, microseconds etc.

But we have drawbacks with these units such as speed of computer , the programming language used to implement the algorithm etc.,makes it difficult to measure algorithms efficiency . we would like to have a parameter (unit) which does not depend on above factors.


Hence , the time efficiency is analyses by determining the number of times the basic operation is repeated as a function of input size (number of inputs accepted)

KodNest algo3

i.e.  T(n) ≈ Cop C(n)


T-> running time   Cop->Execution time of basic operation

C->number of times basic operation is executed    n->size of input.

New Report