SlideShare a Scribd company logo
C-1
Introduction
- Programis written in order to solvea problem.
- Solution to a problem consists of two things
 Data structure
 Algorithm
- Data Structure - the way data are organized in a computer’s memory
- Algorithm- sequence of computational steps to solve a problem
- The first step to solvea problem is obtaining an abstractview (model) of
the problem.
- A Model defines an abstractview to the problem.
- Properties of a problem
 Affected data
 Operations involved
- Data structurecan be defined by well-defined entities created by
abstraction
- Data structures modelthe static part of the world. They are unchanging
while the world is changing.
- Quality of a data structureis related to its ability to successfully modelthe
characteristics of the world
Abstract DataTypes
- ADT is an abstraction of data structure
- ADTs specify
 What can be stored in them
 What operations can be done (on/by them)
- Data structure is a language constructthat a programmer defined in order
to implement an ADT.
- Formalized and standard ADTs: - Stacks, Queues, Trees, …
Abstraction
- Abstraction is a process of classifying characteristics as relevant and
irrelevant and ignoring the irrelevantones.
Algorithms
- Algorithm is a well-defined computational procedurethat takes some value
or a set of values as input and produces somevalue or a set of values as
output.
- Algorithms model the dynamic part of the world
- Algorithms transform data structures fromone state to another state in
two ways
 Changing the value held by a data structure
 Changing the data structureitself
- The quality of an algorithm is related to its ability to successfully simulate
the changes in the world.
- Independentof any particular world model, the quality of data structure
and algorithms is determined by their ability to work together well
Properties of anAlgorithm
1. Finiteness: mustcomplete after a finite number of steps.
2. Definiteness: Each step mustbe clearly defined
3. Sequence: Each step must havea unique defined preceding and succeeding
step
4. Feasibility: Itmustbe possibleto performeach instruction.
5. Correctness: Itmustcomputecorrect answer for all possiblelegal inputs.
6. Language Independence: Itmustnotdepend on any one programming
language.
7. Completeness: Itmustsolvethe problem completely.
8. Effectiveness: Itmustbepossibleto performeach step exactly and in a
finite amount of time.
9. Efficiency: Itmustsolvewith the least amount of computational resources
such as time and space.
10.Generality: Algorithmshould bevalid on all possibleinputs.
11.Input/Output: There mustbe a specified number of input values, and one
or moreresult values.
AlgorithmAnalysis
- Itis the process of determining the amount of computing time and storage
spacerequired by differentalgorithms.
- Itis a process of predicting the resourcerequirementof algorithms in a
given environment.
- To classify somedata structures and algorithms as good, we need precise
ways of analyzing them in terms of resourcerequirement.
- The main resources are:
 Running Time: usually treated as the most important
 Memory Usage
 Communication Bandwidth
- approaches to measurethe efficiency of algorithms:
 Empirical: Programming competing algorithms and trying them
on different instances.
 Theoretical: Determining the quantity of resources required
mathematically by each algorithm.
- Clock-time is difficult to useas a consistentmeasureof an algorithm’s
efficiency becauseit varies.
- Clock-time can vary based on:
 Specific processor speed
 Currentprocessor load
 Specific data for a particular run of the program
 InputSize
 InputProperties
 Operating Environment
- We can analyzean algorithm according to the number of operations
required.
Complexity Analysis
- Itis the systematic study of the costof computation, measured either in
time units or in operations performed, or in the amount of storage space
required.
- Two things to consider:
 Time Complexity: Determinethe approximate number of
operations required to solvea problemof size n.
 Space Complexity: Determinethe approximate memory
required to solvea problem of sizen.
- Complexity analysis involves two distinct phases:
o AlgorithmAnalysis: is the process of finding the computational
complexity of algorithms – the amount of time, storage, or other
resources needed to execute them.
o Order of Magnitude Analysis: to determine the general complexity
category to which it belongs.
-
Analysis Rules
- We assumean arbitrary time unit.
- Execution of one of the following operations takes time 1:
 AssignmentOperation
 Single Input/outputOperation
 Single Boolean Operations
 Single Arithmetic Operations
 Function Return
- Running time of a selection statement (if, switch) is the time for the
condition evaluation + the maximum of the running times for the individual
clauses in the selection.
- Loops: Running time for a loop is equal to the running time for the
statements inside the loop * number of iterations.
- The total running time of a statement inside a group of nested loops is the
running time of the statements multiplied by the productof the sizes of all
the loops. For nested loops, analyzeinside out.
- Always assumethat the loop executes the maximum number of iterations
possible.
- Running time of a function call is 1 for setup + the time for any parameter
calculations + the time required for the execution of the function body.
-
Formalapproach to analysis
Measures of times
Asymptotic Analysis

More Related Content

PPTX
Introduction to algorithn class 1
PPTX
Algorithm and Data Structures - Basic of IT Problem Solving
PPTX
Multi layered perceptron (mlp)
PDF
Design & Analysis of Algorithms Lecture Notes
PPTX
Chapter 09 design and analysis of algorithms
PPTX
Dynamic Programming
PPT
Daa presentation 97
PPTX
Kompleksitas Algoritma
Introduction to algorithn class 1
Algorithm and Data Structures - Basic of IT Problem Solving
Multi layered perceptron (mlp)
Design & Analysis of Algorithms Lecture Notes
Chapter 09 design and analysis of algorithms
Dynamic Programming
Daa presentation 97
Kompleksitas Algoritma

What's hot (17)

PPT
Amortized analysis
PPTX
Data Structures - Lecture 1 [introduction]
PDF
1.1 the introduction of design and analysis of algorithm
PPT
Aad introduction
PDF
Algorithmic problem solving
PPTX
Algorithm1
PDF
Lecture 2 role of algorithms in computing
PPT
Fundamental of Algorithms
PDF
Fundamentals of data structures ellis horowitz & sartaj sahni
PPT
Cupdf.com introduction to-data-structures-and-algorithm
PPTX
Daa unit 1
PPTX
Data structure introduction
PDF
Design and analysis of algorithms
PDF
Parallel Algorithms
PPTX
Pengenalan Algoritma
PDF
Lecture 1 objective and course plan
PPT
Introduction to data structures and Algorithm
Amortized analysis
Data Structures - Lecture 1 [introduction]
1.1 the introduction of design and analysis of algorithm
Aad introduction
Algorithmic problem solving
Algorithm1
Lecture 2 role of algorithms in computing
Fundamental of Algorithms
Fundamentals of data structures ellis horowitz & sartaj sahni
Cupdf.com introduction to-data-structures-and-algorithm
Daa unit 1
Data structure introduction
Design and analysis of algorithms
Parallel Algorithms
Pengenalan Algoritma
Lecture 1 objective and course plan
Introduction to data structures and Algorithm
Ad

Similar to Data Abstraction (Chapter 1) (20)

PPTX
Chapter 1 Data structure.pptx
PPTX
Introduction to Algorithms Introduction to Algorithms.pptx
PPTX
Introduction to Data Structure and algorithm.pptx
PDF
Algorithm Analysis.pdf
PPT
assignment character education assignment
PDF
Introduction to data structure and algorithm
PPTX
Algorithm analysis in fundamentals of data structure
PPT
Introduction to data structures and Algorithm
PPTX
Chapter 1 - Introduction to data structure.pptx
PPTX
algorithmanalysisinfundamentalsofdatastructure-190810085243.pptx
PPTX
Intro to Data Structure & Algorithms
PPTX
Unit 1, ADA.pptx
PDF
Introduction to Algorithms Complexity Analysis
PDF
Data structures and algorithms Module-1.pdf
PPTX
Chapter one Department Computer Science
PDF
lecture on preliminary on data structore
PPTX
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
PPTX
Introduction to databae eChapter 1-.pptx
PPTX
FALLSEM2024-25_BSTS301P_SS_VL2024250100685_2024-07-26_Reference-Material-I.pptx
Chapter 1 Data structure.pptx
Introduction to Algorithms Introduction to Algorithms.pptx
Introduction to Data Structure and algorithm.pptx
Algorithm Analysis.pdf
assignment character education assignment
Introduction to data structure and algorithm
Algorithm analysis in fundamentals of data structure
Introduction to data structures and Algorithm
Chapter 1 - Introduction to data structure.pptx
algorithmanalysisinfundamentalsofdatastructure-190810085243.pptx
Intro to Data Structure & Algorithms
Unit 1, ADA.pptx
Introduction to Algorithms Complexity Analysis
Data structures and algorithms Module-1.pdf
Chapter one Department Computer Science
lecture on preliminary on data structore
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
Introduction to databae eChapter 1-.pptx
FALLSEM2024-25_BSTS301P_SS_VL2024250100685_2024-07-26_Reference-Material-I.pptx
Ad

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPT
Teaching material agriculture food technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Spectroscopy.pptx food analysis technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Teaching material agriculture food technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
Assigned Numbers - 2025 - Bluetooth® Document
Network Security Unit 5.pdf for BCA BBA.
Advanced methodologies resolving dimensionality complications for autism neur...
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Encapsulation_ Review paper, used for researhc scholars
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Weekly Chronicles - August'25-Week II
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectroscopy.pptx food analysis technology
Dropbox Q2 2025 Financial Results & Investor Presentation

Data Abstraction (Chapter 1)

  • 1. C-1 Introduction - Programis written in order to solvea problem. - Solution to a problem consists of two things  Data structure  Algorithm - Data Structure - the way data are organized in a computer’s memory - Algorithm- sequence of computational steps to solve a problem - The first step to solvea problem is obtaining an abstractview (model) of the problem. - A Model defines an abstractview to the problem. - Properties of a problem  Affected data  Operations involved - Data structurecan be defined by well-defined entities created by abstraction - Data structures modelthe static part of the world. They are unchanging while the world is changing. - Quality of a data structureis related to its ability to successfully modelthe characteristics of the world Abstract DataTypes - ADT is an abstraction of data structure - ADTs specify  What can be stored in them  What operations can be done (on/by them) - Data structure is a language constructthat a programmer defined in order to implement an ADT. - Formalized and standard ADTs: - Stacks, Queues, Trees, … Abstraction - Abstraction is a process of classifying characteristics as relevant and irrelevant and ignoring the irrelevantones.
  • 2. Algorithms - Algorithm is a well-defined computational procedurethat takes some value or a set of values as input and produces somevalue or a set of values as output. - Algorithms model the dynamic part of the world - Algorithms transform data structures fromone state to another state in two ways  Changing the value held by a data structure  Changing the data structureitself - The quality of an algorithm is related to its ability to successfully simulate the changes in the world. - Independentof any particular world model, the quality of data structure and algorithms is determined by their ability to work together well Properties of anAlgorithm 1. Finiteness: mustcomplete after a finite number of steps. 2. Definiteness: Each step mustbe clearly defined 3. Sequence: Each step must havea unique defined preceding and succeeding step 4. Feasibility: Itmustbe possibleto performeach instruction. 5. Correctness: Itmustcomputecorrect answer for all possiblelegal inputs. 6. Language Independence: Itmustnotdepend on any one programming language. 7. Completeness: Itmustsolvethe problem completely. 8. Effectiveness: Itmustbepossibleto performeach step exactly and in a finite amount of time. 9. Efficiency: Itmustsolvewith the least amount of computational resources such as time and space.
  • 3. 10.Generality: Algorithmshould bevalid on all possibleinputs. 11.Input/Output: There mustbe a specified number of input values, and one or moreresult values. AlgorithmAnalysis - Itis the process of determining the amount of computing time and storage spacerequired by differentalgorithms. - Itis a process of predicting the resourcerequirementof algorithms in a given environment. - To classify somedata structures and algorithms as good, we need precise ways of analyzing them in terms of resourcerequirement. - The main resources are:  Running Time: usually treated as the most important  Memory Usage  Communication Bandwidth - approaches to measurethe efficiency of algorithms:  Empirical: Programming competing algorithms and trying them on different instances.  Theoretical: Determining the quantity of resources required mathematically by each algorithm. - Clock-time is difficult to useas a consistentmeasureof an algorithm’s efficiency becauseit varies. - Clock-time can vary based on:  Specific processor speed  Currentprocessor load  Specific data for a particular run of the program  InputSize  InputProperties  Operating Environment - We can analyzean algorithm according to the number of operations required.
  • 4. Complexity Analysis - Itis the systematic study of the costof computation, measured either in time units or in operations performed, or in the amount of storage space required. - Two things to consider:  Time Complexity: Determinethe approximate number of operations required to solvea problemof size n.  Space Complexity: Determinethe approximate memory required to solvea problem of sizen. - Complexity analysis involves two distinct phases: o AlgorithmAnalysis: is the process of finding the computational complexity of algorithms – the amount of time, storage, or other resources needed to execute them. o Order of Magnitude Analysis: to determine the general complexity category to which it belongs. - Analysis Rules - We assumean arbitrary time unit. - Execution of one of the following operations takes time 1:  AssignmentOperation  Single Input/outputOperation  Single Boolean Operations  Single Arithmetic Operations  Function Return - Running time of a selection statement (if, switch) is the time for the condition evaluation + the maximum of the running times for the individual clauses in the selection. - Loops: Running time for a loop is equal to the running time for the statements inside the loop * number of iterations. - The total running time of a statement inside a group of nested loops is the running time of the statements multiplied by the productof the sizes of all the loops. For nested loops, analyzeinside out.
  • 5. - Always assumethat the loop executes the maximum number of iterations possible. - Running time of a function call is 1 for setup + the time for any parameter calculations + the time required for the execution of the function body. - Formalapproach to analysis Measures of times Asymptotic Analysis