SlideShare a Scribd company logo
4
Most read
7
Most read
12
Most read
For more updates join our newsletter at www.anjalitechnosoft.in
A
www.anjalitechnosoft.inwww.anjalitechnosoft.in
For more updates join our newsletter at www.anjalitechnosoft.in
Contents
• Algorithm
• Flowchart
• Pseudo codes
• Decision Table
For more updates join our newsletter at www.anjalitechnosoft.in
• A typical programming task can be divided into
two phases:
• Problem solving phase
– produce an ordered sequence of steps that describe
solution of problem
– this sequence of steps is called an algorithm
• Implementation phase
– implement the program in some programming
language
Introduction
For more updates join our newsletter at www.anjalitechnosoft.in4
• An algorithm is “a finite set of precise
instructions for performing a computation or
for solving a problem”
– A program is one type of algorithm
• All programs are algorithms
• Not all algorithms are programs!
– Directions to somebody’s house is an algorithm
– A recipe for cooking a cake is an algorithm
– The steps to compute the cosine of 90° is an
algorithm
What is an Algorithm
For more updates join our newsletter at www.anjalitechnosoft.in5
• Input: what the algorithm takes in as input
• Output: what the algorithm produces as output
• Definiteness: the steps are defined precisely
• Correctness: should produce the correct output
• Finiteness: the steps required should be finite
• Effectiveness: each step must be able to be
performed in a finite amount of time
• Generality: the algorithm should be applicable
to all problems of a similar form
Properties of Algorithm
For more updates join our newsletter at www.anjalitechnosoft.in
• First produce a general algorithm (one can use
pseudocode)
• Refine the algorithm successively to get step by
step detailed algorithm that is very close to a
computer language.
• Pseudocode is an artificial and informal
language that helps programmers develop
algorithms. Pseudocode is very similar to
everyday English.
Steps in Problem Solving
For more updates join our newsletter at www.anjalitechnosoft.in
Write an algorithm to determine a student’s final
grade and indicate whether it is passing or failing.
The final grade is calculated as the average of four
marks.
Example
Pseudocode:
• Input a set of 4 marks
• Calculate their average by summing and dividing by 4
• if average is below 50
Print “FAIL”
else
Print “PASS”
For more updates join our newsletter at www.anjalitechnosoft.in
• Detailed Algorithm
• Step 1: Input M1,M2,M3,M4
Step 2: GRADE ← (M1+M2+M3+M4)/4
Step 3: if (GRADE < 50) then
Print “FAIL”
else
Print “PASS”
endif
Example..
For more updates join our newsletter at www.anjalitechnosoft.in
• (Dictionary) A schematic representation of a sequence
of operations, as in a manufacturing process or
computer program.
• (Technical) A graphical representation of the sequence
of operations in an information system or program.
Information system flowcharts show how data flows
from source documents through the computer to final
distribution to users. Program flowcharts show the
sequence of instructions in a single program or
subroutine. Different symbols are used to draw each
type of flowchart.
Flowchart
For more updates join our newsletter at www.anjalitechnosoft.in
Flowchart..
A Flowchart
– shows logic of an algorithm
– emphasizes individual steps and their
interconnections
– e.g. control flow from one action to the next
For more updates join our newsletter at www.anjalitechnosoft.in
Flowchart Symbols
For more updates join our newsletter at www.anjalitechnosoft.in
Step 1:
Input M1,M2,M3,M4
Step 2:
GRADE ← (M1+M2+M3+M4)/4
Step 3:
if (GRADE <50)
then
Print “FAIL”
else
Print “PASS”
endif
PRINT
“PASS”
START
Input
M1,M2,M3,M4
GRADE←(M1+M2+M3+M4)/4
IS
GRADE<5
0
PRINT
“FAIL”
STOP
YN
Example
For more updates join our newsletter at www.anjalitechnosoft.in
• A matrix representation of the logic of a decision
• Specifies the possible conditions and the resulting
actions
• Best used for complicated decision logic
Decision Table
For more updates join our newsletter at www.anjalitechnosoft.in
• A matrix representation of the logic of a decision
• Specifies the possible conditions and the resulting
actions
• Best used for complicated decision logic
Decision Table ..
For more updates join our newsletter at www.anjalitechnosoft.in
• Consists of three parts
– Condition stubs
• Lists condition relevant to decision
– Action stubs
• Actions that result from a given set of conditions
– Rules
• Specify which actions are to be followed for a given
set of conditions
For more updates join our newsletter at www.anjalitechnosoft.in
• Indifferent Condition
– Condition whose value does not affect which action is taken
for two or more rules
• Standard procedure for creating decision tables
– Name the condition and values each condition can assume
– Name all possible actions that can occur
– List all rules
– Define the actions for each rule
– Simplify the table
For more updates join our newsletter at www.anjalitechnosoft.in
9.17
For more updates join our newsletter at www.anjalitechnosoft.in
• PART 1. FRAME THE PROBLEM.
– Identify the conditions (decision criteria). These are the factors that will influence the
decision.
• E.g., We want to know the total cost of a student’s tuition. What factors are important?
– Identify the range of values for each condition or criteria.
• E.g. What are they for each factor identified above?
– Identify all possible actions that can occur.
• E.g. What types of calculations would be necessary?
• PART 2. CREATE THE TABLE.
– Create a table with 4 quadrants.
• Put the conditions in the upper left quadrant. One row per condition.
• Put the actions in the lower left quadrant. One row per action.
– List all possible rules.
• Alternate values for first condition. Repeat for all values of second condition. Keep repeating
this process for all conditions.
• Put the rules in the upper right quadrant.
– Enter actions for each rule
• In the lower right quadrant, determine what, if any, appropriate actions should be taken for
each rule.
– Reduce table as necessary.
Construction a Decision Table
For more updates join our newsletter at www.anjalitechnosoft.in
For any enquiry, post your doubt at
Anjali Technosoft
@ Clear your Doubts
For any enquiry, post your doubt at
Anjali Technosoft
@ Clear your Doubts

More Related Content

What's hot (20)

PPTX
Algorithms and Flowcharts
Deva Singh
 
PPT
Risk management(software engineering)
Priya Tomar
 
PPTX
Type checking
rawan_z
 
PPTX
Java servlets and CGI
lavanya marichamy
 
PPTX
Programming languages
www.myassignmenthelp.net
 
PPTX
Algorithm - Introduction
Madhu Bala
 
PPTX
Software project planning
rajvir_kaur
 
PPT
1 - Introduction to Compilers.ppt
Rakesh Kumar
 
PPTX
Algorithm and flowchart
Elizabeth de Leon Aler
 
PPTX
C and its errors
Junaid Raja
 
PPT
Introduction to Algorithms & flow charts
Yash Gupta
 
PPTX
Pseudocode flowcharts
nicky_walters
 
PPT
Programming languages
Archana Maharjan
 
PPTX
Error Recovery strategies and yacc | Compiler Design
Shamsul Huda
 
PPTX
Phases of Compiler
Tanzeela_Hussain
 
PPTX
Introduction to c programming
Manoj Tyagi
 
PPTX
RMMM Plan
Ankit Bahuguna
 
PPTX
Introduction to algorithms
Madishetty Prathibha
 
PPTX
introduction to visual basic PPT.pptx
classall
 
PPT
Introduction to Compiler Construction
Sarmad Ali
 
Algorithms and Flowcharts
Deva Singh
 
Risk management(software engineering)
Priya Tomar
 
Type checking
rawan_z
 
Java servlets and CGI
lavanya marichamy
 
Programming languages
www.myassignmenthelp.net
 
Algorithm - Introduction
Madhu Bala
 
Software project planning
rajvir_kaur
 
1 - Introduction to Compilers.ppt
Rakesh Kumar
 
Algorithm and flowchart
Elizabeth de Leon Aler
 
C and its errors
Junaid Raja
 
Introduction to Algorithms & flow charts
Yash Gupta
 
Pseudocode flowcharts
nicky_walters
 
Programming languages
Archana Maharjan
 
Error Recovery strategies and yacc | Compiler Design
Shamsul Huda
 
Phases of Compiler
Tanzeela_Hussain
 
Introduction to c programming
Manoj Tyagi
 
RMMM Plan
Ankit Bahuguna
 
Introduction to algorithms
Madishetty Prathibha
 
introduction to visual basic PPT.pptx
classall
 
Introduction to Compiler Construction
Sarmad Ali
 

Similar to Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table (20)

PPTX
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
HarshJha34
 
PPTX
Introduction to problem solving Techniques
merlinjohnsy
 
PPT
Unit 1 python (2021 r)
praveena p
 
PPTX
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
ShamithRai
 
PPTX
Chp-1 DAA (2).pptx design analysis and algoritham presentation
vaishnavbhavna17
 
PPTX
UNIT I.pptxpython unit 1 engineering full unit completed
pavithrad67
 
PPTX
Algorithms - Introduction to computer programming
baabtra.com - No. 1 supplier of quality freshers
 
PPTX
Unit 2 - Complete (1).pptx
gogulram2
 
PPTX
01 Introduction to analysis of Algorithms.pptx
ssuser586772
 
PPT
Flowcharting week 5 2019 2020
Osama Ghandour Geris
 
PPT
Problem Solving Techniques notes for Unit 1
SATHYABAMAMADHANKUMA
 
PPTX
Programming Fundamentals lecture 3
REHAN IJAZ
 
PPTX
Algorithm for computational problematic sit
Saurabh846965
 
PPTX
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
PPTX
Fundamentals of Programming Lecture #1.pptx
Eyasu46
 
PPT
Flow charts week 5 2020 2021
Osama Ghandour Geris
 
PPTX
PROBLEM SOLVING.pptx
sumathysenthilkumar
 
PDF
Algorithm.pdf
MIT,Imphal
 
PPTX
Problem-solving and design 1.pptx
TadiwaMawere
 
PDF
Algorithmic problem sloving
Mani Kandan
 
C LANGUAGE-FLOWCHARTS,PSEUDOCODE,ALGORITHMS APPROCHES
HarshJha34
 
Introduction to problem solving Techniques
merlinjohnsy
 
Unit 1 python (2021 r)
praveena p
 
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
ShamithRai
 
Chp-1 DAA (2).pptx design analysis and algoritham presentation
vaishnavbhavna17
 
UNIT I.pptxpython unit 1 engineering full unit completed
pavithrad67
 
Algorithms - Introduction to computer programming
baabtra.com - No. 1 supplier of quality freshers
 
Unit 2 - Complete (1).pptx
gogulram2
 
01 Introduction to analysis of Algorithms.pptx
ssuser586772
 
Flowcharting week 5 2019 2020
Osama Ghandour Geris
 
Problem Solving Techniques notes for Unit 1
SATHYABAMAMADHANKUMA
 
Programming Fundamentals lecture 3
REHAN IJAZ
 
Algorithm for computational problematic sit
Saurabh846965
 
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Fundamentals of Programming Lecture #1.pptx
Eyasu46
 
Flow charts week 5 2020 2021
Osama Ghandour Geris
 
PROBLEM SOLVING.pptx
sumathysenthilkumar
 
Algorithm.pdf
MIT,Imphal
 
Problem-solving and design 1.pptx
TadiwaMawere
 
Algorithmic problem sloving
Mani Kandan
 
Ad

Recently uploaded (20)

PPTX
PLANNING FOR EMERGENCY AND DISASTER MANAGEMENT ppt.pptx
PRADEEP ABOTHU
 
PDF
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
PDF
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
PDF
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
PPTX
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
PDF
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
PPTX
ESP 10 Edukasyon sa Pagpapakatao PowerPoint Lessons Quarter 1.pptx
Sir J.
 
PPTX
week 1-2.pptx yueojerjdeiwmwjsweuwikwswiewjrwiwkw
rebznelz
 
PPTX
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
PPTX
Practice Gardens and Polytechnic Education: Utilizing Nature in 1950s’ Hu...
Lajos Somogyvári
 
PPTX
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
PDF
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
PDF
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
DOCX
MUSIC AND ARTS 5 DLL MATATAG LESSON EXEMPLAR QUARTER 1_Q1_W1.docx
DianaValiente5
 
PPTX
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
PPTX
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
PPTX
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
PDF
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
PPT
21st Century Literature from the Philippines and the World QUARTER 1/ MODULE ...
isaacmendoza76
 
PLANNING FOR EMERGENCY AND DISASTER MANAGEMENT ppt.pptx
PRADEEP ABOTHU
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
COM and NET Component Services 1st Edition Juval Löwy
kboqcyuw976
 
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
ESP 10 Edukasyon sa Pagpapakatao PowerPoint Lessons Quarter 1.pptx
Sir J.
 
week 1-2.pptx yueojerjdeiwmwjsweuwikwswiewjrwiwkw
rebznelz
 
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
Practice Gardens and Polytechnic Education: Utilizing Nature in 1950s’ Hu...
Lajos Somogyvári
 
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
Genomics Proteomics and Vaccines 1st Edition Guido Grandi (Editor)
kboqcyuw976
 
MUSIC AND ARTS 5 DLL MATATAG LESSON EXEMPLAR QUARTER 1_Q1_W1.docx
DianaValiente5
 
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
How to Add a Custom Button in Odoo 18 POS Screen
Celine George
 
Supply Chain Security A Comprehensive Approach 1st Edition Arthur G. Arway
rxgnika452
 
21st Century Literature from the Philippines and the World QUARTER 1/ MODULE ...
isaacmendoza76
 
Ad

Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table

  • 1. For more updates join our newsletter at www.anjalitechnosoft.in A www.anjalitechnosoft.inwww.anjalitechnosoft.in
  • 2. For more updates join our newsletter at www.anjalitechnosoft.in Contents • Algorithm • Flowchart • Pseudo codes • Decision Table
  • 3. For more updates join our newsletter at www.anjalitechnosoft.in • A typical programming task can be divided into two phases: • Problem solving phase – produce an ordered sequence of steps that describe solution of problem – this sequence of steps is called an algorithm • Implementation phase – implement the program in some programming language Introduction
  • 4. For more updates join our newsletter at www.anjalitechnosoft.in4 • An algorithm is “a finite set of precise instructions for performing a computation or for solving a problem” – A program is one type of algorithm • All programs are algorithms • Not all algorithms are programs! – Directions to somebody’s house is an algorithm – A recipe for cooking a cake is an algorithm – The steps to compute the cosine of 90° is an algorithm What is an Algorithm
  • 5. For more updates join our newsletter at www.anjalitechnosoft.in5 • Input: what the algorithm takes in as input • Output: what the algorithm produces as output • Definiteness: the steps are defined precisely • Correctness: should produce the correct output • Finiteness: the steps required should be finite • Effectiveness: each step must be able to be performed in a finite amount of time • Generality: the algorithm should be applicable to all problems of a similar form Properties of Algorithm
  • 6. For more updates join our newsletter at www.anjalitechnosoft.in • First produce a general algorithm (one can use pseudocode) • Refine the algorithm successively to get step by step detailed algorithm that is very close to a computer language. • Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode is very similar to everyday English. Steps in Problem Solving
  • 7. For more updates join our newsletter at www.anjalitechnosoft.in Write an algorithm to determine a student’s final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks. Example Pseudocode: • Input a set of 4 marks • Calculate their average by summing and dividing by 4 • if average is below 50 Print “FAIL” else Print “PASS”
  • 8. For more updates join our newsletter at www.anjalitechnosoft.in • Detailed Algorithm • Step 1: Input M1,M2,M3,M4 Step 2: GRADE ← (M1+M2+M3+M4)/4 Step 3: if (GRADE < 50) then Print “FAIL” else Print “PASS” endif Example..
  • 9. For more updates join our newsletter at www.anjalitechnosoft.in • (Dictionary) A schematic representation of a sequence of operations, as in a manufacturing process or computer program. • (Technical) A graphical representation of the sequence of operations in an information system or program. Information system flowcharts show how data flows from source documents through the computer to final distribution to users. Program flowcharts show the sequence of instructions in a single program or subroutine. Different symbols are used to draw each type of flowchart. Flowchart
  • 10. For more updates join our newsletter at www.anjalitechnosoft.in Flowchart.. A Flowchart – shows logic of an algorithm – emphasizes individual steps and their interconnections – e.g. control flow from one action to the next
  • 11. For more updates join our newsletter at www.anjalitechnosoft.in Flowchart Symbols
  • 12. For more updates join our newsletter at www.anjalitechnosoft.in Step 1: Input M1,M2,M3,M4 Step 2: GRADE ← (M1+M2+M3+M4)/4 Step 3: if (GRADE <50) then Print “FAIL” else Print “PASS” endif PRINT “PASS” START Input M1,M2,M3,M4 GRADE←(M1+M2+M3+M4)/4 IS GRADE<5 0 PRINT “FAIL” STOP YN Example
  • 13. For more updates join our newsletter at www.anjalitechnosoft.in • A matrix representation of the logic of a decision • Specifies the possible conditions and the resulting actions • Best used for complicated decision logic Decision Table
  • 14. For more updates join our newsletter at www.anjalitechnosoft.in • A matrix representation of the logic of a decision • Specifies the possible conditions and the resulting actions • Best used for complicated decision logic Decision Table ..
  • 15. For more updates join our newsletter at www.anjalitechnosoft.in • Consists of three parts – Condition stubs • Lists condition relevant to decision – Action stubs • Actions that result from a given set of conditions – Rules • Specify which actions are to be followed for a given set of conditions
  • 16. For more updates join our newsletter at www.anjalitechnosoft.in • Indifferent Condition – Condition whose value does not affect which action is taken for two or more rules • Standard procedure for creating decision tables – Name the condition and values each condition can assume – Name all possible actions that can occur – List all rules – Define the actions for each rule – Simplify the table
  • 17. For more updates join our newsletter at www.anjalitechnosoft.in 9.17
  • 18. For more updates join our newsletter at www.anjalitechnosoft.in • PART 1. FRAME THE PROBLEM. – Identify the conditions (decision criteria). These are the factors that will influence the decision. • E.g., We want to know the total cost of a student’s tuition. What factors are important? – Identify the range of values for each condition or criteria. • E.g. What are they for each factor identified above? – Identify all possible actions that can occur. • E.g. What types of calculations would be necessary? • PART 2. CREATE THE TABLE. – Create a table with 4 quadrants. • Put the conditions in the upper left quadrant. One row per condition. • Put the actions in the lower left quadrant. One row per action. – List all possible rules. • Alternate values for first condition. Repeat for all values of second condition. Keep repeating this process for all conditions. • Put the rules in the upper right quadrant. – Enter actions for each rule • In the lower right quadrant, determine what, if any, appropriate actions should be taken for each rule. – Reduce table as necessary. Construction a Decision Table
  • 19. For more updates join our newsletter at www.anjalitechnosoft.in For any enquiry, post your doubt at Anjali Technosoft @ Clear your Doubts For any enquiry, post your doubt at Anjali Technosoft @ Clear your Doubts