Download
cs8391 data structures n.
Skip this Video
Loading SlideShow in 5 Seconds..
CS8391-Data Structures PowerPoint Presentation
Download Presentation
CS8391-Data Structures

CS8391-Data Structures

1234 Vues Download Presentation
Télécharger la présentation

CS8391-Data Structures

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. CS8391-Data Structures List, Stack, Queue, Tree, Graph, Sorting, Searching & Hashing

  2. Syllabus UNIT I LINEAR DATA STRUCTURES – LIST 9 Abstract Data Types (ADTs) – List ADT Array-based implementation Linked list implementation ––singly linked lists- circularly linked lists- doubly-linked lists – applications of lists –Polynomial Manipulation – All operations (Insertion, Deletion, Merge, Traversal).

  3. Syllabus (Continued…) UNIT II LINEAR DATA STRUCTURES – STACKS, QUEUES 9 Stack ADT – Operations - Applications - Evaluating arithmetic expressions- Conversion of Infix to postfix expression – Queue ADT – Operations - Circular Queue – Priority Queue - Dequeue – applications of queues.

  4. Syllabus (Continued…) UNIT III NON LINEAR DATA STRUCTURES – TREES 9 Tree ADT – tree traversals - Binary Tree ADT – expression trees – applications of trees – binary search tree ADT –Threaded Binary Trees- AVL Trees – B-Tree - B+ Tree - Heap – Applications of heap. UNIT IV NON LINEAR DATA STRUCTURES – GRAPHS 9 Definition – Representation of Graph – Types of graph - Breadth-first traversal - Depth-first traversal – Topological Sort – Bi-connectivity – Cut vertex – Euler circuits – Applications of graphs.

  5. Syllabus (Continued…) UNIT V SEARCHING, SORTING AND HASHING TECHNIQUES 9 Searching- Linear Search - Binary Search. Sorting - Bubble sort - Selection sort - Insertion sort - Shell sort – Radix sort. Hashing- Hash Functions – Separate Chaining – Open Addressing – Rehashing – Extendible Hashing. TEXT BOOK(S) T1. Mark Allen Weiss, “Data Structures and Algorithm Analysis in C”, 2nd Edition, Pearson Education,1997. T2. ReemaThareja, “Data Structures Using C”, Second Edition , Oxford University Press, 2011

  6. Prerequisite Courses Knowledge in • Computer Programming terminologies. • C Programming languages will help in understanding the Data Structures concepts and move fast on the learning track.

  7. Course Outcomes (COs) Upon completion of the course, the students will be able to • Develop and implement List data structures and its applications. • Develop and implement Stack and Queue data structures and its applications. • Develop and implement Tree data structures and its applications. • Develop and implement Graph data structures and its applications. • Develop and implement sorting, searching and hashing techniques.

  8. CO-PO Mapping

  9. Why Data Structures? Program = DS + Algorithm • Data structures and Algorithms are the nuts-and-bolts used by programmers to store and manipulate the data efficiently in computer memory. • Data structure is a particular way of storing and organizing information in a computer so that it can be retrieved and used most productively. • Analgorithm is a step by step method or instructions to solve a problem.

  10. Introduction to Data Structures • Data is a basic fact of entity that is utilized in calculation or manipulation. • Example: Name of the person (Alphanumerical), Roll number of the student (Numerical). • Structuring of data-Whether data is a single or group of values, it must be organized in a particular fashion for computer processing (Storing, retrieving and manipulating). • Different types of data structures can be applied to an application but, only some of them provide the efficient results. • No single data structure works well for all purpose, and so it is important to know the strengths and limitations of several of them.

  11. What do you meant by Efficient Program? Efficient program is determined by its time and space complexity. • Time complexitystates the time needed to execute (compile as well as run time) a given program. • Space complexitystates the memory space needed to store and process the program.

  12. Definition of Data Structures • It is a way of organizing all data items that considers not only thestorage of elementsbut also tells the relationship between each items for processing. • Data structure is a key organizing factor in the software design. • In other words, it is a structural representation of logicalrelationship between individual elements of data for computer processing.

  13. Application of Data Structures • The field of computer science will address the task of storing, accessing & manipulating data. • DS & algorithm are common to almost all application of computer science. Some of the applications are, • Compiler design • Operating System • Data Base Management System • Networking • Graphics • Artificial Intelligence • Statistical analysis • System software design • Robotics etc.,

  14. Classifications of Data Structures Primitive Data Structure - basic structures directly operated upon by the machine instructions. Non-Primitive Data Structure - It emphasize on structuring of a group of data items, according to their relationship. According to the nature of memory size, it will be further classified as Static Data structure and Dynamic Data structures. Linear Data Structure - It has a linear relationship between its adjacent elements (every element in the structure has a unique predecessor and successor) although the way they are stored in memory need not be sequential. Non-linear Data Structure - not having linear relationship between its adjacent elements. Trees(hierarchical relationship) and Graphs.

  15. Abstract Data Type (ADT)? • Basic idea of abstraction - a human being can’t able to keep many separate things in mind simultaneously. So to reduce the amount of details you “combine” them into upper level concept. These upper level concepts are the simplified abstractions of a complicated thing. • Objects along with their operations can be viewed as ADTs just as integers, real & Boolean. An object “Set” can be defined only by its operation function like Union (AB), Intersection (AB), Minus (A-B). Example: Assume that we place the List object on an ADT. The user should not be aware of the structure of List. As long as they are able to insert, delete and retrieve data, it does not make a difference as to how we store the data.

  16. Definition of ADT • An Abstract Data Type is defined as a mathematical model of the data objects such as List, Set, and Graph. It is a data type together with its operation functions. • ADT is a way of separating specification & representation of the data type (i.e.) the details of how the data is presented and manipulated is hidden, but the data type and functions are made public. The user should access only the functions through an interface. • ADT supports Modular Programming.

  17. Modular programming • According to the programming rule, a program shouldn’t exceed a page. This is accomplished by breaking a whole program into small modules. • Modules are logical units & do a specific job. Its size becomes kept small. Advantages • Increase readability • Easy to implement or design • Easy to debug and execute • Flexible to change

  18. Lists ADT • It is simply a sequential arrangement of data element. • It is an ADT object contains elements of size N, which are arranged in a linear sequence. For Example, consider a List of elements E1,E2,E3,…………….En. Here E1 is a first element, E2 is second, E3 is third and En is nth or lastelement. Where, Ei (ithelement in the List), Ei-1(Predecessor of Ei) & Ei+1 (Successor of Ei)

  19. Types of LIST • Empty list - A list has no elements or its length is Zero. • Ordered list - Elements are arranged based on some sort of ordering criteria. • Unordered list - No clear fashion of arrangements. • Stack - If the elements are deleted & inserted in the same end of the list then the List is referred as a Stack. • Queue - If the elements are deleted at one end and inserted at the other end of the list then the List is referred as Queue.

  20. Basic Operation of Lists ADT • Creation of List • Insert an element onto the List • Deletion an element from the List • Traversal (or) Display the List • Modify an element in the List • Search an element in the List • Count the elements in the List • Order the elements in List • Merging or splitting of List

  21. Implementation of Lists ADT Implemented by three ways, • Using Array Data Structure • Using Linked List Data Structure • Using Cursor implementation