Algorithms and Flowchart Theory

What is an Algorithm?
A computer is a useful tool for solving a great variety of problems. To make a computer do anything (i.e. solve a problem), you have to write a computer program.
A typical programming task can be divided into two phases:
  1. Problem solving phase
  • Produce an ordered sequence of steps that describe solution of problem.
  • This sequence of steps is called an algorithm
     2.  Implementation phase
  • Implement the program in some programming language.
Program Design consists of the steps a programmer should do before they start coding the program in a specific language. Proper program design helps other programmers to maintain the program in the future.

Algorithms
The sequence of steps to be performed in order to solve a problem by the computer is known as an
algorithm.
In mathematics, computer science, and related subjects, an algorithm is a finite sequence of steps
expressed for solving a problem.
An algorithm can be defined as “a process that performs some sequence of operations in order to solve a given problem”. Algorithms are used for calculation, data processing, and many other fields.




Advantages of Using Algorithm 
  •  Identification of the processes, major decision points, and variables necessary to solve the problem.
  • A benefit of the use of an algorithm comes from the improvement it makes possible.
  • It is independent of programming language.
It easy to first develop an algorithm, & then convert it into a flowchart &then into a computer program. 




Program Control Structure
Program statements that affect the order in which statements are executed, or that affect whether statements are executed, are called control structures. There are three control structures.

Sequence construct is a linear progression where one task is performed sequentially after another.
Selection (Decision) structure allows the program to make a choice between two alternate paths, whether it is true or false.
Repetition (Looping) causes an interruption in the normal sequence of processing and directs the system to loop back to a previous statement.
 


Flowchart
Flowchart is a graphical or symbolic representation of an algorithm. It is the diagrammatic representation of the step-by-step solution to a given problem.
A Flowchart is a type of diagram (graphical or symbolic) that represents an algorithm or process. Each step in the process is represented by a different symbol and contains a short description of the process step. The flow chart symbols are linked together with arrows showing the process flow direction.
A Flowchart describes what operations (and in what sequence) are required to solve a given problem.

Advantages of Using Flowcharts
The benefits of flowcharts are as follows:
Communication: Flowcharts are better way of communicating the logic of a system to all concerned.
Effective analysis: With the help of flowchart, problem can be analyzed in more effective way.
Proper documentation: Program flowcharts serve as a good program documentation, which is needed for various purposes.
Efficient Coding: The flowcharts act as a guide or blueprint during the systems analysis and program development phase.
Proper Debugging: The flowchart helps in debugging process.
Efficient Program Maintenance: The maintenance of operating program becomes easy with the help of flowchart. It helps the programmer to put efforts more efficiently on that part.


5 comments:

  1. Thank you sir....

    ReplyDelete
  2. Flowcharts can be used in many scenarios. For illustrating processes, workflows and step by step programming instructions. Good examples of flowcharts can be found in the diagram community of Creately.

    ReplyDelete
  3. Flowchart is a type of diagram that represents a workflow or a process of an activity. Recently I found out that there are different types of online platforms which we can use to draw flowcharts . And I've started using it as well. It tend to make my job easy and also gave an output as I expected.

    ReplyDelete