0% found this document useful (0 votes)
18 views

Data Structures - Algorithms- Chapter 1.Pptx

Uploaded by

kaviikaviya2007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Data Structures - Algorithms- Chapter 1.Pptx

Uploaded by

kaviikaviya2007
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CORE COURSE –V →DATA

STRUCTURES &
ALGORITHMS(16SCCCA5)

Class: III BCA ‘B’

BY
R.INDRA,
ASSISTANT PROFESSOR ,DEPT OF CS,
SHRIMATI INDIRA GANDHI COLLEGE,TRICHY-2
1.INTRODUCTION
• OVERVIEW
• COMPUTER SCIENCE IS A STUDY OF ALGORITHMS
• 4 DISTINCT AREAS
• (I) MACHINE FOR EXECUTING ALGORITHMS
• Smallest pocket calculator to largest general purpose digital
computer.
• (II)LANGUAGE FOR DESCRIBING ALGORITHM
• Languages designed for problem solving. Two phases of this
area: 1.Language Design –syntax and semantics of a language.
• 2. Translation – more basic set of commands.
• (III)FOUNDATIONS OF ALGORITHMS
• Minimum number of operations necessary for any algorithm
which performs a certain functions.
• (IV)ANALYSIS OF ALGORITHMS
• Founded by charles Babbage in 1830.
• An algorithm is measured in terms of computing time and space
for processing.
DATA STRUCTURE-DEFINITION
• ALGORITHM
• An algorithm is a finite set of instructions to
accomplish a particular task.
• Algorithm must satisfy the following criteria:
• (I)INPUT: zero or more quantities which are externally
supplied.
• (II)OUTPUT: at least one quantity is produced.
• (III)DEFINITENESS: each instruction must be clear and
unambiguous.(without clear).
• (IV)FINITENESS: tracing the algorithm for all cases the
algorithm will terminate after finite number of steps.
• (V)EFFECTIVENESS: every instruction must be
sufficient as in (III).
DATA STRUCTURE
• DEFINITION:
• A collection of data elements whose
organization is characterized by accessing
functions that are used to store and retrieve
individual data elements.
• OR
• The logical or mathematical model of a
particular organization of data is called DATA
STRUCTURE.
Classification of Data Structure
CLASSIFICATION OF DATA STRUCTURE
• The data structure are classified in to 2 categories.
• 1.Primitive data structures.
• Data structures that are directly operated upon
by machine level instructions.
• 2. Non-Primitive data structures.
• Data structures that are composed of primitive
data structures.
• Further classified as
• (i)Linear data structure (ii) non-linear data
structure.
Linear data structure
• Definition:
• A data structure is said to be linear if there is a
adjacency relationship between elements.
• Different linear data structure is
array,string,stack,queues and linked lists.
Non – linear data structure
• Definition
• A data structure in which insertion and
deletion is not possible in a linear fashion.
• Different non linear data structures are trees
and graphs.
Operations of non-primitive data
structure
• Common operations are
• 1.Traversing: visiting each element exactly once.
• 2. Sorting: arranging the elements in some logical
order.ie ascending or descending or alphabetical order
depending on the data item present.
• 3.Merging:process of combining the elements in two
different structure into one structure.
• 4.Searching: finding the location of an element, which
satisfies the given condition.
• 5.Insertion: adding a new element to the structure.
Identifying the position where the new element is to
be inserted.
• 6.Deletion: removing an item from the structure.
HOW TO CREATE PROGRAMS
• There are 5 phases
• 1.Requrements – information you are given(I/P)
and what results you are to produce(o/P).
• 2.Design – Each object there will be some basic
operation to perform on it.
• 3.Analysis – think of another algorithm. Compare
these two methods.
• 4.Coding – complete version of your program
• 5.Verification – consist of 3 aspects.
• Program proving, testing and debugging.
How to analyze programs
• To Judge a program
• 1.does it do what we want it to do?
• 2.does it work correctly according to the original
specification of the task?
• 3.is there documentation which describes how to
use it and how it works?
• 4.are subroutines created in such a way that they
perform logical sub functions?
• 5.is the code readable?

• *****************************

You might also like