CS F211 Handout
CS F211 Handout
Apply various basic data structures such as stacks, queues, linked lists, trees etc. to solve complex
programming problems. Understand basic techniques of algorithm analysis.
Design and implement advanced data structures like graphs, balanced search trees, hash tables,
priority queues etc. Apply graph and string algorithms to solve real world problems like finding
shortest paths on huge maps or detecting plagiarism percentage.
Apply basic algorithmic techniques such as brute-force, greedy algorithms, divide and conquer,
dynamic programming etc. to solve complex programming problems and examine their efficiency.
At the end of the course, you should understand common data structures and algorithms, be able to
develop new data abstractions (interfaces) and use existing library components in C++.
Text Book:
T1: Introduction to Algorithms, TH Cormen, CE Leiserson, RL Rivest, C Stein, 3rd Ed., MIT Press,
PHI, 2010.
Reference Books:
R1: Data Structures and Algorithms in C++, Michael T. Goodrich, Roberto Tamassia, David M.
Mount, 2nd Edition, 2011, Wiley (e-book in India).
R2: Data Structures & Algorithm Analysis in C++, Mark Allen Weiss, 4th Edition, Pearson, 2014.
R3: Data Structures and Algorithms, Alfred V. Aho, John E. Hopcroft, Jeffrey D. Ullman, 4th Indian
reprint, Pearson, 2001.
Lecture Plan:
Lectu Learning Chapter in
re# Objectives Topics to be covered the Text
Book
1 The role of DS and What kinds of problems are solved by algorithms? Journey T1 (1), R3(1)
Algorithms in from problems to programs.
Computing.
2 Introduction to Classes: Class Structure, Constructors, Class Friends and Class R1 (1.5, 1.6)
C++. Members, Standard Template Library (STL), An example
C++ program.
3-4 To understand the Object Oriented Design: Goals, Principles and Design R1 (2.1, 2.2,
features of Object Patterns; Inheritance and Polymorphism; Interfaces and 2.3)
Oriented abstract classes; Templates.
Paradigm.
5-7 Implementing Using arrays, Insertion and removal from a Linked list, T1 (10),
elementary data generic single linked list, doubly linked lists, circular linked R1 (3.1, 3.2,
structures and lists, linear and binary recursion. 3.3, 3.5)
8-9 algorithms. Functions: Linear, N-Log-N, Quadratic functions etc., T1 (2), T1(3)
Understanding Asymptotic notation and asymptotic analysis, Using Big-Oh
techniques for notation, Examples of analysis. R1 (4.1, 4.2)
Algorithm analysis.
10-12 Stack ADT, Array-based stack implementation, stack T1(10),
Implementing implementation using generic linked list, Applications of
more common stacks: matching tags in an HTML document; Queue ADT, R1 (5.1, 5.2)
data structures and Array-based and circular linked list based implementation.
13 algorithms like Double-Ended queue: Deque ADT, Implementing using T1(10),
Stacks, Queues, doubly linked lists, Adapters: Implementing stack using R1 (5.3)
Deques, Vectors, Deque.
14 List ADTs, Vector ADT, Simple Array-based implementation; R1 (6.1)
Sequences, and Extendable array based implementation (Amortization) and
Trees. Using STL Vectors.
15-16 Amortization to List ADT: Node based operations and Iterators, doubly T1(10),
perform a set of linked list implementation, Sequence ADT, Applications: R1 (6.2, 6.3,
push operations on Bubble sort on sequences, and its analysis. 6.4)
17-18 a vector. General Trees: Properties and functions, Traversal algorithms: T1(10),
Pre order, post order traversals, Binary tree: ADTs, Linked
and Vector structures for Binary trees, Binary tree traversal, R1 (7.1, 7.2,
Template function pattern. 7.3)
19-21 Priority Queue ADT, Implementing using Lists, Algorithms T1(6),
suitable for Priority queues, Heap: Complete binary trees and R1 (8.1, 8.2,
their representation, Implementing Heaps using Priority 8.3)
Implementing queue, Heap sort as an example.
22-24 Advanced data Map ADT, Implementation using Lists, Hash tables: Bucket T1(11),
structures like arrays, hash functions, compression functions, collision- R1 (9.1, 9.2,
Priority queues, handling schemes, Rehashing into a new table, 9.4)
Heaps, Hash Implementation of hash tables, Skip lists: Search and update
tables, Maps, Skip operation implementations.
25 lists, Dictionaries, Dictionary ADT: Implementation with location-aware entries. R1 (9.5)
26-28 Search Trees. Binary Search Trees: Operations and Analysis, AVL Trees: T1(12),T1(13)
Insertion and deletion, Analysis, Multi-way search trees, Red- R1 (10.1,
Black Trees: Operations and analysis. 10.2, 10.4,
10.5)
29-30 Merge sort: Divide and conquer, merging arrays and lists, T1(4), T1(5)
Understanding running time of merge sort; Quick sort: Randomized quick R1 (11.1,
various basic sort. 11.2)
Algorithmic Sorting through algorithmic lens: Lower bound, Linear time: T1(6), T1(7),
31-32 techniques and Bucket and Radix sort, Comparing sorting algorithms. T1(8),
usage of R1 (11.2,
appropriate data 11.3)
33 structures along Sets: Set ADT, Mergable sets, Partitions; Selection: Prune- T1 (7),
with their and-Search, randomized quick-select. R1 (11.4,
applications and 11.5)
analysis.
34-35 Strings and Dynamic programming: String operations, Matrix T1 ( 15),
Chain-Product as an example, Applying Dynamic R1 (12.1,
programming to LCS problems. 12.2)
36-37 Pattern matching algorithms: Brute force, Boyer-Moore R1 (12.3)
algorithm, KMP algorithm, Pattern matching using Tries.
Evaluation Scheme:
Make-up-Policy:
Make-up exams will be strictly granted on prior permission and on genuine grounds only. A request
email should reach the I/C on or before the test.
Course Notices and Material:
Course material pertaining to this course will be made available on a regular basis on the course
webpage in googleclass page and will be used for notices, announcements, grades, quizzes, and
googlemeet recordings. Project demos will be taken on the machines owned by students/ online.
Instructor-In-Charge, CS F211