Professional Documents
Culture Documents
Introduction To Algorithm
Introduction To Algorithm
Introduction to Algorithm
Session 01
Learning Objectives
At the end of this meeting is expected that students will
be able to explain how does the algorithm work
Bina Nusantara 2
Outline
• Definition of Algorithm
• Programming Language
• Algorithm Expression
• Pseudocode
• Flowchart
• NS Diagram
Algorithm Definition
• What is an algorithm?
A set of detailed, unambiguous and ordered
instructions developed to describe the progress
necessary to produce the desired output from a given
input
– Pseudocode
– Flowchart
– NS Diagram
Input Number
Number % 2
1 0
Print “Odd Print “Even
Number” Number”
END
Bina Nusantara University 15
NS Diagram
• NS Diagram is a graphical illustration of structured
progamming design.
• Its method is by drawing a table for illustrating an
algorithm.
• Founded in 1972 by Isaac Nassi & Ben Shneiderman.
• Known as structograms.
Process
• Process notation :
Condition False
True
• Selection notation:
• Loop notation :
Unfulfilled
– WHILE Condition Process
– DO-WHILE Process
Unfulfilled
Condition
Bina Nusantara University 17
NS Diagram
Example of NS Diagram to determine odd-even numbers
Insert number
Number %Equal
2 to 1
Equal to 0