SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Algorithm Specification
and Complexity
Algorithm Criteria
Every Algorithm must have satisfied following
Criteria:
01/04/16 2
Algorithm Specification
01/04/16 3
Algorithm Specification (Cont.)
01/04/16 4
Algorithm Specification (Cont.)
01/04/16 5
Algorithm Specification (Cont.)
01/04/16 6
Algorithm Time Complexity
Asymptotic Notations
Θ, O, Ω
01/04/16 7
 Θ (Theta) (Average Case)
 Ο (Big-oh) (Worst Case)(Upper Bound)
 Ω (Omega) (Best case)(Lower Bound)
Algorithm Time Complexity
(Cont.)
01/04/16 8
Example: f(n) = 3n2
+ 17
 Ω(1), Ω(n), Ω(n2
)  lower bounds
 O(n2
), O(n3
), ...  upper bounds
 Θ(n2
)  exact bound
Algorithm Time Complexity
(Cont.)
01/04/16 9
Examples (For Practices):
3n+2=O(n) /* 3n+2≤4n for n≥2 */
3n+3=O(n) /* 3n+3≤4n for n≥3 */
100n+6=O(n) /* 100n+6≤101n for n≥10 */
10n2
+4n+2=O(n2
) /* 10n2
+4n+2≤11n2
for n≥5 */
6*2n
+n2
=O(2n
) /* 6*2n
+n2
≤7*2n
for n≥4 */
Algorithm Time Complexity
(Cont.)
01/04/16 10
Relations Between Θ, Ω, O:
Theorem : For any two functions g(n) and f(n),
f(n) = Θ(g(n)) if
f(n) = O(g(n)) and f(n) = Ω(g(n)).
Theorem : For any two functions g(n) and f(n),
f(n) = Θ(g(n)) if
f(n) = O(g(n)) and f(n) = Ω(g(n)).
I.e., Θ(g(n)) = O(g(n)) ∩ Ω(g(n))
In practice, asymptotically tight bounds are obtained from asymptotic upper and
lower bounds.
Algorithm Space Complexity
S(P)=C+SP(I)
01/04/16 11
 Fixed Space Requirements (C)
Independent of the characteristics of the inputs and outputs
 instruction space
 space for simple variables, fixed-size structured variable,
constants
 Variable Space Requirements (SP(I))
depend on the instance characteristic I
 number, size, values of inputs and outputs associated with
I
 recursive stack space, formal parameters, local variables,
return address
Any Questions?????
Thanks To Everybody
01/04/16 12

More Related Content

What's hot (20)

PPTX
Direct linking loader
babyparul
 
PDF
Code generation in Compiler Design
Kuppusamy P
 
PPTX
Parsing in Compiler Design
Akhil Kaushik
 
PPTX
Input-Buffering
Dattatray Gandhmal
 
PPTX
Algorithm and pseudocode conventions
saranyatdr
 
PPTX
Interface specification
maliksiddique1
 
PPTX
Recognition-of-tokens
Dattatray Gandhmal
 
PPTX
Importance & Principles of Modeling from UML Designing
ABHISHEK KUMAR
 
PDF
Target language in compiler design
Muhammad Haroon
 
PDF
Logic microoperations
Nitesh Singh
 
PPTX
Structure of the compiler
Sudhaa Ravi
 
PPTX
Binary search
AparnaKumari31
 
PPTX
Introduction TO Finite Automata
Ratnakar Mikkili
 
PPT
Top down parsing
ASHOK KUMAR REDDY
 
PPT
Algorithm analysis
sumitbardhan
 
PPTX
Algorithm analysis (All in one)
jehan1987
 
PPTX
Code Optimization
Akhil Kaushik
 
PPT
Binary Search
kunj desai
 
PPTX
Compiler design syntax analysis
Richa Sharma
 
Direct linking loader
babyparul
 
Code generation in Compiler Design
Kuppusamy P
 
Parsing in Compiler Design
Akhil Kaushik
 
Input-Buffering
Dattatray Gandhmal
 
Algorithm and pseudocode conventions
saranyatdr
 
Interface specification
maliksiddique1
 
Recognition-of-tokens
Dattatray Gandhmal
 
Importance & Principles of Modeling from UML Designing
ABHISHEK KUMAR
 
Target language in compiler design
Muhammad Haroon
 
Logic microoperations
Nitesh Singh
 
Structure of the compiler
Sudhaa Ravi
 
Binary search
AparnaKumari31
 
Introduction TO Finite Automata
Ratnakar Mikkili
 
Top down parsing
ASHOK KUMAR REDDY
 
Algorithm analysis
sumitbardhan
 
Algorithm analysis (All in one)
jehan1987
 
Code Optimization
Akhil Kaushik
 
Binary Search
kunj desai
 
Compiler design syntax analysis
Richa Sharma
 

Similar to Specification and complexity - algorithm (20)

PPTX
Asymptotic Analysis in Data Structure using C
Meghaj Mallick
 
PPT
Design and analysis of algorithm in Computer Science
secularistpartyofind
 
PDF
1ST_UNIT_DAdefewfrewfgrwefrAdfdgfdsgevedr (2).pdf
ravisikka1
 
PPT
Data_Structure_and_Algorithms_Lecture_1.ppt
ISHANAMRITSRIVASTAVA
 
PDF
Anlysis and design of algorithms part 1
Deepak John
 
PPTX
Algorithm Analysis
Megha V
 
DOCX
Basic Computer Engineering Unit II as per RGPV Syllabus
NANDINI SHARMA
 
PPTX
Algorithm for the DAA agscsnak javausmagagah
RaviPandey598038
 
PDF
Design Analysis and Algorithm Module1.pdf
Shana799280
 
PPT
Introduction to design and analysis of algorithm
DevaKumari Vijay
 
PPTX
Algorithm analysis and design
Megha V
 
PPTX
Algorithm.pptx
Koteswari Kasireddy
 
PPTX
Algorithm.pptx
Koteswari Kasireddy
 
PPT
analysis.ppt
AarushSharma69
 
PPTX
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
Tanya Makkar
 
PDF
Data Structure & Algorithms - Mathematical
babuk110
 
PPT
Asymptotic Notation
Lovely Professional University
 
PPTX
Algorithms & Complexity Calculation
Akhil Kaushik
 
PPTX
Introduction to Algorithm
Manash Kumar Mondal
 
PPTX
Design and analysis of algorithms unit1.pptx
ShivaniSharma335055
 
Asymptotic Analysis in Data Structure using C
Meghaj Mallick
 
Design and analysis of algorithm in Computer Science
secularistpartyofind
 
1ST_UNIT_DAdefewfrewfgrwefrAdfdgfdsgevedr (2).pdf
ravisikka1
 
Data_Structure_and_Algorithms_Lecture_1.ppt
ISHANAMRITSRIVASTAVA
 
Anlysis and design of algorithms part 1
Deepak John
 
Algorithm Analysis
Megha V
 
Basic Computer Engineering Unit II as per RGPV Syllabus
NANDINI SHARMA
 
Algorithm for the DAA agscsnak javausmagagah
RaviPandey598038
 
Design Analysis and Algorithm Module1.pdf
Shana799280
 
Introduction to design and analysis of algorithm
DevaKumari Vijay
 
Algorithm analysis and design
Megha V
 
Algorithm.pptx
Koteswari Kasireddy
 
Algorithm.pptx
Koteswari Kasireddy
 
analysis.ppt
AarushSharma69
 
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
Tanya Makkar
 
Data Structure & Algorithms - Mathematical
babuk110
 
Asymptotic Notation
Lovely Professional University
 
Algorithms & Complexity Calculation
Akhil Kaushik
 
Introduction to Algorithm
Manash Kumar Mondal
 
Design and analysis of algorithms unit1.pptx
ShivaniSharma335055
 
Ad

More from Bipul Roy Bpl (8)

PPT
Sequential circuit-Digital Electronics
Bipul Roy Bpl
 
PPTX
Test design techniques
Bipul Roy Bpl
 
PPTX
Software engineering quality assurance and testing
Bipul Roy Bpl
 
PPT
DFD level-0 to 1
Bipul Roy Bpl
 
PPTX
Garment management system
Bipul Roy Bpl
 
PPT
Regular expressions-Theory of computation
Bipul Roy Bpl
 
PPT
Finite automata
Bipul Roy Bpl
 
PPT
Theory of computing
Bipul Roy Bpl
 
Sequential circuit-Digital Electronics
Bipul Roy Bpl
 
Test design techniques
Bipul Roy Bpl
 
Software engineering quality assurance and testing
Bipul Roy Bpl
 
DFD level-0 to 1
Bipul Roy Bpl
 
Garment management system
Bipul Roy Bpl
 
Regular expressions-Theory of computation
Bipul Roy Bpl
 
Finite automata
Bipul Roy Bpl
 
Theory of computing
Bipul Roy Bpl
 
Ad

Recently uploaded (20)

PPTX
Quality on Autopilot: Scaling Testing in Uyuni
Oscar Barrios Torrero
 
PDF
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
PDF
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
PPTX
NeuroStrata: Harnessing Neuro-Symbolic Paradigms for Improved Testability and...
Ivan Ruchkin
 
PDF
Rewards and Recognition (2).pdf
ethan Talor
 
PPTX
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
 
PPTX
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
PPTX
How Can Recruitment Management Software Improve Hiring Efficiency?
HireME
 
PPTX
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
PDF
Telemedicine App Development_ Key Factors to Consider for Your Healthcare Ven...
Mobilityinfotech
 
PDF
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 
PPT
Information Communication Technology Concepts
LOIDAALMAZAN3
 
PDF
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
 
PDF
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
PPTX
ManageIQ - Sprint 264 Review - Slide Deck
ManageIQ
 
PDF
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
PDF
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
 
PPTX
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
 
PDF
AI Software Development Process, Strategies and Challenges
Net-Craft.com
 
PPTX
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 
Quality on Autopilot: Scaling Testing in Uyuni
Oscar Barrios Torrero
 
IObit Uninstaller Pro 14.3.1.8 Crack for Windows Latest
utfefguu
 
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
NeuroStrata: Harnessing Neuro-Symbolic Paradigms for Improved Testability and...
Ivan Ruchkin
 
Rewards and Recognition (2).pdf
ethan Talor
 
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
 
Android Notifications-A Guide to User-Facing Alerts in Android .pptx
Nabin Dhakal
 
How Can Recruitment Management Software Improve Hiring Efficiency?
HireME
 
Automatic_Iperf_Log_Result_Excel_visual_v2.pptx
Chen-Chih Lee
 
Telemedicine App Development_ Key Factors to Consider for Your Healthcare Ven...
Mobilityinfotech
 
LPS25 - Operationalizing MLOps in GEP - Terradue.pdf
terradue
 
Information Communication Technology Concepts
LOIDAALMAZAN3
 
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
 
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
ManageIQ - Sprint 264 Review - Slide Deck
ManageIQ
 
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
WholeClear Split vCard Software for Split large vCard file
markwillsonmw004
 
ERP - FICO Presentation BY BSL BOKARO STEEL LIMITED.pptx
ravisranjan
 
AI Software Development Process, Strategies and Challenges
Net-Craft.com
 
IObit Uninstaller Pro 14.3.1.8 Crack Free Download 2025
sdfger qwerty
 

Specification and complexity - algorithm