Professional Documents
Culture Documents
Specification and Complexity Algorithm
Specification and Complexity Algorithm
and Complexity
Algorithm Criteria
Every Algorithm must have satisfied following
Criteria:
03/09/23 2
Algorithm Specification
03/09/23 3
Algorithm Specification (Cont.)
03/09/23 4
Algorithm Specification (Cont.)
03/09/23 5
Algorithm Specification (Cont.)
03/09/23 6
Algorithm Time Complexity
Asymptotic Notations
, O,
03/09/23 7
Algorithm Time Complexity
(Cont.)
Example: f(n) = 3n2 + 17
03/09/23 8
Algorithm Time Complexity
(Cont.)
Examples (For Practices):
In practice, asymptotically tight bounds are obtained from asymptotic upper and
lower bounds.
03/09/23 10
Algorithm Space Complexity
S(P)=C+SP(I)
Fixed Space Requirements (C)
Independent of the characteristics of the inputs and outputs
instruction space