Professional Documents
Culture Documents
Tahun
Versi
Pertemuan 01
Algorithm
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
Menerapkan prinsip prinsip dasar algoritma
menggunakan pseudo code dan flowchart
Outline Materi
History of Algorithm
Algorithm Definition
Algorithm Implementation
Examples of Algorithm
History of Algorithm
The word algorithm comes from the name of the 9th century
Persian mathematician Abu Abdullah Muhammad bin Musa alKhwarizmi.
The word algorism originally referred only to the rules of
performing arithmetic using Arabic numerals but evolved into
algorithm by the 18th century. The word has now evolved to
include all definite procedures for solving problems or
performing tasks.
The first case of an algorithm written for a computer was Ada
Byron's notes on the analytical engine written in 1842, for
which she is considered by many to be the world's first
programmer.
The lack of mathematical rigor in the "well-defined procedure"
definition of algorithms posed some difficulties for
mathematicians and logicians of the 19th and early 20th
centuries. This problem was largely solved with the description
of the Turing machine, an abstract model of a computer
formulated by Alan Turing.
Nowadays, a formal criterion for an algorithm is that it is a
procedure that can be implemented on a completely-specified
Turing machine or one of the equivalent formalisms.
Abu Abdullah
Muhammad
bin Musa alKhwarizmi
Algorithm Definition
Algorithm Implementation
Flowchart
a schematic representation of a process. They are commonly
used in business/economic presentations to help the audience
visualize the content better, or to find flaws in the process
Pseudocode
a generic way of describing an algorithm using the conventions
of programming languages. As the name suggests, pseudocode
generally does not actually use the syntax of any particular
language; there is no systematic standard form, although any
particular writer will generally borrow the appearance of a
particular language
depending on the writer, pseudocode may therefore vary widely
in style, from a near-exact imitation of a real programming
language at one extreme, to a description approaching formatted
prose at the other
6
A simple flowchart
for what to do if a
lamp doesn't work
Algorithm Examples
Temperature Conversion
Algorithm Examples
Temperature Conversion
Flowchart :
Start
Input
degreesF
degreesC =
(degreesF-32) *
5/9
Pseudocode:
Input degreesF
degreesC = (degreesF-32) * 5/9
Output degreesF and degreesC
Or
Convert degreesF
to degrees C
Output
degreesF
and
degrees C
End
11
Average Mark:
A student gains 45, 53, 58 marks in three tests.
Design an algorithm to input that information and
output their average mark.
12