Algorithms and Flowcharts

Algorithm and  Flowchart are the two basic terms which aid the development of a software package conveniently.

Algorithm: Is a step wise set of finite instructions written to solve a problem, it will be easier to code a program after writing a well prepared algorithm. An algorithm is an effective method that can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing “output”and terminating at a final ending state. An algorithm is written in simple language and must be efficient and limited to a number of steps. An algorithm is a well-defined procedure that allows a computer to solve a problem. Another way to describe an algorithm is a sequence of unambiguous instructions. The use of the term ‘unambiguous’ indicates that there is no room for subjective interpretation. Every time you ask your computer to carry out the same algorithm, it will do it in exactly the same manner with the exact same result.

Flow chart: Is the diagrammatic representation of an algorithm with the help of symbols carrying certain meanings. Using flowchart, we can easily understand a program. A flowchart is a type of diagram that represents an algorithm, workflow or process, showing the steps as boxes of various kinds, and their order by connecting them with arrows. This diagrammatic representation illustrates a solution model to a given problem. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields. Flow chart is not language specific. The designing of flow chart is not simple and it is time consuming.

Flowcharts are used in designing and documenting simple processes or programs. Like other types of diagrams, they help visualize what is going on and thereby help understand a process, and perhaps also find flaws, bottlenecks, and other less-obvious features within it. There are many different types of flowcharts, and each type has its own repertoire of boxes and notational conventions. The two most common types of boxes in a flowchart are:

  • a processing step, usually called activity, and denoted as a rectangular box
  • a decision, usually denoted as a diamond.

Functions of Algorithms

y=2x

In this example, the relationship of y to x is that y is twice as much as the value assigned to x, most math equations are not simple. This is why math functions are referred to as expressions while computer functions are often called procedures or sub-routines. Computer functions are similar to maths functions in that they may reference parameters which are inputted into  this function.  If the example above was written as a computer function, ‘x’ would be the resulting output value. It might look like this – function double (x), y=2*x, return y. The above example is a very basic function…

Read more below-