Professional Documents
Culture Documents
Languages
Foundations
Technologies
CONTD..
Machines- Processing Power, memory capacity,
etc.. needed for efficient execution of the solution
Languages Choice of language , its constraints,
version,
Foundations- Model of the problem, methods to
be implemented, performance measure
Technologies web based, mobile based, cloud
based,
INTRODUCTION TO DS
Core fields that belong to the FOUNDATIONS deal
with design , analysis and implementation of
algorithms for efficient solutions.
An algorithm can be defined as a process,
procedure or a recipe[ A specific set of rules to
obtain a definite output from a set of specific
inputs]
Data structures deals with the design and
implementation of efficient algorithms.
Ds deals with the study of methods techniques
and tools to organize or structured data.
ALGORITHM
The word algorithm originates from the Arabic
word, algorism which is linked to the Arabic
mathematician Abu Jafar Mohammed Ibn Musa Al
Khwarizmi(825 AD), who designed the first
algorithm for adding two numbers.
987
76+
987
76+
(carry 1)
(carry 1)
3
63
987
76+
(carry
1)
1063
DEFINITION OF AN ALGORITHM:
STRUCTURE OF AN ALGORITHM:
Input Step
Assignment Step
Decision step
Repetitive Step
Output Step
CHARACTERISTICS OF AN ALGORITHM:
Finiteness Must terminate in a finite number of steps
Definiteness steps clearly defined or unambiguously
specified.
Generality generic to solve all problems of a particular
class
Effectiveness Keep it simple and sweet, basic enough
Input- Output An Algorithm must have certain initial
inputs and outputs may be intermediate and final.
An algorithm does not enforce any language. An
algorithm may be represented pictorial using flowcharts.
An algorithm encoded in a programming language is a
program.
DEVELOPMENT OF AN AGORITHM:
The steps involved in the development of an algorithm are:
Problem Statement- clear statement of the problem
Model Formulation mode for the solution is to be
formulated
Algorithm Design [role of DS begins here] right choice
of DS needs to be implemented for the efficiency of the
algorithm
Algorithm Correctness- Check for correctness
Implementation Write a code
Algorithm Analysis measuring the performance of the
algorithm in terms of time and space.
Program Testing
Documentation
CLASSIFICATION
EXAMPLE
Consider an ADT for the data structure of positive integers called
POSITIVE INTEGERS defined over a domain of integers Z +
supporting the operations of addition(ADD), Subtraction (SUB) and
check if positive (CHECK_POSITIVE). The ADT is defined as follows:
Operations
Addition of Positive integers INT1, INT2 into RESULT
ADD( INT1, INT2, RESULT)
Subtraction of Positive integers INT1, INT2 into RESULT
SUB( INT1, INT2, RESULT)
Check if a number INT! is positive INT1, INT2 into RESULT
CHECK_POSITIVE(INT1) (Boolean)
END