Vous êtes sur la page 1sur 17

# ADVANCED DATA STRUCTURES

TimeTable:

## 9:40AM -- 11:20AM -- 1:00PM 2.00PM -- 3.40PM -- 4.30PM

DAY 11:20AM 1:00PM - 3.40PM
2:00PM

TUESDAY
U
WEDNESDA
Y N
THURSDAY
C
H
Syllabus

Unit I: Review of basic data structures: The list, Stack, Queue, Implementation Using C.
Dictionaries: linear list representation, skip list representation, operations - insertion, deletion and
searching.

Unit II: Hash table representation: hash functions, collision resolution-separate chaining, open
addressing-linear probing, quadratic probing, double hashing, rehashing, extendible hashing,
comparison of hashing and skip lists. Priority Queues Definition, Realizing a Priority Queue using
Heaps, Definition, insertion, Deletion.

Unit III: Search Trees: Binary Search Trees, Definition, Implementation, Operations- Searching,
Insertion and Deletion, AVL Trees, Definition, Height of an AVL Tree, Operations Insertion,
Deletion and Searching, Red Black, Splay Trees, B-Tree of order m, height of a B-Tree, insertion,
deletion and searching, Comparison of Search Trees.

UNIT-IV: Graphs: Graph Implementation Methods. Graph Traversal Methods. Sortings: Quick sort,
Heap Sort, External Sorting- Model for external sorting, Merge Sort, Multiway merge, Polyphase
merge.

Unit V: Pattern matching and Tries: Pattern matching algorithms-Brute force, the Boyer Moore
algorithm, the Knuth-Morris-Pratt algorithm, Standard Tries, Compressed Tries, Suffix tries.

TEXTBOOKS:

## Fundamentals of data structures in c, 2 nd edition, e.horowitz, s.sahni and susan

anderson freed, universities press
Data structures using c a.s.tanenbaum, y. Langsam, and m.j. Augenstein,
phi/pearson education.
Introduction to data structures in c, 1/e ashok kamthane

REFERENCES:

## The C Programming Language, B.W. Kernighan, Dennis M.Ritchie, PHI/Pearson

Education
C Programming with problem solving, J.A. Jones & K. Harrow, Dreamtech Press
Data structures: A Pseudocode Approach with C, 2 nd edition, R.F.Gilberg And
B.A.Forouzan, Cengage Learning.
Course Plan

## Course Course Title Total number of contact hours Credits

Code Lecture Tutorial Practical # Total
(L) (T) (P) Hours
Advanced Data 4 1 0 5 4
Structures

Course Objectives:

## a. Introduces the basic concepts of Abstract Data Types

b. Reviews basic data structures such as stacks and queues
c. Introduces a variety of data structures such as hash tables, search trees, tries, heaps, graphs,
and B-trees
d. Introduces sorting and pattern matching algorithms

Course Outcomes:

## At the end of the course, students will be able to,

I. Ability to select the data structures that efficiently model the information in a problem
II. Ability to assess efficiency trade-offs among different data structure implementations or combinations
III. Implement and know the application of algorithms for sorting and pattern matching
IV. Design programs using a variety of data structures, including hash tables, binary and general tree
structures, search trees, tries, heaps, graphs, and B-trees

Unit Plan

Unit 1: Review of basic data structures: The list, Stack, Queue, Implementation Using C.
Dictionaries: linear list representation, skip list representation, operations - insertion, deletion and
searching.

Objectives:

To review the basic data structures like List, Stack and Queue along with their
implementation in C.
To emphasize how to represent Dictionaries in linear list format and skip list format.
To learn performing operations (insertion, deletion, searching) on Dictionaries.

Teaching
SI NO Topic Discussed Duration
Method
Review of basic data structures: The list and its Black Board &
1 100 minutes
implementation in C LED Projector
Black Board &
2 Stack and Queue along their implementation using C 100 minutes
LED Projector
3 Dictionaries: linear list representation 100 minutes Black Board
4 skip list representation 100 minutes Black Board
Black Board &
5 operations - insertion, deletion and searching 100 minutes
LED Projector

Unit 2: Hash table representation: hash functions, collision resolution-separate chaining, open
addressing-linear probing, quadratic probing, double hashing, rehashing, extendible hashing,
comparison of hashing and skip lists.

Priority Queues Definition, Realizing a Priority Queue using Heaps, Definition, insertion,
Deletion.

Objectives:

## To introduce Hash table mechanism.

To learn Priority Queues implementation (using Heaps).

Teaching
SI NO Topic Discussed Duration
Method
1 Hash table representation: Hash functions 100 minutes Black Board
2 collision resolution-separate chaining 100 minutes Black Board
3 open addressing-linear probing, quadratic probing 100 minutes Black Board
4 double hashing, rehashing, extendible hashing 100 minutes Black Board
5 comparison of hashing and skip lists 100 minutes Black Board
Priority Queues Definition, Realizing a Priority Queue
6 100 minutes Black Board
using Heaps
Black Board &
7 Insertion, Deletion operations on Priority Queues 100 minutes
LED Projector

Unit III: Search Trees: Binary Search Trees, Definition, Implementation, Operations- Searching,
Insertion and Deletion, AVL Trees, Definition, Height of an AVL Tree, Operations Insertion,
Deletion and Searching, Red Black, Splay Trees, B-Tree of order m, height of a B-Tree, insertion,
deletion and searching, Comparison of Search Trees.

Objectives:

## To introduce Binary search trees in Data structures.

To learn AVL, Red Black, Splay trees and B- trees along with their implementations.
To able to compare the above Search trees.

Teaching
SI NO Topic Discussed Duration
Method
1 Search Trees: Binary Search Trees, Definition 100 minutes Black Board
Implementation, Operations- Searching, Insertion and Black Board &
2 100 minutes
Deletion LED Projector
AVL Trees, Definition, Height of an AVL Tree, Operations Black Board &
3 100 minutes
Insertion, Deletion and Searching LED Projector
Black Board &
4 Red Black, Splay Trees 100 minutes
LED Projector
B-Tree of order m, height of a B-Tree along with insertion, Black Board &
5 100 minutes
deletion and searching operations LED Projector

## UNIT-IV: Graphs: Graph Implementation Methods. Graph Traversal Methods.

Sorting: Quick sort, Heap Sort, External Sorting- Model for external sorting, Merge Sort,
Multiway merge, Polyphase merge.

Objectives:

## To emphasize Graph implementation methods and their traversals.

To learn external sorting concept.

Teaching
SI NO Topic Discussed Duration
Method
1 Graphs: Graph Implementation Methods 100 minutes Black Board
2 Graph Traversal Methods 100 minutes Black Board
3 Sorting: Quick sort, Heap Sort 100 minutes Black Board
4 External Sorting- Model for external sorting, Merge Sort 100 minutes Black Board
5 Multiway merge, Polyphase merge 100 minutes Black Board

Unit V: Pattern matching and Tries: Pattern matching algorithms-Brute force, the Boyer Moore
algorithm, the Knuth-Morris-Pratt algorithm, Standard Tries, Compressed Tries, Suffix tries.

Objectives:

## To introduce the basic pattern matching algorithms

To learn tries concept.

Teaching
SI NO Topic Discussed Duration
Method
Pattern matching and Tries: Pattern matching algorithms-
1 100 minutes Black Board
Brute force, the Boyer Moore algorithm
2 Knuth-Morris-Pratt algorithm, Standard Tries 100 minutes Black Board
3 Compressed Tries, Suffix tries 100 minutes Black Board
Lesson Plan

## Day Monday Friday

Period Timing 9:40AM - 11:20AM 9:40AM - 11:20AM

## Day & Monday Monday Monday

Date 01-08-2016 15-08-2016 05-09-2016
Independence Ganesh
Occasion Bonalu Day Chaturthi

1. Course Objectives:

## ii) Reviews basic data structures such as stacks and queues

iii) Introduces a variety of data structures such as hash tables, search trees, tries, heaps, graphs, and B-trees

## iv) Introduces sorting and pattern matching algorithms

2. Course Pre/Co-requisites:

## i) A course on Computer Programming & Data Structures

3. Course Plan/Schedule:

No. of
S. No. Topics / Sub. Topics / Experiments Classes Remarks
Estimated
UNIT - I
1 Review of basic data structures: The list and its implementation in C 2
2 Stack and Queue along their implementation using C 2
3 Dictionaries: linear list representation 2
4 skip list representation 2
5 operations - insertion, deletion and searching 2
UNIT-II
1 Hash table representation: Hash functions 2
2 collision resolution-separate chaining 2
3 open addressing-linear probing, quadratic probing 2
4 double hashing, rehashing, extendible hashing 2
5 comparison of hashing and skip lists 2
6 Priority Queues Definition, Realizing a Priority Queue using Heaps 2
7 Insertion, Deletion operations on Priority Queues 2
UNIT-III
1 Search Trees: Binary Search Trees, Definition 2
2 Implementation, Operations- Searching, Insertion and Deletion 2
AVL Trees, Definition, Height of an AVL Tree, Operations Insertion,
3 Deletion and Searching 2
4 Red Black, Splay Trees 2
B-Tree of order m, height of a B-Tree along with insertion, deletion and
5 searching operations 2

UNIT - IV
1 Graphs: Graph Implementation Methods 2
2 Graph Traversal Methods 2
3 Sorting: Quick sort, Heap Sort 2
4 External Sorting- Model for external sorting, Merge Sort 2
5 Multiway merge, Polyphase merge 2
UNIT - V
Pattern matching and Tries: Pattern matching algorithms-Brute force,
1 the Boyer Moore algorithm 2
2 Knuth-Morris-Pratt algorithm, Standard Tries 2
3 Compressed Tries, Suffix tries 2

## 4. Course Outcomes (COs):

I. Ability to select the data structures that efficiently model the information in a problem
II. Ability to assess efficiency trade-offs among different data structure implementations or combinations
III. Implement and know the application of algorithms for sorting and pattern matching
IV. Design programs using a variety of data structures, including hash tables, binary and general tree
structures, search trees, tries, heaps, graphs, and B-trees

Fundamentals of data structures in c, 2 nd edition, e.horowitz, s.sahni and susan anderson freed,
universities press
Data structures using c a.s.tanenbaum, y. Langsam, and m.j. Augenstein, phi/pearson education
Introduction to data structures in c, 1/e ashok kamthane
6. Evaluation Scheme:

Evaluation Nature of
S. No. Duration Weightage Date Venue
Components Components
1 Mid-I Closed Book 120 Min 25% 14-09-2016 CSE Dept
2 Mid-II Closed Book 120 Min 25% 23-11-2016 CSE Dept
At
3 Assignments Open Book 1 Week 5% Surprise/Announced Home/Class
4 Final Exams Closed Book 3 Hours 70% December, 2016 JNTUHCEH

## Programme Educational Objectives (PEOs)

PEO 1: To provide students with a foundation in the principles of computer science, including
mathematics and basic engineering necessary to find answers to the technological issues
of modern society.
PEO 2: To provide students a breadth of knowledge in computer science and related engineering
disciplines in order to enable them to understand engineering trade-offs across multiple
disciplines, work effectively as an individual and as a member in multidisciplinary
teams, and have successful careers in a broad range of fields.
PEO 3: To provide students knowledge in the humanities and social sciences in order to develop
an awareness of social, professional and ethical issues related to computing, and to
understand the impact of solutions in global, economic, environmental, and societal
context; and to educate the students in effective oral and written communication skills.
PEO 4: To provide students with specialized knowledge in focused areas of their choice, in order
to strengthen them to make contributions to a specific discipline and pursue post
PEO 5: To train students in problem solving skills in order to formulate, design and develop
engineering solutions, and analysis skills for interpretation and synthesis of data.

PEO 6: To develop an awareness of lifelong learning in students to adapt to the changing technologies.

## PO 1: An ability to apply knowledge of mathematics, science and engineering to analyze and

design systems involving software and hardware components.
PO 2: An ability to design and conduct experiments, interpret and validate data arising out of
various software processes and automation.

PO 3: Ability to design and network, systems and processes confirming to the given
specifications and constraints.

## PO 4: Awareness of advancements in rapidly changing field of computer science and

appreciation of the process of life-long learning.

PO 5: Ability to use the combination of software packages, tools, networking protocols and apply
test conditions for experimentation.

## PO 7: Ability to research contemporary issues and provide solutions to engineering problems

across domains.

PO 8: To creatively automate tasks and effectively report (Oral, Written and Graphical means)
and compare the performance with existing systems.

## COb 2: Reviews basic data structures such as stacks and queues

COb 3: Introduces a variety of data structures such as hash tables, search trees, tries, heaps, graphs, and B-
trees

## Course Outcomes (COs):

CO 1: Ability to select the data structures that efficiently model the information in a problem

## CO 2: Ability to assess efficiency trade-offs among different data structure implementations or

combinations

CO 3: Implement and know the application of algorithms for sorting and pattern matching

CO 4: Design programs using a variety of data structures, including hash tables, binary and general
tree structures, search trees, tries, heaps, graphs, and B-trees
Mapping between Course Objectives and Course Outcomes:

CO 1 3 2 2 2
CO 2 2 1 2 1
CO 3 1 1 1 3
CO 4 1 1 3 1

## Mapping between Course Objectives and Program Outcomes:

Advance PO 1 PO 2 PO 3 PO 4 PO5 P PO 7 PO 8 P P
d Data O O O
Structur 6 9 10
es
Introduc 2 2 2 1 1 2 2
es the
basic
concepts
of
Abstract
Data
Types
Reviews 1 basic 1 1 1 1 1 1
data structures
such as stacks and
queues
Introduces 2 a 2 2 1 2 2 1
variety of data
structures such as
hash tables, search
trees, tries, heaps,
graphs, and B-
trees
Introduc 1 2 2 1 1 1 1
es
sorting
and
pattern
matching
algorith
ms

## 1: Slight (Low) 2: Moderate (Medium) 3: Substantial (High)

Course Articulation Matrix (Mapping between Course Outcomes and Program Outcomes):

Advanced PO 1 PO 2 PO 3 PO 4 PO P PO 7 PO 8 P P
Data 5 O O O
Structures 6 9 10
Ability to 2 2 1 1 1 1
select the
data
structures
that
efficiently
model the
information
in a problem
Ability to 2 2 1 1 1 1
assess
efficiency
among
different data
structure
implementati
ons or
combinations
Implement 1 2 2 1 1
and know the
application of
algorithms
for sorting
and pattern
matching
Design 2 2 2 2 2 1
Programs
using a
variety of
data
structures,
including
hash tables,
binary and
general tree
structures,
search trees,
tries, heaps,
graphs and
B-trees
1: Slight (Low) 2: Moderate (Medium) 3: Substantial (High)
Program Articulation Matrix:

Course PO 1 PO 2 PO 3 PO 4 PO P PO 7 PO 8 P P
5 O O O
6 9 10
Advance 2 2 2 2 2 1
d Data
Structure
s

Course
1 2 3 4 5 6
CO 1 1 1 2 1 1
CO 2 1 3 2 1 1
CO 3 1 1 2 2 1
CO 4 1 1 2 1 1

## Mapping between POs and Assessment methods:

Asse PO 1 PO 2 PO 3 PO 4 PO5 PO 6 PO 7 PO 8 P P
ssme O O
nt 9
Meth 1
ods 0

Mid - 2 1 1 1 2 1 1
I

Mid - 2 1 1 1 2 1 1
II
Assig 2 2 2 2 2 3 1 2
nmen
ts

Final 2 1 1 1 2 1 1
Exa
m

## Mapping between PEOs and Assessment methods:

Assessm P P P P P P
ent E E E E E E
Methods O O O O O O
1 2 3 4 5 6
Mid - I 2 2 1 2 2 1
Mid - II 2 2 1 2 2 1
Assignm 2 2 2 1 2 1
ents
Final 2 2 1 2 2 1
Exam

## Attempt any three of the following questions. 3 * 5 = 15M

1. a) Write an algorithm that takes the first node in a linked list, Reverse it and return the first

## 3. a) Write the rules for converting an Infix notation to Postfix form.

b) Convert the following Infix Expression to postfix using stack.

A*B-(C+D)+E

a) Insertion

b) Deletion

c) Searching

## a) Trees b) Graphs c) Arrays d) None of above

2) Two nodes that are children of the same parent are known as _________

## a) Siblings b) Leaves c) Internal d) External

3) ___________ is a data structure in which items are added at one end and removed from other

## a) Stack b) Queue c) List d) None

4) Identify the data structure which allows deletions at both ends of the list but insertion at only one
end

## 8) The prefix form of an infix expression A+B-C*D is

a) +AB-*CD. b) -+A B C * D. c) -+A B * C D. d) - + *ABCD.

## 9) Stack is also called as

a) Last in first out b) First in last out c) Last in last out d) First in first out
10) A ....... is a data structure that organizes data similar to a line in the supermarket, where the first
one in line is the first one out.
a) Queue linked list b) Stacks linked list c) Both of them d) Neither of them

## 1. A) What is Hashing? Explain different hashing techniques with example?

B) Explain how to implement Priority Queue using Heap?
2. Create a B-tree of order 5 by inserting following elements.
3, 14, 7, 1, 8, 5, 11, 17, 13, 6, 23, 12, 20, 26, 4, 16, 18, 24, 25 and 19
3. A) Explain rotations in AVL tree with example?
B) Explain insertion in Splay tree with example?
4. A) Explain DFS algorithm with example?
B) Write an algorithm for merge sort?
5. A) Explain KMP pattern matching algorithm with relevant example?
B) Compute the prefix function for the pattern P = ababaca against text T?

## Answer all MCQ. 1 * 10 = 10M

1. Visiting root node after visiting left and right sub-trees is called []
a) In-order traversal b) Pre-order traversal c) Post-order traversal
2. Heap is an example of []
a) Complete binary tree b) Spanning tree c) Sparse tree d) binary search tree
3. A balance factor in AVL tree is used to check []
a) What rotation to make c) When the last rotation occurred
b) If all child nodes are at the same level d) If the tree is unbalanced
4. Balanced factor = ________________
5. Minimum number of queues required for priority queue implementation. []
a) 5 b) 4 c) 3 d) 2
6. A pivot element to partition unsorted list is used in []
a) Quick sort b) Merge sort c) Heap sort d) Selection sort
7. Every node in B-tree has at most ____________ children. []
a) M b) M-1 c) 2 d) M+1
8. Which algorithm uses divide, conquer and combine algorithmic paradigm. []
a) Quick sort b) Merge sort c) Heap sort d) Selection sort
9. Define Hash function?
10. ______________ is searching a pattern P in a given text T.

Assessment Rubrics

1. Construct object oriented programming solutions for reuse, using ADTs that incorporate
encapsulation, data abstraction, and information hiding.
2. Create programming solutions that use data structures and existing libraries.
3. Design and develop reusable software using appropriate data structures and templates.
4. Illustrate the basic terminology and properties of graphs and trees.
5. Produce algorithms for solving simple problems and trace the execution of computer
programs.
6. Use graphs and trees to solve problems algorithmically.
7. Compare and contrast a range of searching and sorting algorithms and analyze time and space
efficiencies.
8. Analyze the efficiency of recursive algorithms.
9. Analyze the execution of searching and sorting algorithms.

RUBRICS :

Excellent
Understanding of all web
technologies and providing
solution which is efficient,
easy to understand, and
maintain
Good
Understanding of all web
technologies and providing
solution which is efficient
and easy to understand
Fair
Understanding of all web
technologies and providing
logical solution that is easy
to understand but not
efficient