0% found this document useful (0 votes)
13 views5 pages

UNIT I - Session 1

An algorithm is a finite set of unambiguous instructions that takes inputs, produces outputs, and terminates after a finite number of steps. It represents the core logic or solution to a problem independent of any specific programming language. Pseudocode is a way to describe an algorithm without using a specific programming language syntax. It can include common control structures and be more easily converted to an actual program than an informal description alone. Pseudocode allows describing the steps of an algorithm clearly without focusing on specific programming code.

Uploaded by

sb8515
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views5 pages

UNIT I - Session 1

An algorithm is a finite set of unambiguous instructions that takes inputs, produces outputs, and terminates after a finite number of steps. It represents the core logic or solution to a problem independent of any specific programming language. Pseudocode is a way to describe an algorithm without using a specific programming language syntax. It can include common control structures and be more easily converted to an actual program than an informal description alone. Pseudocode allows describing the steps of an algorithm clearly without focusing on specific programming code.

Uploaded by

sb8515
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

UNIT I

INTRODUCTION TO ALGORITM
DESIGN
Algorithms
A finite set of instructions or logic, written in order, to
accomplish a certain predefined task.

 Algorithm is not the complete code or program.

 It is just the core logic (solution) of a problem.

 Can be expressed either as an informal high level


description as pseudo code or using a flowchart.
Characteristics of an Algorithm
 Input
An algorithm should have 0 or more well defined inputs.
 Output
An algorithm should have 1 or more well defined outputs
 Unambiguous
Algorithm should be clear and unambiguous.
 Finiteness
Algorithms must terminate after a finite no. of steps.
 Feasibility
Should be feasible with the available resources.
 Independent
An algorithm should have step-by-step directions which should be
independent of any programming code.
Pseudo code
 It is one of the methods that could be used to represent an
algorithm.
 It is not written in a specific syntax
 Cannot be executed
 Can be read and understood by programmers who are familiar with
different programming languages.
 Transformation from pseudo code to the corresponding program
code easier.
 Pseudo code allows to include control structures such as WHILE,
IF-THEN-ELSE, REPEAT-UNTIL, FOR, and CASE, which are
available in many high level languages.
Difference between Algorithm and
Pseudocode
Algorithm Pseudo code
A finite set of instructions or logic, a generic way of describing an algorithm
written in order, to accomplish a without using any specific programming
certain predefined task. language-related notations.
It is just the core logic (solution) of a It is an outline of a program, written in a form
problem which can easily be converted into real
programming statements.
Easy to understand the logic of a Can be read and understood by programmers
problem who are familiar with different programming
languages.

Can be expressed either as an informal It is not written in a specific syntax. It allows to


high level description as pseudo code include control structures such as WHILE, IF-
or using a flowchart. THEN-ELSE, REPEAT-UNTIL, FOR, and
CASE, which are present in many high level
languages.

You might also like