SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Phases of Algorithm
and
Analysis Process
Algorithm
finite set of instructions that specify a sequence of
operations to be carried out.
 Algorithm design isn’t easy, but it’s not impossible
either. People who design algorithms don’t sit
around looking for problems to solve, they are
usually already involved in projects when a
problem arises that requires a solution.
This might not sound that hard because people
tend to put algorithms in the same class as
functions. However, they are not functions, they are
efficient paths to handling data as accurately and
quickly as the computer allows.
Algorithms resemble recipes. Recipes tell you how
to accomplish a task by performing a number of
steps.
For example, to bake a cake the steps are: preheat
the oven; mix flour, sugar, and eggs thoroughly;
pour into a baking pan; and so forth.
Phases of Algorithm
Every algorithm needs a process in order to be
created and utilized.
Described below are the four stages of
algorithm analysis and design:
Design
 The first stage is to identify the problem and thoroughly understand it.
This is where it’s important you consult with everybody who has an
interest in the problem. Speak with them and see how they see the
problem and what they need out of the solution so their part of the
project or program can progress.
 This is also the point where you are going to flowchart and/or use
pseudo code to work out the specific problems of solving the flow of
operations within the code.
 Analyze
 Once you have the basic framework of the algorithm it’s time to start
analyzing how efficient the code is in solving the problem. Algorithm
design is fluid and subject to individual plans. This is a step that some
programmers like to attack after they have coded the algorithm and run
it through the compiler. Others prefer to examine it prior to writing the
code and analyze results based on their expectations from the design
stage.
 If you are part of a team then have the best programmer in your group
write the initial code, notate it well so the lesser experienced
programmers will understand what is happening as the application is
executed.
 Implement
‱ Writing and coding the algorithm is the next step in the
process. If you are the one writing the algorithm, then you
need to write it in the coding language you understand
the best. In order for you to know how to write the
algorithm efficiently you have to know exactly what each
line of code is going to accomplish when the program is
executed. Write the code to execute quickly but can also
handle the input data that it will receive.
‱ If you are part of a team then have the best programmer
in your group write the initial code, notate it well so the
lesser experienced programmers will understand what is
happening as the application is executed.
 Experiment
 Once the algorithm is designed and coded go back and
experiment with different variables in the algorithm. Try
and enter data that will make it fail or try and re-write the
code to work it out most efficiently. Experimentation in
algorithmic design is really just another step of the
analyzing of the algorithm.
 When you find flaws in what you have written or ways to
write the code better, then go back to the design step and
redesign the algorithm.
Examples:
‱ Let's say that you have a friend arriving at the airport, and your friend
needs to get from the airport to your house. Here are three different
algorithms that you might give your friend for getting to your home:
 The taxi algorithm:
‱ 1. Go to the taxi stand.
‱ 2. Get in a taxi.
‱ 3. Give the driver my address.
 The call-me algorithm:
‱ 1. When your plane arrives, call my cell phone.
‱ 2. Meet me outside baggage claim.
 The rent-a-car algorithm:
‱ 1. Take the shuttle to the rental car place.
‱ 2. Rent a car.
‱ 3. Follow the directions to get to my house
 Write an algorithm to add two numbers entered
by user.
Step 1: Start
Step 2: Declare variables num1, num2 and sum.
Step 3: Read values num1 and num2.
Step 4: Add num1 and num2 and assign the result to
sum.
sum←num1+num2
Step 5: Display sum
Step 6: Stop
Analysis of Algorithms
"Analysis of algorithms is the theoretical study of
computer program performance and resource usage".
How good is the Algorithm?
 correctness
 time efficiency
 space efficiency
 security
 functionality
 robustness
 user-friendliness
Quiz:
1-4 .What are the phases of Algorithm design.
5. Analysis of algorithms is the
of computer program
performance and resource usage.
6-8. Give 3 examples of characteristic of
Analysis of Algorithm.
9-10. Write algorithms that is used in real life
and in Programming.
End

Weitere Àhnliche Inhalte

Was ist angesagt?

Dma transfer
Dma transferDma transfer
Dma transfer
gmnithya
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
Tech_MX
 
Input output organization
Input output organizationInput output organization
Input output organization
abdulugc
 

Was ist angesagt? (20)

Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lex
 
Threaded Binary Tree
Threaded Binary TreeThreaded Binary Tree
Threaded Binary Tree
 
Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
 
queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
 
Data Structures : hashing (1)
Data Structures : hashing (1)Data Structures : hashing (1)
Data Structures : hashing (1)
 
Design issues of dos
Design issues of dosDesign issues of dos
Design issues of dos
 
Hashing
HashingHashing
Hashing
 
Chomsky classification of Language
Chomsky classification of LanguageChomsky classification of Language
Chomsky classification of Language
 
Three address code In Compiler Design
Three address code In Compiler DesignThree address code In Compiler Design
Three address code In Compiler Design
 
Bottom up parser
Bottom up parserBottom up parser
Bottom up parser
 
Three Address code
Three Address code Three Address code
Three Address code
 
Abstract data types
Abstract data typesAbstract data types
Abstract data types
 
Lecture 12 intermediate code generation
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generation
 
Dma transfer
Dma transferDma transfer
Dma transfer
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Top Down Parsing, Predictive Parsing
Top Down Parsing, Predictive ParsingTop Down Parsing, Predictive Parsing
Top Down Parsing, Predictive Parsing
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
And or graph
And or graphAnd or graph
And or graph
 
Interface in java
Interface in javaInterface in java
Interface in java
 
Input output organization
Input output organizationInput output organization
Input output organization
 

Ähnlich wie phases of algorithm

1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm
Mohammed khaja Jamaluddin
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 
C++ good tutorial
C++ good tutorialC++ good tutorial
C++ good tutorial
Ezzat Atalla
 
Algorithm types performance steps working
Algorithm types performance steps workingAlgorithm types performance steps working
Algorithm types performance steps working
Saurabh846965
 

Ähnlich wie phases of algorithm (20)

1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm1.1 the introduction of design and analysis of algorithm
1.1 the introduction of design and analysis of algorithm
 
AOA Week 01.ppt
AOA Week 01.pptAOA Week 01.ppt
AOA Week 01.ppt
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
Module 1 python.pptx
Module 1 python.pptxModule 1 python.pptx
Module 1 python.pptx
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 
C++ good tutorial
C++ good tutorialC++ good tutorial
C++ good tutorial
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniya
 
Program concep sequential statements
Program concep sequential statementsProgram concep sequential statements
Program concep sequential statements
 
A gentle introduction to algorithm complexity analysis
A gentle introduction to algorithm complexity analysisA gentle introduction to algorithm complexity analysis
A gentle introduction to algorithm complexity analysis
 
Basics of Algorithm Unit 1 part 1 algorithm
Basics of Algorithm Unit 1 part 1  algorithmBasics of Algorithm Unit 1 part 1  algorithm
Basics of Algorithm Unit 1 part 1 algorithm
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHESC LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
 
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptxChallenges-and-Consideration-in-Programming-Logic-and-Design...pptx
Challenges-and-Consideration-in-Programming-Logic-and-Design...pptx
 
Design and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit oneDesign and Analysis of Algorithm ppt for unit one
Design and Analysis of Algorithm ppt for unit one
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Algorithm types performance steps working
Algorithm types performance steps workingAlgorithm types performance steps working
Algorithm types performance steps working
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
DAA Unit 1.pdf
DAA Unit 1.pdfDAA Unit 1.pdf
DAA Unit 1.pdf
 
Algorithmic problem sloving
Algorithmic problem slovingAlgorithmic problem sloving
Algorithmic problem sloving
 
Algorithm week2(technovation)
Algorithm week2(technovation)Algorithm week2(technovation)
Algorithm week2(technovation)
 

KĂŒrzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

KĂŒrzlich hochgeladen (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 

phases of algorithm

  • 2. Algorithm finite set of instructions that specify a sequence of operations to be carried out.  Algorithm design isn’t easy, but it’s not impossible either. People who design algorithms don’t sit around looking for problems to solve, they are usually already involved in projects when a problem arises that requires a solution.
  • 3. This might not sound that hard because people tend to put algorithms in the same class as functions. However, they are not functions, they are efficient paths to handling data as accurately and quickly as the computer allows. Algorithms resemble recipes. Recipes tell you how to accomplish a task by performing a number of steps. For example, to bake a cake the steps are: preheat the oven; mix flour, sugar, and eggs thoroughly; pour into a baking pan; and so forth.
  • 4. Phases of Algorithm Every algorithm needs a process in order to be created and utilized.
  • 5. Described below are the four stages of algorithm analysis and design: Design  The first stage is to identify the problem and thoroughly understand it. This is where it’s important you consult with everybody who has an interest in the problem. Speak with them and see how they see the problem and what they need out of the solution so their part of the project or program can progress.  This is also the point where you are going to flowchart and/or use pseudo code to work out the specific problems of solving the flow of operations within the code.
  • 6.  Analyze  Once you have the basic framework of the algorithm it’s time to start analyzing how efficient the code is in solving the problem. Algorithm design is fluid and subject to individual plans. This is a step that some programmers like to attack after they have coded the algorithm and run it through the compiler. Others prefer to examine it prior to writing the code and analyze results based on their expectations from the design stage.  If you are part of a team then have the best programmer in your group write the initial code, notate it well so the lesser experienced programmers will understand what is happening as the application is executed.
  • 7.  Implement ‱ Writing and coding the algorithm is the next step in the process. If you are the one writing the algorithm, then you need to write it in the coding language you understand the best. In order for you to know how to write the algorithm efficiently you have to know exactly what each line of code is going to accomplish when the program is executed. Write the code to execute quickly but can also handle the input data that it will receive. ‱ If you are part of a team then have the best programmer in your group write the initial code, notate it well so the lesser experienced programmers will understand what is happening as the application is executed.
  • 8.  Experiment  Once the algorithm is designed and coded go back and experiment with different variables in the algorithm. Try and enter data that will make it fail or try and re-write the code to work it out most efficiently. Experimentation in algorithmic design is really just another step of the analyzing of the algorithm.  When you find flaws in what you have written or ways to write the code better, then go back to the design step and redesign the algorithm.
  • 10. ‱ Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are three different algorithms that you might give your friend for getting to your home:  The taxi algorithm: ‱ 1. Go to the taxi stand. ‱ 2. Get in a taxi. ‱ 3. Give the driver my address.  The call-me algorithm: ‱ 1. When your plane arrives, call my cell phone. ‱ 2. Meet me outside baggage claim.  The rent-a-car algorithm: ‱ 1. Take the shuttle to the rental car place. ‱ 2. Rent a car. ‱ 3. Follow the directions to get to my house
  • 11.  Write an algorithm to add two numbers entered by user. Step 1: Start Step 2: Declare variables num1, num2 and sum. Step 3: Read values num1 and num2. Step 4: Add num1 and num2 and assign the result to sum. sum←num1+num2 Step 5: Display sum Step 6: Stop
  • 12. Analysis of Algorithms "Analysis of algorithms is the theoretical study of computer program performance and resource usage". How good is the Algorithm?  correctness  time efficiency  space efficiency  security  functionality  robustness  user-friendliness
  • 13.
  • 14. Quiz: 1-4 .What are the phases of Algorithm design. 5. Analysis of algorithms is the of computer program performance and resource usage. 6-8. Give 3 examples of characteristic of Analysis of Algorithm. 9-10. Write algorithms that is used in real life and in Programming.
  • 15. End