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
Error detection recovery
Tech_MX
 
PPTX
Statistical Software Quality Assurance.pptx
KarthigaiSelviS3
 
PDF
Symbol table in compiler Design
Kuppusamy P
 
PPTX
Unit1 principle of programming language
Vasavi College of Engg
 
PPTX
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
PPTX
Designing Techniques in Software Engineering
kirupasuchi1996
 
PPT
Scheduling algorithms
Chankey Pathak
 
PPTX
sum of subset problem using Backtracking
Abhishek Singh
 
PPTX
Control Strategies in AI
Bharat Bhushan
 
PPTX
15 puzzle problem using branch and bound
Abhishek Singh
 
PDF
Token, Pattern and Lexeme
A. S. M. Shafi
 
PPT
Fundamentals of the Analysis of Algorithm Efficiency
Saranya Natarajan
 
PPTX
Forms of learning in ai
Robert Antony
 
PPT
Intermediate code generation (Compiler Design)
Tasif Tanzim
 
PPT
Seed filling algorithm
Mani Kanth
 
PDF
Lecture Note-1: Algorithm and Its Properties
Rajesh K Shukla
 
PPTX
Logics for non monotonic reasoning-ai
ShaishavShah8
 
PPT
1.1 The nature of software.ppt
JAYAPRIYAR7
 
PPT
Ll(1) Parser in Compilers
Mahbubur Rahman
 
PPT
Introduction to prolog
Harry Potter
 
Error detection recovery
Tech_MX
 
Statistical Software Quality Assurance.pptx
KarthigaiSelviS3
 
Symbol table in compiler Design
Kuppusamy P
 
Unit1 principle of programming language
Vasavi College of Engg
 
Lexical analysis - Compiler Design
Muhammed Afsal Villan
 
Designing Techniques in Software Engineering
kirupasuchi1996
 
Scheduling algorithms
Chankey Pathak
 
sum of subset problem using Backtracking
Abhishek Singh
 
Control Strategies in AI
Bharat Bhushan
 
15 puzzle problem using branch and bound
Abhishek Singh
 
Token, Pattern and Lexeme
A. S. M. Shafi
 
Fundamentals of the Analysis of Algorithm Efficiency
Saranya Natarajan
 
Forms of learning in ai
Robert Antony
 
Intermediate code generation (Compiler Design)
Tasif Tanzim
 
Seed filling algorithm
Mani Kanth
 
Lecture Note-1: Algorithm and Its Properties
Rajesh K Shukla
 
Logics for non monotonic reasoning-ai
ShaishavShah8
 
1.1 The nature of software.ppt
JAYAPRIYAR7
 
Ll(1) Parser in Compilers
Mahbubur Rahman
 
Introduction to prolog
Harry Potter
 

Similar to Specification and complexity - algorithm (20)

PPTX
algorothm,
Syed Sohan Ahmed
 
PPTX
Algorothm,
Syed Sohan Ahmed
 
PPTX
Measuring algorithm performance
HabitamuAsimare
 
PDF
Time Complexity of Algorithm (Analysis).pdf
Christian833679
 
PPT
Asymptoptic notations
Alisha Jindal
 
PDF
Complexity
A. S. M. Shafi
 
PPTX
complex computer systems and its applications.pptx
narifmsit18seecs
 
PPTX
complexity big oh notation notation.pptx
narifmsit18seecs
 
PPTX
DAA-vfyjvtfjtfvfvfthjccghcdhrtchgdT&S_C.pptx
johnson07x
 
PPTX
Asymptotic Analysis in Data Structure using C
Meghaj Mallick
 
PDF
Algorithms Lecture 2: Analysis of Algorithms I
Mohamed Loey
 
PPT
Data Structure and Algorithms
ManishPrajapati78
 
PDF
Time complexity (linear search vs binary search)
Kumar
 
PPT
lecture 1
sajinsc
 
PPT
Lec7.ppt
Agung Kurniawan
 
PPT
Lec7.ppt
NikhilKatariya8
 
PPT
analysis of algorithms
MyMovies15
 
PPTX
Asymptotic Analysis in Data Structures and Analysis
RachanaMehta11
 
PPT
Basics of data structure types of data structures
kavita20193
 
algorothm,
Syed Sohan Ahmed
 
Algorothm,
Syed Sohan Ahmed
 
Measuring algorithm performance
HabitamuAsimare
 
Time Complexity of Algorithm (Analysis).pdf
Christian833679
 
Asymptoptic notations
Alisha Jindal
 
Complexity
A. S. M. Shafi
 
complex computer systems and its applications.pptx
narifmsit18seecs
 
complexity big oh notation notation.pptx
narifmsit18seecs
 
DAA-vfyjvtfjtfvfvfthjccghcdhrtchgdT&S_C.pptx
johnson07x
 
Asymptotic Analysis in Data Structure using C
Meghaj Mallick
 
Algorithms Lecture 2: Analysis of Algorithms I
Mohamed Loey
 
Data Structure and Algorithms
ManishPrajapati78
 
Time complexity (linear search vs binary search)
Kumar
 
lecture 1
sajinsc
 
Lec7.ppt
Agung Kurniawan
 
Lec7.ppt
NikhilKatariya8
 
analysis of algorithms
MyMovies15
 
Asymptotic Analysis in Data Structures and Analysis
RachanaMehta11
 
Basics of data structure types of data structures
kavita20193
 
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)

PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Executive Business Intelligence Dashboards
vandeslie24
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 

Specification and complexity - algorithm