Chapter 1 Data Structures and Algorithms. Primary Goals Present commonly used data structures Present commonly used data structures Introduce the idea.

Slides:



Advertisements
Similar presentations
Chapter 1: INTRODUCTION TO DATA STRUCTURE
Advertisements

PROGRAMMING LANGUAGE (JAVA) UNIT 42 BY ROBERT BUTTERFIELD TELEPHONE Data Structures and Algorithms.
Data Structures.
The Efficiency of Algorithms Chapter 4 Copyright ©2012 by Pearson Education, Inc. All rights reserved.
COEN 352 Data structures and Algorithms R. Dssouli.
1 Problem Solving Abstraction Oftentimes, different real-world problems can be modeled using the same underlying idea Examples: Runtime storage, Undo operation.
Abstract Data Types (ADT)
Computer Science 2 Data Structures and Algorithms V section 2 Intro to “big o” Lists Professor: Evan Korth New York University 1.
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Coursenotes CS3114: Data Structures and Algorithms Clifford A. Shaffer Yang Cao Department of Computer Science Virginia Tech Copyright ©
Introduction - The Need for Data Structures Data structures organize data –This gives more efficient programs. More powerful computers encourage more complex.
1 A Introduction to Data Structures and Algorithm Analysis Data Structures Asst. Professor Kiran Soni.
Computer Science 2 Data Structures and Algorithms V Intro to “big o” Lists Professor: Evan Korth New York University 1.
DATA STRUCTURE Subject Code -14B11CI211.
Data Structures 1- Course Syllabus. 2- Introduction about Data Structures.
Data Structures Lecture-1:Introduction
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
WEEK 1 CS 361: ADVANCED DATA STRUCTURES AND ALGORITHMS Dong Si Dept. of Computer Science 1.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
Copyright © Wondershare Software Introduction to Data Structures Prepared by: Eng. Ahmed & Mohamed Taha.
Data Structures Lecture 1: Introduction Azhar Maqsood NUST Institute of Information Technology (NIIT)
Lecture No.01 Data Structures Dr. Sohail Aslam
ITEC 2620A Introduction to Data Structures
Computer Science Department Data Structures and Algorithms Lecture 1.
Java Collections An Introduction to Abstract Data Types, Data Structures, and Algorithms David A Watt and Deryck F Brown © 2001, D.A. Watt and D.F. Brown.
Dr. Engr. Sami ur Rahman Assistant Professor Department of Computer Science University of Malakand Data Structure: Introduction.
Chapter 10 A Algorithm Efficiency. © 2004 Pearson Addison-Wesley. All rights reserved 10 A-2 Determining the Efficiency of Algorithms Analysis of algorithms.
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
Prepared By Ms.R.K.Dharme Head Computer Department.
1 CSC 222: Computer Programming II Spring 2004 See online syllabus at: Course goals:
1 CS 350 Data Structures Chaminade University of Honolulu.
Chapter 9 (modified) Abstract Data Types and Algorithms Nell Dale John Lewis.
 DATA STRUCTURE DATA STRUCTURE  DATA STRUCTURE OPERATIONS DATA STRUCTURE OPERATIONS  BIG-O NOTATION BIG-O NOTATION  TYPES OF DATA STRUCTURE TYPES.
ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: ec2620m.htm Office: Tel 3049.
Binary Tree. Contiguous versus Linked List Insertion in Contiguous list needs a lot of move. For big chunks of records it is time consuming. Linked List.
Data Structures and Algorithms Lecture 1 Instructor: Quratulain Date: 1 st Sep, 2009.
Data Structures Lecture 1: Introduction. Course Contents Data Types   Overview, Introductory concepts   Data Types, meaning and implementation  
Data Abstaraction Chapter 10.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
1 Data Structures CSCI 132, Spring 2014 Lecture 1 Big Ideas in Data Structures Course website:
2 Obaid Ullah HOD Computer Science Dept. Superior University Sialkot Campus.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Elementary Data Structures Array Lists Array Lists Dale.
Chapter 3 The easy stuff. Lists If you only need to store a few things, the simplest and easiest approach might be to put them in a list Only if you need.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
1 A Practical Introduction to Data Structures and Algorithm Analysis Chaminade University of Honolulu Department of Computer Science Text by Clifford Shaffer.
© 2006 Pearson Addison-Wesley. All rights reserved15 A-1 Chapter 15 External Methods.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
Unit 1 - Introducing Abstract Data Type (ADT) Part 1.
Unit 1 - Introducing Abstract Data Type (ADT) Part 3 – Slides 1 to 11.
CPS120: Introduction to Computer Science Nell Dale John Lewis Abstract Data Types.
南昌大学自动化系胡凌燕 1 Charpter 1 The data structures and algorithms (p3) There are often many approaches to solving a problem. How do we choose between them? 
Data Structures Dr. Abd El-Aziz Ahmed Assistant Professor Institute of Statistical Studies and Research, Cairo University Springer 2015 DS.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
Advanced Data Structures Lecture 1
Introduction toData structures and Algorithms
Chapter 4 The easy stuff.
Object-Oriented Software Engineering Using UML, Patterns, and Java,
Lecture 2 of Computer Science II
Foundations of Computer Science
Data Structures: Introductory lecture
PAC Intro to “big o” Lists Professor: Evan Korth New York University
ITEC 2620M Introduction to Data Structures
Introduction to Data Structure
Presentation transcript:

Chapter 1 Data Structures and Algorithms

Primary Goals Present commonly used data structures Present commonly used data structures Introduce the idea of tradeoffs; reinforce the concept of costs and benefits associated with every data structure Introduce the idea of tradeoffs; reinforce the concept of costs and benefits associated with every data structure Measure the effectiveness of a data structure or algorithm Measure the effectiveness of a data structure or algorithm

Computer Programming Goals There are two, sometime conflicting: There are two, sometime conflicting: 1. To design an algorithm that is easy to understand, code and debug 2. To design an algorithm that make efficient use of the computer’s resources. This course is mainly concerned with goal number 2. This course is mainly concerned with goal number 2.

What is a data structure? In the most general, a data structure is any data representation and its associated operations. In the most general, a data structure is any data representation and its associated operations. More typically, a data structure is meant to be an organization or structuring for a collection of data items. More typically, a data structure is meant to be an organization or structuring for a collection of data items.

Efficiency and Cost A solution to a problem is efficient if it solves the problem within the required resource constraints A solution to a problem is efficient if it solves the problem within the required resource constraints Examples: total space to store data, time allowed to perform Examples: total space to store data, time allowed to perform The cost of a solution is the amount of resources that the solution consumes. The cost of a solution is the amount of resources that the solution consumes. Often the cost is measured in terms of one key resource Often the cost is measured in terms of one key resource

Efficiency and Cost A solution can also be efficient if it requires fewer resources than other know solutions A solution can also be efficient if it requires fewer resources than other know solutions When solving problems, you will want to analyze the different data structures available and choose accordingly. When solving problems, you will want to analyze the different data structures available and choose accordingly. You want to make sure you choose both efficient and cost effective solutions You want to make sure you choose both efficient and cost effective solutions Conversely, you don’t need a sledge hammer to put in a thumbtack Conversely, you don’t need a sledge hammer to put in a thumbtack

Choosing your Data Structure You should follow these steps You should follow these steps 1. Analyze your problem to determine the resource constraints that any solution must meet 2. Determine the basic operations that must be supported and quantify the resource constraints for each operation 3. Select the data structure that best meets these requirements

Operational Questions When choosing data structures, here are some questions to ask. When choosing data structures, here are some questions to ask. Are all data items inserted into the data structure at the beginning, or are the insertions interspersed with other operations? Are all data items inserted into the data structure at the beginning, or are the insertions interspersed with other operations? Can data items be deleted? Can data items be deleted? Are all data items process in some well-defined order, or is search for specific data items allowed? Are all data items process in some well-defined order, or is search for specific data items allowed?

Abstract Data Types and Data Structures Type a collection of values Type a collection of values A simple type has no subparts A simple type has no subparts An aggregate type or composite type contains several pieces of information An aggregate type or composite type contains several pieces of information A data item is a piece of information or a record whose value is drawn from a type. A data item is a piece of information or a record whose value is drawn from a type. It is said to be a member of a type It is said to be a member of a type A data type is a type together with a collection of operations to manipulate the type. A data type is a type together with a collection of operations to manipulate the type.

Abstract Data Types and Data Structures There is a distinction between the logical concept of a data type and its physical implementation There is a distinction between the logical concept of a data type and its physical implementation Example: Trees can be implemented both in a linked fashion or an array based fashion Example: Trees can be implemented both in a linked fashion or an array based fashion An Abstract Data Type (ADT) is the realization of a data type as a software component. An Abstract Data Type (ADT) is the realization of a data type as a software component. An ADT does not specify how the data type is implemented An ADT does not specify how the data type is implemented

Abstract Data Types and Data Structures A data structure is the implementation for an ADT A data structure is the implementation for an ADT ADT’s allow programmers to manage complexity through abstraction ADT’s allow programmers to manage complexity through abstraction Data items have both a logical and a physical form Data items have both a logical and a physical form The definition of the data item in terms of an ADT is the logical form The definition of the data item in terms of an ADT is the logical form The implementation of the data item within the data structure is its physical form The implementation of the data item within the data structure is its physical form