You are on page 1of 6

DAA

Design Algo:
Devide and Conquer
Greedy Technique
Dynamic Programming
Algo Definition
• It is a combination of sequence of finite steps to
solve a particular problem.
• Ex: Add2No(){
take 2 no
c=add(a,b)
printf(c)}
Properties of Algo: produce the o/p after finite time,
produce atleast o/p, take 0 or more i/p,
independent of programming language, every step
in the algo should be deterministic, in the algo b/w
every 2 statements there should be some relation.
Algo Analysis(Time:CPU time &
Space:Main Memory Space)
• If any problem is having more than one
algorithm best algorithm is decided by analysis
based on 2 parameter:Time & Space
Asymptotic Notation(Big-
 
oh(O),Omega(),Theta(
•• Let
  f(n) and g(n) be 2 positive functions
1) f(n)=O(g(n)) or f(n) is order of g(n)
iff
f(n)
Such that

2) f(n)= (g(n)) or f(n) is omega of g(n)


iff
f(n)
Such that
•3)  f(n)= (g(n)) iff
f(n)
f(n) are positive constants c1 && 1

You might also like