SlideShare a Scribd company logo
Concept of Algorithm
By
Edison Francis BSc IT
Teacher SDCSS, Grenada
What is an algorithm
• An algorithm is a set of steps which when followed will solve a problem.
• When developing an algorithm the following THREE things must be
considered.
• Defining the problem
• Designing the algorithm
• Testing the algorithm on paper- this will ensure that it works correctly.
Defining the Problem
• Say what the problem is about or what it will do.
• The problem should be analyzed and objectives stated.
• Objectives must include the following instructions or steps:
• Specify the input
• Specify the output
• Specify the processing
• Specify storage (in some cases)
Designing the Algorithm
• When designing the algorithm remember that it
must:
• follow the rules
• be explicit
• have a start and stop point.
• Can be written in structured English, pseudocode, or a
flow chart.
•
Designing the Algorithm cont…
• Algorithm must also be:
• Correct:- provide input, output and processing instructions
• Simple:- steps performed in logical order
• Clear:- easy to read
• Precise:-present solution without referring to programming codes.
• Easy to implement:- easily transferred to programming codes
• Efficient:-enable codes to produce results quickly
Types of Algorithm
• Narrative: uses English like statements
when listing the steps
• Example: Find the average of three
numbers.
1. Get first number
2. Save as num1
3. Get second number
4. Save as num2
5. Get third number
6. Save as num3
7. Add the three numbers
8. Save result as sum
9. Divide sum by 3
10. Save result as average
11. Display the average
Pseudocode Algorithm
• This type of algorithm is written using codes that are similar to the codes that are
used in a programming language.
Example:
• Find the average of three numbers.
• Read num1,num2,num3
• Sum=num1+num2+num3
• Average=sum/3
• Print Average
Flow Chart
• This type of algorithm uses a diagram or pictorial representation of the steps
in solving the problem.
• Example:
Find the average of three
numbers average=Sum/3
Start
Num1, num2, num3,
average
Stop
Sum=num1+num2
+num3
END

More Related Content

PPTX
Design and Analysis of Algorithm ppt for unit one
PDF
Lecture 2 role of algorithms in computing
PPTX
Algorithmics, intro to data structures.pptx
PPTX
problem solving and algorithm development
PPTX
INTROTOPROBLEMSOLVING.pptxINTROTOPROBLEMSOLVING.pptx
PDF
Problem solving methodology
PPTX
Design and analysis of algorithms Module-I.pptx
PPTX
Four Elements of Computational Thinking.pptx
Design and Analysis of Algorithm ppt for unit one
Lecture 2 role of algorithms in computing
Algorithmics, intro to data structures.pptx
problem solving and algorithm development
INTROTOPROBLEMSOLVING.pptxINTROTOPROBLEMSOLVING.pptx
Problem solving methodology
Design and analysis of algorithms Module-I.pptx
Four Elements of Computational Thinking.pptx

Similar to Concept of Algorithm.pptx (20)

PPTX
Chapter #1 (Introduction To Algorithms).pptx
PDF
Daa chapter 1
PPT
AOA Week 01.ppt
PPT
UNIT-1-PPTS-DAA_INTRODUCTION_TO_DAA_GH.ppt
PDF
Algorithms notes 2 tutorials duniya
PPT
UNIT-1-PPTS-DAA INTRO WITH DIVIDE AND CONQUER
PPT
UNIT 1- Design Analysis of algorithms and its working
PPTX
Data Structures_Introduction to algorithms.pptx
PPT
DOCX
Chapter 2(1)
PPTX
Algorithm and flowchart with pseudo code
PDF
Introduction to Algorithms Complexity Analysis
PDF
Algorithms and how to write an algorithms
PPT
UNIT-1-PPTS-DAA.ppt
PPT
UNIT-1-PPTS-DAA.ppt
PPT
Introduction to Design Algorithm And Analysis.ppt
PPTX
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
PPSX
Ds03 part i algorithms by jyoti lakhani
PPTX
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
PDF
GE8151 notes pdf.pdf
Chapter #1 (Introduction To Algorithms).pptx
Daa chapter 1
AOA Week 01.ppt
UNIT-1-PPTS-DAA_INTRODUCTION_TO_DAA_GH.ppt
Algorithms notes 2 tutorials duniya
UNIT-1-PPTS-DAA INTRO WITH DIVIDE AND CONQUER
UNIT 1- Design Analysis of algorithms and its working
Data Structures_Introduction to algorithms.pptx
Chapter 2(1)
Algorithm and flowchart with pseudo code
Introduction to Algorithms Complexity Analysis
Algorithms and how to write an algorithms
UNIT-1-PPTS-DAA.ppt
UNIT-1-PPTS-DAA.ppt
Introduction to Design Algorithm And Analysis.ppt
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
Ds03 part i algorithms by jyoti lakhani
FDFDRERSFDSGAGAFGGFGFGFGFGAFDGFDGFGFFAGFGGDF
GE8151 notes pdf.pdf
Ad

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Computing-Curriculum for Schools in Ghana
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Complications of Minimal Access Surgery at WLH
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Paper A Mock Exam 9_ Attempt review.pdf.
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Updated Idioms and Phrasal Verbs in English subject
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
UNIT III MENTAL HEALTH NURSING ASSESSMENT
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Computing-Curriculum for Schools in Ghana
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial diseases, their pathogenesis and prophylaxis
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
History, Philosophy and sociology of education (1).pptx
Weekly quiz Compilation Jan -July 25.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Ad

Concept of Algorithm.pptx

  • 1. Concept of Algorithm By Edison Francis BSc IT Teacher SDCSS, Grenada
  • 2. What is an algorithm • An algorithm is a set of steps which when followed will solve a problem. • When developing an algorithm the following THREE things must be considered. • Defining the problem • Designing the algorithm • Testing the algorithm on paper- this will ensure that it works correctly.
  • 3. Defining the Problem • Say what the problem is about or what it will do. • The problem should be analyzed and objectives stated. • Objectives must include the following instructions or steps: • Specify the input • Specify the output • Specify the processing • Specify storage (in some cases)
  • 4. Designing the Algorithm • When designing the algorithm remember that it must: • follow the rules • be explicit • have a start and stop point. • Can be written in structured English, pseudocode, or a flow chart. •
  • 5. Designing the Algorithm cont… • Algorithm must also be: • Correct:- provide input, output and processing instructions • Simple:- steps performed in logical order • Clear:- easy to read • Precise:-present solution without referring to programming codes. • Easy to implement:- easily transferred to programming codes • Efficient:-enable codes to produce results quickly
  • 6. Types of Algorithm • Narrative: uses English like statements when listing the steps • Example: Find the average of three numbers. 1. Get first number 2. Save as num1 3. Get second number 4. Save as num2 5. Get third number 6. Save as num3 7. Add the three numbers 8. Save result as sum 9. Divide sum by 3 10. Save result as average 11. Display the average
  • 7. Pseudocode Algorithm • This type of algorithm is written using codes that are similar to the codes that are used in a programming language. Example: • Find the average of three numbers. • Read num1,num2,num3 • Sum=num1+num2+num3 • Average=sum/3 • Print Average
  • 8. Flow Chart • This type of algorithm uses a diagram or pictorial representation of the steps in solving the problem. • Example: Find the average of three numbers average=Sum/3 Start Num1, num2, num3, average Stop Sum=num1+num2 +num3
  • 9. END