SlideShare a Scribd company logo
1 of 41
1
Dr. Omprakash Chandrakar
Associate Professor (Computer Science)
3
1. ALGORITHM
2. FLOWCHART
3. PSEUDOCODE
4. PROGRAM
F i r s t t h i n g f i r s t
4
C h a r a c t e r i s t i c s o f A l g o r i t h m
INPUT, OUTPUT, DEFINITE, FINITE, CORRECT
5
A l g o r i t h m A n d D a t a S t r u c t u r e s
DEPENDS ON
INPUT DATA,
ACCURACY,
ENVIRONMENT,
PROBLEM DOMAIN
6
7
T h e R o l e o f A l g o r i t h m i n C o m p u t i n g
An algorithm is thus a sequence of computational steps
that transform the input into the output.
An Instance of a problem consists of the input needed to
compute a solution to the problem.
8
W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y
a l g o r i t h m s ?
The Human Genome Project
 Identifying 100,000 genes in human DNA
 determining the sequences of the 3 billion chemical
base pairs that make up human DNA
 storing this information in databases
9
W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y
a l g o r i t h m s ?
E-Commerce
 public-key cryptography and digital signatures
 recommendation system
 logistics
10
W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y
a l g o r i t h m s ?
11
W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y
a l g o r i t h m s ?
If you can show that the problem is NP-complete, you can instead
spend your time developing an efficient algorithm that gives a good, but not
the best possible, solution.
12
13
14
15
16
Don’t you wish that
all NP can be reduced into P
???
17
18
19
20
21
22
23
24
Efficiency of an Algorithm
25
Finding factorial of integer n
int factorial(int n)
{
int i, fact = 1;
for (i = 2; i <= n; i++)
{
fact *= i;
}
return fact;
}
}
26
Finding factorial of integer n
int factorial(int n)
{
int i, fact = 1;
for (i = 2; i <= n; i++)
{
fact *= i;
}
return fact;
}
}
int factorial(int n)
{
int i, fact = 1;
if (n<=1) return 1;
else return n*factorial(n-1);
}
27
Fibonacci Series: Algorithm I
int fun(int x)
{
int f;
if (x==1) return(0);
else
if (x==2) return(1);
else
f= fun(x-1)+fun(x-2);
return(f);
}
28
Fibonacci Series: Algorithm II
int fun(int x)
{
int A[x+1];
A[0]=0;
A[1]=1;
for (i=0; i<=x, i++)
{
A[i] = A[i-1]+A[i-2];
}
return A[i];
}
29
30
Fibonacci Series: Algorithm III
int fun(int x)
{
int pre=0, curr-1, next;
for (i=2; i<=x, i++)
{
next=pre+curr;
p=curr;
curr=next;
}
return next;
}
31
32
33
34
Evaluating algorithms
Two questions we ask about an algorithm
1. Is it correct?
2. Is it efficient?
Correctness is of utmost importance.
highly efficient but incorrect algorithm ???
Efficiency with respect to:
1. Running time
2. Space (amount of memory used)
3. Network traffic
4. Other features (e.g. number of times secondary storage is
accessed)
35
Loop-invariant approach to correctness proof
Initialization: true before the first execution of the loop.
Maintenance: If true before an iteration of the loop, it should be
true also after the iteration.
Termination: Prove that when the loop terminates, the invariant,
and the reason that the loop terminates, imply the correctness
of the loop-construct.
Temporarily be false during the body of the loop
36
int j = 9;
for(int i=0; i<10; i++)
j--;
Loop invariant: i + j == 9.
A weaker invariant: i >= 0 && i <= 10.
37
Subarray A[0 to i-1] is always sorted
Insertion Sort:
38
39
40
Thank You

More Related Content

Similar to AAD.pptx

Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Data Structure
Data StructureData Structure
Data Structuresheraz1
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 DsQundeel
 
Machine Learning, Financial Engineering and Quantitative Investing
Machine Learning, Financial Engineering and Quantitative InvestingMachine Learning, Financial Engineering and Quantitative Investing
Machine Learning, Financial Engineering and Quantitative InvestingShengyuan Wang Steven
 
PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet
PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet
PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet Pôle Systematic Paris-Region
 
Computer organiztion3
Computer organiztion3Computer organiztion3
Computer organiztion3Umang Gupta
 
The Complexity Of Primality Testing
The Complexity Of Primality TestingThe Complexity Of Primality Testing
The Complexity Of Primality TestingMohammad Elsheikh
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihmSajid Marwat
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015ihji
 
Python for Scientific Computing
Python for Scientific ComputingPython for Scientific Computing
Python for Scientific ComputingAlbert DeFusco
 
Introduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdfIntroduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdfTulasiramKandula1
 
Data Structures and Algorithm Analysis
Data Structures  and  Algorithm AnalysisData Structures  and  Algorithm Analysis
Data Structures and Algorithm AnalysisMary Margarat
 

Similar to AAD.pptx (20)

Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Data Structure
Data StructureData Structure
Data Structure
 
Lec 1 Ds
Lec 1 DsLec 1 Ds
Lec 1 Ds
 
Algorithms with-java-1.0
Algorithms with-java-1.0Algorithms with-java-1.0
Algorithms with-java-1.0
 
Vikram emerging technologies
Vikram emerging technologiesVikram emerging technologies
Vikram emerging technologies
 
Machine Learning, Financial Engineering and Quantitative Investing
Machine Learning, Financial Engineering and Quantitative InvestingMachine Learning, Financial Engineering and Quantitative Investing
Machine Learning, Financial Engineering and Quantitative Investing
 
Chapter 2 Java Methods
Chapter 2 Java MethodsChapter 2 Java Methods
Chapter 2 Java Methods
 
Chapter 2 Method in Java OOP
Chapter 2   Method in Java OOPChapter 2   Method in Java OOP
Chapter 2 Method in Java OOP
 
Predictive Testing
Predictive TestingPredictive Testing
Predictive Testing
 
PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet
PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet
PyData Paris 2015 - Track 3.2 Serge Guelton et Pierrick Brunet
 
Computer organiztion3
Computer organiztion3Computer organiztion3
Computer organiztion3
 
The Complexity Of Primality Testing
The Complexity Of Primality TestingThe Complexity Of Primality Testing
The Complexity Of Primality Testing
 
Time complexity.ppt
Time complexity.pptTime complexity.ppt
Time complexity.ppt
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
Yoyak ScalaDays 2015
Yoyak ScalaDays 2015Yoyak ScalaDays 2015
Yoyak ScalaDays 2015
 
Python for Scientific Computing
Python for Scientific ComputingPython for Scientific Computing
Python for Scientific Computing
 
Big Oh.ppt
Big Oh.pptBig Oh.ppt
Big Oh.ppt
 
Introduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdfIntroduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdf
 
Data Structures and Algorithm Analysis
Data Structures  and  Algorithm AnalysisData Structures  and  Algorithm Analysis
Data Structures and Algorithm Analysis
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 

Recently uploaded (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

AAD.pptx

  • 1. 1
  • 2. Dr. Omprakash Chandrakar Associate Professor (Computer Science)
  • 3. 3 1. ALGORITHM 2. FLOWCHART 3. PSEUDOCODE 4. PROGRAM F i r s t t h i n g f i r s t
  • 4. 4 C h a r a c t e r i s t i c s o f A l g o r i t h m INPUT, OUTPUT, DEFINITE, FINITE, CORRECT
  • 5. 5 A l g o r i t h m A n d D a t a S t r u c t u r e s DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  • 6. 6
  • 7. 7 T h e R o l e o f A l g o r i t h m i n C o m p u t i n g An algorithm is thus a sequence of computational steps that transform the input into the output. An Instance of a problem consists of the input needed to compute a solution to the problem.
  • 8. 8 W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y a l g o r i t h m s ? The Human Genome Project  Identifying 100,000 genes in human DNA  determining the sequences of the 3 billion chemical base pairs that make up human DNA  storing this information in databases
  • 9. 9 W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y a l g o r i t h m s ? E-Commerce  public-key cryptography and digital signatures  recommendation system  logistics
  • 10. 10 W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y a l g o r i t h m s ?
  • 11. 11 W h a t k i n d s o f p r o b l e m s a r e s o l v e d b y a l g o r i t h m s ? If you can show that the problem is NP-complete, you can instead spend your time developing an efficient algorithm that gives a good, but not the best possible, solution.
  • 12. 12
  • 13. 13
  • 14. 14
  • 15. 15
  • 16. 16 Don’t you wish that all NP can be reduced into P ???
  • 17. 17
  • 18. 18
  • 19. 19
  • 20. 20
  • 21. 21
  • 22. 22
  • 23. 23
  • 24. 24 Efficiency of an Algorithm
  • 25. 25 Finding factorial of integer n int factorial(int n) { int i, fact = 1; for (i = 2; i <= n; i++) { fact *= i; } return fact; } }
  • 26. 26 Finding factorial of integer n int factorial(int n) { int i, fact = 1; for (i = 2; i <= n; i++) { fact *= i; } return fact; } } int factorial(int n) { int i, fact = 1; if (n<=1) return 1; else return n*factorial(n-1); }
  • 27. 27 Fibonacci Series: Algorithm I int fun(int x) { int f; if (x==1) return(0); else if (x==2) return(1); else f= fun(x-1)+fun(x-2); return(f); }
  • 28. 28 Fibonacci Series: Algorithm II int fun(int x) { int A[x+1]; A[0]=0; A[1]=1; for (i=0; i<=x, i++) { A[i] = A[i-1]+A[i-2]; } return A[i]; }
  • 29. 29
  • 30. 30 Fibonacci Series: Algorithm III int fun(int x) { int pre=0, curr-1, next; for (i=2; i<=x, i++) { next=pre+curr; p=curr; curr=next; } return next; }
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34 Evaluating algorithms Two questions we ask about an algorithm 1. Is it correct? 2. Is it efficient? Correctness is of utmost importance. highly efficient but incorrect algorithm ??? Efficiency with respect to: 1. Running time 2. Space (amount of memory used) 3. Network traffic 4. Other features (e.g. number of times secondary storage is accessed)
  • 35. 35 Loop-invariant approach to correctness proof Initialization: true before the first execution of the loop. Maintenance: If true before an iteration of the loop, it should be true also after the iteration. Termination: Prove that when the loop terminates, the invariant, and the reason that the loop terminates, imply the correctness of the loop-construct. Temporarily be false during the body of the loop
  • 36. 36 int j = 9; for(int i=0; i<10; i++) j--; Loop invariant: i + j == 9. A weaker invariant: i >= 0 && i <= 10.
  • 37. 37 Subarray A[0 to i-1] is always sorted Insertion Sort:
  • 38. 38
  • 39. 39
  • 40. 40

Editor's Notes

  1. Characteristics of Algorithm INPUT, OUTPUT, DEFINITE, FINITE, CORRECT
  2. DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  3. DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  4. DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  5. DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  6. DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  7. DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  8. polynomial time Definition: When the execution time of a computation, m(n), is no more than a polynomial function of the problem size, n. More formally m(n) = O(nk) where k is a constant. Note: Broadly speaking, polynomial time algorithms are reasonable to compute. The time to run exponential algorithms grows too fast to expect to be able to compute exact solutions in all cases.
  9. polynomial time Definition: When the execution time of a computation, m(n), is no more than a polynomial function of the problem size, n. More formally m(n) = O(nk) where k is a constant. Note: Broadly speaking, polynomial time algorithms are reasonable to compute. The time to run exponential algorithms grows too fast to expect to be able to compute exact solutions in all cases.
  10. tractable, i.e. there exists an algorithm that can solve it in a reasonable amount of time on a computer. intractable, meaning that for large values it would take far too long for even the best supercomputer to solve it - in some cases, this means millions or even billions of years.
  11. tractable, i.e. there exists an algorithm that can solve it in a reasonable amount of time on a computer. intractable, meaning that for large values it would take far too long for even the best supercomputer to solve it - in some cases, this means millions or even billions of years.
  12. DEPENDS ON INPUT DATA, ACCURACY, ENVIRONMENT, PROBLEM DOMAIN
  13. 1. NO OF LINES OF CODE 2. EASY TO UND/IMP 3. TIME TO EXECUTE 4. SPACE TO EXECUTE 5. NO OF STATEMENTS