Algorithm Pseudopods Flow-chat

 

Algorithm :-
   
 An algorithm is a finite set of instructions (or) logics , written in order to accomplish a certain predefined task it is not the complete code or program which can be expressed either  as an informal high level description as a pseudo code or using a flowchart.
  >> From the data structure point of view, following a some important categories of algorithm.

>>Search :- algorithm to search an item in a data structure .

>>Sort :-algorithm to sort in a certain order

>>Insert :-algorithm to insert items in a data structure.

>>Update :- algorithm to update an existing items in a data structure.

>>Delete :- algorithm to delete an existing item from the data structure.
Unambiguous :-

Algorithm should be clear and unambiguous. Each of its step (or phase) and their input, output should be e clear must lead to only one meaning. Input :-An algorithm should have 0 or more well-defined inputs
>>Output :-An algorithm should have 1 or more well defined outputs ,and should match the desire output.

>>Finiteness :-Algorithm must terminate after a finite number of steps.

>>Feasibility :-should be feasible with the available resources .

>>Independent:- An algorithm should have step-by-step direction . Which should be independent by  any programming code.

Pseudocode Code

It is a simple way of writing programming code in English . Pseudo code is not an actual programming language .
It is should used short phraes to write code for programs before you actually create it in a special language.
Advantages and Disadvantages of pseudo code

Advantages:-
-> Can be easily on a processor.
-> Easily modified .
->Implementation structure concept well. 

Disadvantages :-
->It's note visual. 
->There is no accepted standard so it various .
->Widely from company to company.

Algorithm Vs Pseudocode
>>An Algorithm is a well define sequences of steps that provided a solution for a given problem.

>>While a pseudo is one of the method that can be used to represent an algorithm .

>>While are algorithm can be written in natural language .

>>Pseudocode is written in format that is closely related to high level programming language structures .

Pseudocode does not use a specific programs language syntax and  therefore could be understood by the programmers who are familiar with a different programming languages.

->Algorithm analysis 
Efficiency of an algorithm can be analyzed at two different stages, before implementation and after implementation.

>>A priori a  Analysis 
This is a theoretical analysis of an angorithm efficiency of an algorithm is measured by assuming that all other factors,for example process speed are constant and have no effect on the implementation.

>>A Posterior Analysis 
This is an emperical analysis of an algorithm the selected algorithm is implemented using programming language . This is then executed on target computer mission . In this analysis, actually statisties like running time and space required are collected flow-chart, example of algorithm ,flow chat,pseudocode (or) graphic.

Flow-Chat
A symbolic representation of an algorithm is called flow-chat.
A graphical symbols

Graphical symbol

>>Write an algorithm ,flow-chat,psuedocode on area of triangle.

Algorithm :-
Step1:-start
Step2:-input a,b,c
Step3:-s=(a+b+c)/2
Step4:-area=sqrt (s*(s-a)*s(s-b)*(s-c))
Step5:-print area
Step6:-stop

Flow-chat:-

Pseudocode:-
Step1:-start a programe.
Step2:-accept three sides of triangle 
Step3:-Compute 3 values,where S=(a+b+c)/2
Step4:-Compute area of triangle ,where area =sqrt(s*(s-a)*s(s-b)*(s-c))
Step5:-print area of triangle
Step6:-stop a procedure.

Comments

Popular posts from this blog

History of C language

Lab programs of C