×
Stop thinking about WHAT WILL HAPPEN and start thinking about WHAT YOU CAN DO.

# Note for Design And Analysis Of Algorithm - DAA by selvakanmani.cse s

• Design And Analysis Of Algorithm - DAA
• Note
• Anna University -
• 54 Views
Selvakanmani.cse S
0 User(s)

#### Text from page-2

7. What is time complexity? The time complexity of an algorithm is the amount of time it needs to run to completion. 8. Give the two major phases of performance evaluation Performance evaluation can be loosely divided into two major phases: a prior estimates (performance analysis) a posterior testing (performance measurement) 9. Define input size. The input size of any instance of a problem is defined to be the number of elements needed to describe that instance. 10. Define best-case step count. The best-case step count is the minimum number of steps that can be executed for the given parameters. 11. Define worst-case step count. The worst-case step count is the maximum number of steps that can be executed for the given parameters. 12. Define average step count. The average step count is the average number of steps executed an instances with the given parameters. 13. Define the asymptotic notation “Big oh” (0) A function t(n) is said to be in O(g(n)) (t(n) Є O(g(n))), if t(n) is bounded above by constant multiple of g(n) for all values of n, and if there exist a positive constant c and non negative integer n0 such that t(n) ≤ c*g(n) for all n ≥ n0.

#### Text from page-3

14. Define the asymptotic notation “Omega” ( Ω ). A function t(n) is said to be in Ω(g(n)) (t(n) Є Ω(g(n))), if t(n) is bounded below by constant multiple of g(n) for all values of n, and if there exist a positive constant c and non negative integer n0 such that t(n) ≥ c*g(n) for all n ≥ n0. 15. Define the asymptotic notation “theta” (Θ) A function t(n) is said to be in Θ(g(n)) (t(n) Є Θ(g(n))), if t(n) is bounded both above and below by constant multiple of g(n) for all values of n, and if there exist a positive constant c1 and c2 and non negative integer n0 such that C2*g(n) ≤ t(n) ≤ c1*g(n)for all n ≥ n0. 16. What is a Computer Algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in a finite amount of time. 17. What are the features of an algorithm?

#### Text from page-4

More precisely, an algorithm is a method or process to solve a problem satisfying the following properties: o Finiteness - Terminates after a finite number of steps o Definiteness - Each step must be rigorously and unambiguously specified. o Input - Valid inputs must be clearly specified. o Output - Can be proved to produce the correct output given a valid input. o Effectiveness - Steps must be sufficiently simple and basic. 18. Show the notion of an algorithm. An algorithm is a sequence of unambiguous instructions for solving a problem in a finite amount of time. 19. What are different problem types? o Sorting o Searching o String Processing o Graph problems o Combinatorial Problems o Geometric problems o Numerical problems 20. What are different algorithm design techniques/strategies? o Brute force

#### Text from page-5

o Divide and conquer o Decrease and conquer o Transform and conquer o Space and time tradeoffs o Greedy approach o Dynamic programming o Backtracking o Branch and bound 21. How the running time of an algorithm is measured? Unit for measuring the running time is the algorithms basic operation. The running time is measured by the count of no. of times the basic operations is executed. o Basic operation: the operation that contributes the most to the total running time. o Example: the basic operation is usually the most timeconsuming operation in the algorithm‟s innermost loop. 22. How time efficiency is analyzed? Let ▪ cop – execution time of algorithms basic operation on a particular computer. ▪ T(n) – running time. Running time is calculated using the formula o T(n) ≈ cop c(n) ▪ c(n) – no. of times this operation need to be executed. 23. What are orders of growth? Orders of Growth 24. What are basic efficiency classes? Basic Efficiency classes 1 log n constant logarithmic