Introduction to Data Structures and Algorithms - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Introduction to Data Structures and Algorithms

Description:

time to perform each basic operation. programming effort ... Often these two goals conflict. 16. Introduction to Data Structures and Algorithms ... – PowerPoint PPT presentation

Number of Views:58
Avg rating:3.0/5.0
Slides: 17
Provided by: rdnec
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Data Structures and Algorithms


1
Introduction to Data Structures and Algorithms
2
Areas of Focus
  • How do we represent data internally for use with
    our programs?
  • How do we select the best representation for our
    problem?
  • How do we measure the efficiency of our algorithm
    or solution?

3
Terms
  • type
  • simple type
  • composite type
  • data type
  • data item
  • efficiency
  • resource constraints
  • storage space
  • time
  • cost
  • file structure

4
Abstract Data Type
  • ADT - a collection of data together with a
    defined set of operations to manipulate the data.
  • type of data
  • set of operations

5
Data Structures
  • data structure organization or structure for the
    collection of data stored in an ADT.
  • data abstraction i.e. encapsulation
  • data item forms
  • logical
  • physical

6
Selecting a Data Structure
  • Analyze the problem to determine constraints.
  • Determine basic operations quantify resource
    constraints.
  • Select the data structure.

7
Ask Questions
  • Is all data inserted into the data structure
  • at the beginning?
  • or interspersed?
  • Can data be deleted?
  • Is all data processed in
  • some well-defined order?
  • or is random access allowed?

8
Cost and Benefits
  • Each data structure has costs and benefits.
  • Seldom is one data structure better than another
    in all situations.
  • There are many different data structures.

9
Data Structure Requirements
  • A data structure requires
  • space for each data item it stores
  • time to perform each basic operation
  • programming effort
  • Selecting the right data structure requires
    careful analysis of the problem.

10
Problems
  • problem a task to be performed.
  • The problem definition
  • should not include any constraints on how the
    problem should be solved.
  • Should include constraints on the resources that
    may be used.
  • constraints - stated or implied.

11
Viewed as Functions
  • Problems can be viewed as functions
    (mathematical)
  • function - a matching between inputs and outputs.
  • input - can be a single value or a collection.
  • parameters - the input(s) to the function.
  • A particular input must always result in the same
    output.

12
Algorithms
  • algorithm a process followed to solve a problem.
  • Takes the input and transforms it to the output.
  • Must be well defined.

13
Algorithms Properties
  • Must possess the following properties
  • be correct
  • composed of concrete steps
  • have no ambiguity
  • composed of a finite number of steps
  • Must terminate

14
Programs
  • program - an implementation of an algorithm or a
    solution to a problem using a computer
    programming language.

15
Choosing an Algorithm
  • A problem can have many algorithms.
  • Our goal is to choose an algorithm
  • simplicity - easy to understand, code, and debug.
  • efficient - makes efficient use of resources.
  • Often these two goals conflict.

16
Course Goals
  • Learn the commonly used data structures,
    algorithms, and algorithm design techniques.
  • Learn how to measure the effectiveness and
    efficiency of a data structure or algorithm.
  • Study the trade-offs between the conflicting
    goals of simplicity and efficiency.
Write a Comment
User Comments (0)
About PowerShow.com