Thursday, September 25, 2008

Algorithm in Programming Concept

When we learn about programming concept, we will often find word "algorithm". What is "algorithm"? Algorithm is sequenced logic steps which explain some tasks to do something or solve some problems. If we can make algorithm easily, we will be able to make program in programming language easily to. Because we just need to translate the algorithm to be written in program maker, for example Turbo Pascal.

Writing Algorithm
We can write algorithm using three ways:
  1. Write the algorithm in natural language (English, Melayu, or other human language), but this way is ambiguous generally
  2. Using flowchart. Flowchart is diagram that show us the logic sequence of a problem solving procedure. This is good visually, but difficult to make if the algorithm too long.
  3. Using pseudo-code. Pseudo-code is a way to write algorithm using the style of certain programming language, so this way is nearer to programming language. But its negative side is difficult to be understood by people that do not know about programming.

Main Aspect of Algorithm
Algorithm has some aspects that must be had:
  1. Finiteness, algorithm must be stopped after a finite number of steps.
  2. Definiteness, each step must be defined correctly and may not be confusing (ambiguous).
  3. Input, an algorithm has no or more than one input that is given to the algorithm before it is run.
  4. Output, an algorithm has one or more output, which is depended on the input.
  5. Effectiveness, every algorithm should be effective

No comments: