ad

ALGORITHMS


ALGORITHMS
An algorithm is a step-by-step method/procedure of solving a problem or accomplishing a task. For an algorithm to satisfy its purpose, it should have the following characteristics.

  •      Preciseness/Unambiguous – the individual steps of an algorithm must have only one meaning specifying the exact action to be taken.
  •      Effectiveness – all instructions contained in an algorithm must be able to perform/execute an action. None of its instructions should be redundant.
  •      Finiteness – in an algorithm, there must be a point in which all operations must be able to be brought to a close.Even human beings close at the end of a day’s work. Simply put, an algorithm must be able to terminate operations somewhere in the program.
  •         As a matter of good programming habit, an algorithm must begin with instructions to accept inputs which are to be processed and must produce one or more outputs as desired.



PSEUDOCODES
Pseudo code is a narrative description of the steps involved in executing a computer program in the order in which they will be executed. It is a series of English-like statements used in representing an algorithm in a structured version. Pseudo code is written like an outline, with indentation showing the basic programming mechanisms of structured programming. Each structured mechanism in a program has its own level of indentation. The beginning and end of the mechanism are shown at one level of indentation while the steps within the mechanism are shown at the next level. It usually consists of the three main control structures: sequence, selection and iteration; since any programming problem can be accomplished by these three control structures.

Post a Comment

0 Comments