Download presentation
Presentation is loading. Please wait.
Published byGladys Shelton Modified over 9 years ago
1
CSE-C1 Algs & DS 1 CSE–C1 Algorithms and Data Structures 1 lecturer Dr.Matthew Montebello office CB 409 e-mail mmont@cs.um.edu.mt credit 1 lectures 10 assignment 1(50%) test 1 (50%) webpage http://staff.um.edu.mt/mmon1/lectures/dip_cs_edu
2
CSE-C1 Algs & DS 1 Lecture Schedule 1. Introduction to CSE-C1. 2. Abstract Data Types (ADTs) 3. Lists. 4. Stacks. 5. Queues. 6. Deques. 7. Trees. 8. Sets. 9. Past Papers & other Queries. 10. Closure – Pre-Test Revision. Assign. Out Assign. In
3
CSE-C1 Algs & DS 1 Introduction to CSE-C1 What will happen during lectures. Practice makes perfect. Web pages of interest: http://pascal.about.com/compute/ pascal/library/weekly/aa011901.htm http://taoyue.com/tutorials/pascal http://www.cs.virginia.edu/~mab8e/ structures.html http://allserv.rug.ac.be/~vfack/files/ algori.html Use of Compiler. Other procedures.
4
CSE-C1 Algs & DS 1 2. Abstract Data Types Today’s lecture: 1.Overview of schedule 2.Recall of last lecture 3.General introd. to DS & Algs. 4.DS in everyday life 5.Introduction to ADTs 6.Overview of ADTs covered 7.Normal processes of an ADT 8.Closure – Summary 9.Next Lecture 10.Questions.
5
CSE-C1 Algs & DS 1 General Introd. to DS & Algs A Data Structure is an Abstract Data Type that has three following components: 1.Operations: Specifications of external appearance of a data structure 2.Storage Structures: Organizations of data implemented in lower level data structures 3.Algorithms: Description on how to manipulate information in the storage structures to obtain the results defined for the operations
6
CSE-C1 Algs & DS 1 General Introd. to DS & Algs An algorithm is a finite set of instructions chosen from a finite, fixed set of instructions. Every algorithm must satisfy the following criteria. 1.Input: It has zero or more input parameters. 2.Output: It produces at least one output parameter. 3.Definiteness: Each instruction must be clear and unambiguous. 4.Finiteness: For every input, it executes only a finite number of instructions. 5.Effectiveness: Every instruction must be sufficiently basic so that a machine can execute the instruction.
7
CSE-C1 Algs & DS 1 DS in Everyday Life We use DS in the normal things we do during the day, like: Shopping list List of Shores Telephone directory Same thing with algorithms, we implicitly define our own set of instructions on how we manipulate these daily DS, like: Add/removing items Prioritizing items Data to enter with each item
8
CSE-C1 Algs & DS 1 Introduction to ADTs Definition of Abstract Data Type Class of data objects (i.e., instances of the data type) with a set of the operations that can be applied to the objects (telling what to do instead of how to do) ADT is specified by 1.a set of operations which can be applied to the objects and 2.a set of properties (called axioms) which all the objects and operations must satisfy.
9
CSE-C1 Algs & DS 1 Introduction to ADTs Advantage of Abstract Data Type Modularity (Encapsulation) The definition of operations isolates implementation of ADT from construction of a program using ADT. Cohesiveness (Self- maintaining) Implementation of ADT can be changed without modifying programs using ADT. Data Abstraction (minimal Coupling) The ADT does not depend on other processes during input or output.
10
CSE-C1 Algs & DS 1 Introduction to ADTs Simple example of ADT Name of ADT :Integer Operations that it will perform Create:Defines an identifier with an undefined value Assign:Assigns the value of one integer identifier or value to another integer identifier IsEqual:returns true if the values (or values associated with identifiers) of the two integers are the same LessThan:returns true if the value of the first integer is less than the value of the second integer Negative:returns the negative of the integer value Sum:returns the sum of two integer values
11
CSE-C1 Algs & DS 1 Overview of ADTs covered As already discussed and as seen in the schedule we will be covering in some detail the following DS based on the concept of ADT: Lists. Stacks. Queues. Deques. Trees. Sets. Tables
12
CSE-C1 Algs & DS 1 Normal Process of an ADT The standard operations that we will be doing with each of the DS we will be covering will be explained in theory and programmed in the Pascal language. Operations include: Define Create Add to Remove from Search Empty Check if full Check if empty Destroy
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.