Monday 19 March 2018

Representation of Algorithm

There were various ways to represent an algorithm:-
   1. As a program
   2. As flowchart
   3. As pseud codes

    A program is set of instruction that are arranged in a sequence that helps computer to solve complex problem.Moreover, the process of writing a program is called Programming.

  A flowchart is nothing but a graphical representation of an algorithm. 
    Flowchart is a representation, primarily through the use of symbols, of the sequence of activities in a system ( process , operation , function or activity ).
  Flowchart uses various graphical symbols. All symbols are connected among themselves to indicate the flow of information and processing.

Flowchart Symbols
  Flowchart symbols are used to represent an algorithm : 

       The oval represents any terminal point in a program and generally contains words such as START , END.

Input or Output:-
      The parallelogram represents the input (via keyboard) or Output ( to screen) function.

   The rectangle represents the processing operations. For example a = x + y.

Flow direction:-
   Line or arrow represents the flow direction function-the flow of control.It represents logical flow of program.

Decision Making:-
    The diamond represents a decision.It represents logical command such as IF-ELSE-ENDIF.

  The circle represents a function in a flow line

Pre-defined Process:-
   The double-sided rectangle represents a named process such as a module or function or subroutine.
           A flowchart uses boxes of different shapes to denote different types of instructions. The use of symbols having standardized meaning makes it easier to communicate program logic through flowchart.This is because as long as every use the same basic shape other can readily interpret the logic.

Advantage of Flowchart
  1. Better communication :- A flowchart is a pictorial representation of a program therefore it is easier for programmer to explain the logic of a program to some other programmer.
  2. Proper program documentation :- Program documentation involves collecting organizing, storing and otherwise maintaining a complete historical record of program.
  3.Efficient coding :- Programmers find if very easy to write the corresponding program because the flowchart acts as a road map for them.
  4. Systematic debugging :- A flowchart is very helpful in detecting locating and removing mistakes (bugs) in program in systematic manner.
  5. Systematic testing :- Flowchart proves to be very helpful in designing the test data for systematic testing of program.

Pseudo Code
   Pseudo code is program-planning tool used for planning program logic.
"Pseudo" means limitation or false and "code"  refers instruction written in programming language.
Pseudo code there for is a limitation of actual computer instruction.These pseudo instruction are phrase written in ordinary natural language.
   Pseudo code uses a structure that resembles computer instruction.


Post a Comment

Popular Posts


AI (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (120) C (77) C# (12) C++ (82) Course (63) Coursera (181) Cybersecurity (24) data management (11) Data Science (97) Data Strucures (6) Deep Learning (10) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Pandas (3) PHP (20) Projects (29) Python (765) Python Coding Challenge (255) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)


Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses