D ATA S TRUCTURES 1. I NSTRUCTORS Lectures : Dr. Shimaa Ibrahim Hassan Time: 9:45 Sections.

Slides:



Advertisements
Similar presentations
Data Structures.
Advertisements

Overview of Programming and Problem Solving ROBERT REAVES.
CSCE 210 Data Structures and Algorithms
1 CENG 707 Data Structures and Algorithms Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University Fall 2010.
Programming Languages Structure
COMP171 Data Structures and Algorithm Huamin Qu Lecture 1 (Sept. 1, 2005)
COMP171 Data Structures and Algorithm Qiang Yang Lecture 1 ( Fall 2006)
COMP152 Object-Oriented Programming and Data Structures Spring 2011.
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
Chapter 1 Program Design
CSCE 110 PROGRAMMING FUNDAMENTALS WITH C++
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
DATA STRUCTURE Subject Code -14B11CI211.
CSCE 3110 Data Structures and Algorithm Analysis.
Data Structures and Programming.  John Edgar2.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Prof. Amr Goneid, AUC1 CSCE 210 Data Structures and Algorithms Prof. Amr Goneid AUC Part 1. Data Modeling and ADTs.
CS102 Introduction to Computer Programming
WEEK 1 CS 361: ADVANCED DATA STRUCTURES AND ALGORITHMS Dong Si Dept. of Computer Science 1.
Introduction To System Analysis and design
Copyright © Wondershare Software Introduction to Data Structures Prepared by: Eng. Ahmed & Mohamed Taha.
Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution.
Simple Program Design Third Edition A Step-by-Step Approach
Data Structures Lecture 1: Introduction Azhar Maqsood NUST Institute of Information Technology (NIIT)
Introduction to Data Structures. Definition Data structure is representation of the logical relationship existing between individual elements of data.
ITEC 2620A Introduction to Data Structures
Chapters 7, 8, & 9 Quiz 3 Review 1. 2 Algorithms Algorithm A set of unambiguous instructions for solving a problem or subproblem in a finite amount of.
Course Web Page Most information about the course (including the syllabus) will be posted on the course wiki:
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
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:
COMP2012 Object-Oriented Programming and Data Structures Fall 2015.
CMSC 2021 CMSC 202 Computer Science II for Majors Fall 2002 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
Data Structures and Algorithms Lecture 3 Instructor: Quratulain Date: 8 th September, 2009.
Introduction to ECE 2401 Data Structure Fall 2005 Chapter 0 Chen, Chang-Sheng
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
WELCOME to III SEM Date: Class - ECE no of present : no of absent :
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Prof. amr Goneid, AUC1 CSCE 110 PROGRAMMING FUNDAMENTALS WITH C++ Prof. Amr Goneid AUC Part 13. Abstract Data Types (ADT’s)
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2003 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
Data Structures and Algorithms in Java AlaaEddin 2012.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
Introduction to Computer Programming using Fortran 77.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
MANAGEMENT INFORMATION SYSTEM
Data Structures Dr. Abd El-Aziz Ahmed Assistant Professor Institute of Statistical Studies and Research, Cairo University Springer 2015 DS.
Introduction To Algorithm and Data Structures Course Teacher: Moona Kanwal -Algorithm Design -Algorithm Analysis -Data structures -Abstract Data Type.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
Introduction toData structures and Algorithms
CSCE 210 Data Structures and Algorithms
Advanced Computer Systems
Course Developer/Writer: A. J. Ikuomola
CSCI-235 Micro-Computer Applications
CS 315 Data Structures B. Ravikumar Office: 116 I Darwin Hall Phone:
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++
About the Presentations
Objective of This Course
COMP2012H Object-Oriented Programming and Data Structures
Chapter 1 Introduction(1.1)
ITEC 2620M Introduction to Data Structures
Programming Fundamentals (750113) Ch1. Problem Solving
Introduction to Data Structure
Programming Fundamentals (750113) Ch1. Problem Solving
Presentation transcript:

D ATA S TRUCTURES 1

I NSTRUCTORS Lectures : Dr. Shimaa Ibrahim Hassan Time: 9:45 Sections : Eng: Mohamed Hussien Time: Sec.1 9:00 Sec.2 9:00 2

T EXTBOOKS Main book: Data Structures and Algorithms in C++, 2 nd edition Goodrich, Michael T.; Tamassia, Roberto; Mount, David M. My reference books: ADTs, Data Structures, and Problem Solving with C++, Prentice Hall, Larry Nyhoff Data Structures And Problem Solving Using C++, Mark Allen Weiss Data Structures and Algorithms in Java, Robert Lafore Extra reference book: The C++ Porgramming language, Addison Wesley, Stroustrup --- creator of C++ 3

C OURSE O VERVIEW A fundamental computer engineering course - Essential for programming - Essential for advanced courses A challenging course, which needs - Mathematical and logic thinking - Programming 4

C OURSE P REREQUISITE Programming skills Need to know C++ or JAVA PC programming environment Good programming skills Translate pseudo-codes into codes Basic mathematical skills Solving recursive equations, manipulation of symbols, etc. Computer architecture Pointers, storage, memory access, etc. 5

A SSIGNMENTS Lab assignments. Programming assignments Due by time specified Run on PC Detailed analysis report Late policy : Must be submitted by 12:00 am of the due date One day late costs 10% off Two days late costs 20% off Three days late costs 40 % off Four days late is not accepted 6

C OURSE O BJECTIVES Study an effective programming method for software projects of realistic size. Difficulties arise not in finding a solution, but rather in deciding on the best algorithm to use The greatest room for variability in algorithm design is in the way in which the data are stored: How they are arranged in relation to each other Which data are kept in memory Which are calculated when needed Which are kept in files, and how the files are arranged Present several ideas for data organization and several algorithms for important data processing tasks such as sorting and searching. 7

8 C OURSE O UTLINE Program development process Data modeling and ADT OOP and classes Arrays, Records and Sets Linked Lists Recursion Stacks and Queues Trees Sorting and Searching Graphs

G RADING SYSTEM Final exam degrees Mid-term degrees Lab and practical exam degrees Project degrees

P ROGRAM D EVELOPMENT P ROCESS 10

S OFTWARE D EVELOPMENT C YCLE Steps for writing small programs: Get the assignment Devise an algorithm for solving the problem Express the algorithm as a computer program in a specific language Type the program into the computer Compute the program; revise it to correct errors (compiler errors) Run the program with sample data; check for the correct answers; correct the discovered errors (run time errors) Run the program with actual data and get the results 11

D EVELOPING A S OFTWARE S YSTEM User requirement Between software team and user System analysis Technical statement that shows the major components of the system, data flow, required outputs, errors to check for, procedures to follow, constraints … etc. System design Choosing data types and algorithms for each major component of the system specified in the pervious stage. Breaking the system into small functions May include writing some pseudo codes. 12

D EVELOPING A S OFTWARE S YSTEM ( CONT.) Implementation The designed system is translated into code in HLL Correcting the compiler’s error Testing Running the system with data for which the correct results are known and check for the output results and correcting the errors if found Running the system with some data containing errors that requirements ask to be checked Running the system with real data supplied by the client and fix errors if found. 13

D EVELOPING A S OFTWARE S YSTEM ( CONT.) Installation The system and required software are placed on the clients’ machines. The personnel who will operate the system are trained Maintenance This term includes everything that is done to the system after the user has accepted the initial version, such as: Correcting errors not detected earlier Adding new features Modification required related to H/W updates 14

C HARACTERISTICS OF A G OOD P ROGRAM Correctness Reliability Correct output for correct input Meaningful error messages for incorrect input Portability Easily moved from one machine to another with minimum modifications. Using popular programming language and avoiding non-standard language features Maintainability Easily to be maintained by achieving readability feature 15

C HARACTERISTICS OF A G OOD P ROGRAM ( CONT.) Readability Making the program easy to read by good program design; using good comments and meaningful variable names A readable program is: More likely to be correct Faster and cheaper to test Faster and cheaper to maintain Faster and cheaper to modify Use of resources A good program is fast and uses minimum of storage 16

P ROGRAMING S TYLE Choose meaningful names Declare all constants in the declaration section Minimize the number of global variables Declare the variable wisely in the program to minimize used resources Use spaces, blank lines and end lines to promote clarity Use comments intelligently: Detailed comment at the beginning of the program and each function to describe their general purpose Inline comments as required organize your program into functions, each with coherent purpose The main program should be mainly function calls 17

D ATA M ODELING & ADT S 18

D ATA M ODELING Real-world applications need to be reduced to a small number of existing problems (top-down design) Real-world data need to be described in an abstract way in terms of fundamental structures The collection of data in some organization is called a “Data Structure” The sequences of operations to be done on the data are called “Algorithms” An Algorithm is a procedure to do a certain task An Algorithm is supposed to solve a general, well-specified problem 19

20 D ATA M ODELING A real-world application is basically Data Structures + Algorithms Data and the Operations on that data are parts of an object that cannot be separated. These two faces of an object are linked. Neither can be carried out independently of the other.

21 T HE D ATA C ONE Real-world Data ADTs Data Structures Fundamental Data Types

22 A BSTRACT D ATA T YPES (ADT S ) The most important attribute of data is its type. Type implies certain operation. It also prohibits other operations. For example, + - * / are allowed for types int and double, but the modulus (%) is allowed for int and prohibited for double. When a certain data organization + its operations are not available in the language, we build it as a new data type. To be useful to many applications, we build it as an Abstract Data Type.

23 A BSTRACT D ATA T YPES (ADT S ) An ADT represents the logical or conceptual level of the data. It consists of: 1. A collection of data items in some Data Structure 2. Operations ( algorithms ) on the data items For example, a Stack supports retrieval in LIFO (Last In First Out) order. Basic operations are push and pop. It can be implemented using arrays (static or dynamic) or linked lists

A BSTRACT D ATA T YPES (ADT S ) The Data Structure used in implementing an ADT is usually dependent on the language. In contrast, the definition of the ADT is separated from its implementation (Data Abstraction) e.g. ADT Stack can be implemented using a static array, a dynamic array or pointers. An ADT can be used in more than one application. 24

25 U SING ADT’ S ADT Application Standard Types/Libraries User Built ADT’s

A C LASSIFICATION OF A BSTRACT S TRUCTURES According to the relationship between members Abstract Structures SetsLinearTreesGraphs 26

S ETS Order of elements does not matter. Only that they are members of the same set ({1,3,4} is identical to {1,4,3}). Can be implemented using arrays or linked lists. Used in problems seeking: groups collection 27

L INEAR S TRUCTURES Sequential, one-to-one relationship. Examples: Tables, Stacks, Queues, Strings Can be implemented using arrays and linked lists (structs and pointers). Used in problems dealing with: Searching, Sorting, stacking, waiting lines. Text processing, character sequences, patterns Arrangements, ordering, tours, sequences. 28

T REES Non-Linear, hierarchical one-to-many. Examples: Binary Trees, Binary Search Trees (BST) Can be implemented using arrays, structs and pointers Used in problems dealing with: Searching Hierarchy Ancestor/descendant relationship Classification 29

G RAPHS Non-Linear, many-to-many. Can be implemented using arrays or linked lists Used to model a variety of problems dealing with: Networks Circuits Web Relationship Paths 30

31