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

Introduction to DS

The document provides an introduction to data structures, defining data, entities, and the distinction between data and information. It explains the concept of data structures as organized formats for efficient data access and manipulation, categorizing them into linear and non-linear types. Additionally, it discusses the implementation phases of data structures, including storage representation and algorithmic notation for operations.

Uploaded by

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

Introduction to DS

The document provides an introduction to data structures, defining data, entities, and the distinction between data and information. It explains the concept of data structures as organized formats for efficient data access and manipulation, categorizing them into linear and non-linear types. Additionally, it discusses the implementation phases of data structures, including storage representation and algorithmic notation for operations.

Uploaded by

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

Introduction to Data Structure

Dr. TINTU GEORGE


ASSISTANT PROFESSOR
SRI RAMAKRISHNA COLLEGE OF ARTS & SCIENCE
Introduction to Data structure
Data
• Data is a collection of facts, information, and statistics and this can be in
various forms such as numbers, text, sound, images, or any other format.
Entity
• An entity is the one which has certain attributes and it may assigned a values.
Eg) Entity : Employee
Attribute: Name DOB Gender Designation
Values: Ravi 30/12/2005 M Director
Information
• Information is defined as meaningful data or processed data.
• Difference between data and information
Aspect Data Information

Definition Raw, unprocessed facts and figures without context Processed, organized data that is meaningful and useful

Has meaning and context, making it understandable and


Meaning Has no inherent meaning on its own
actionable

Used for decision-making, problem-solving, or gaining


Purpose Serves as input for analysis and processing
insights

Presented in structured formats like reports, summaries,


Format Often in raw forms like lists, numbers, tables, or databases
or visualizations

Dependence Exists independently as raw material Created through processing of data; dependent on data

Generally not usable for decision-making without


Usability Directly usable for decision-making and communication
interpretation

Accuracy May contain errors, redundancies, or irrelevant entries Typically filtered, cleaned, and verified for accuracy

Random numbers, dates, words, images, etc., without specific


Examples Market trends, customer insights, financial reports, etc.
meaning

Final product of data processing; transformed to add


Transformation Raw material collected from various sources
value
Data type
• It is a term which refers the kind of data that appear for computation.
Eg) 34 - Int
Data - string
Built-in data type
• It is a set of built in data types that every programming language
contains.
Eg) In C it consist of int, float, char, double etc.
Abstract data type
• It is also called as user defined data types.
Eg) To process the date there is no data type in C
Definition of data structure
• A data structure is a way of organizing and storing data in a computer
so that it can be accessed and used efficiently.

• Data structures are designed to arrange data in a specific format,


enabling efficient processing for tasks like insertion, deletion,
searching, and updating. a computer program.
Concept of Data structure
• A digital computer can only work directly with basic data, represented as 0’s and
1’s (binary form). The computer handles this basic data automatically without
any extra effort from the user.

• Storage representation of user data: User data should be stored in such a way that
the computer can understand it.

• Retrieval of stored data: Data stored in a computer should be retrieved in such a


way that the user can understand it.

• Transformation of user data: Various operations which require to be performed


on user data so that it can be transformed from one form to another.
The user data structure implies in 3 ways
•Domain (𝒟): This is the range of values that the data may have. This domain is also termed data
object.
•Function (𝒻): This is the set of operations which may legally be applied to elements of the data
object.
•Axioms (𝒜): This is the set of rules with which the different operations belonging to 𝒻 can actually
be implemented.

• A data structure 𝐷 is a triplet, that is, 𝐷 = (𝒟, 𝒻, 𝒜) where

• 𝒟 is a set of data objects,

• 𝒻 is a set of functions, and

• 𝒜 is a set of rules to implement the functions.


Let us consider an example.

• We know that for the integer data type (int) in the C programming language, the
structure includes the following types:
• 𝒟 = {0, ±1, ±2, ±3, ...}

• 𝒻 = {+, -, *, /, %}

• 𝒜 = {A set of binary arithmetic's to perform addition, subtraction, division, multiplication,


and modulo operations.}

• It can be easily recognized that the triplet ( 𝒟, 𝒻, 𝒜) is nothing but an abstract data
type. Also, the elements in set 𝒟 are not necessarily from primitive data; it may
• Now the set 𝒟 of Complex. Let us specify the set of operations for the Complex data type, which are stated as:

𝒻 = { ⊕, ⊖, ⊗, ⊘, ∇, ‖ }

• ⊕ (Complex addition) ⊖ (Complex sub)


• ⊗ (Complex Multi) ⊘ (Complex Divide)

• ∇ (Complex Conjunction) ‖ (Complex Magnitude)


z1​=x1​+iy1​and
z2=x2+iy2 ​are two data of the Complex data type.
Overview of Data Structures
• There are several types of data structures, each suited to different types of applications.

• Some data structures are used more frequently than others due to their flexibility and
efficiency in handling various operations.
• These commonly used structures are known as fundamental or classic data
structures.
• Data structures can be classified into two broad categories:

• Linear Data Structure: A data structure in which data elements are arranged
sequentially or linearly. Examples are array, stack, queue, etc.

• Non-linear Data Structure: Data structures where data elements are not placed
sequentially or linearly. Examples are trees and graphs.
Linear Data Structure

Arrays:
Fixed-size collections of elements stored in
contiguous memory locations.
Queue: Follows First-In-First-Out (FIFO)
principle, where the first element added is the
first removed.
Stack: Follows Last-In-First-Out (LIFO)
principle, where the last element added is the first
removed.
Linked List: A series of connected nodes, where
each node contains data and a link to the next
node.
Non Linear Data Structure

Trees:
•Hierarchical structures with nodes connected by edges.
Graphs:
•Collections of nodes (vertices) and edges, which may
be directed or undirected.
Tables:
•Data structure used to store key-value pairs, often
implemented as hash tables.
Sets:
•Unordered collections of unique elements.
Implementation of Data Structures
The classic data structures as mentioned in two phases:

Phase 1: Storage representation: Here we will decide how a data structure can be

stored in a computer memory.

Phase 2: Algorithmic notation of various operations of the classic data structure: A

function for manipulating a data structure is expressed in terms of algorithms.

• The details of the operation can be understood easily and the reader can

implement them with the help of any programming language.

• For example, there are some basic constructs in the C language are

You might also like