Professional Documents
Culture Documents
Data Structures
21SC1202
Prepared by
Mr. A. Srinivasa Rao, Asst. Professor
Course Handout
A.Y.2021-22, Even Semester
Team of Instructors:
Course Objective: The fundamental study, analysis, and implementation of basic data
structures and algorithms for the development of real time practical applications.
Course Rationale: Student will explore several fundamentals of data structures in computer
science and learns to implement them in C. Use of appropriate Data Structures enables a
computer system to perform its task more efficiently by influencing the ability of computer to
store and retrieve data.
Mapping of Course Outcomes (CO) to Program outcomes:
CO# BTL
CO Description PO/PSO
(1 to6)
CO1 Understand various sorting algorithms and analyze the PO1, PO2 4
efficiency of the algorithms
CO2 Implement and evaluate Linear Data Structures and PO1, PO2, PO3 4
Demonstrate their applications.
CO3 Implement and evaluate tree data structures and PO1, PO2, PO3 4
Understand hashing techniques
CO4 Understand graph data structures and apply graphs to PO1, PO2 3
solve problems
CO5 Design, Develop and evaluate common practical PO3, PO9, PO10 5
applications for linear and nonlinear data structures.
WEB REFERNCES/MOOCS:
1. https://nptel.ac.in/courses/106102064
2. https://nptel.ac.in/courses/106101060/4
3. https://www.edx.org/course/algorithms-and-data-structures-1
4. https://in.udacity.com/course/intro-to-algorithms--cs215
5. https://www.coursera.org/learn/data-structures?action=enroll
Sem-in-Exam-
2 3 Types of Queue – Circular Queue Ref Book [1], PPT - I, End Sem,
18 CH 3.4 Lecturing, Quiz, HA,
Page no 95- Discussion
ALM.
101
Book No [CH Teaching-
Sess. Evaluation
CO C Topic (s) No] [Page No] Learning
No. Components
OI Methods
Sem-in-Exam-I,
Types of Queue – Deque Ref Book [1], End Sem, Quiz,
19 2 3 CH 3.4 PPT -
HA, ALM.
Page no 95- Lecturing,
101 Discussion
Sem-in-Exam-
20 2 4 T. Book [1], PPT - I, End Sem,
Binary Heap CH 3.4 Page Lecturing, Quiz, HA,
no 95-108 Discussion ALM.
Sem-in-Exam-II,
Ref Book [1], End Sem, Quiz,
21 3 1 CH 5.3 PPT -
HA, ALM.
Hashing - Hash function, Separate chaining Page no 168 - Lecturing,
172 Discussion
Sem-in-
Ref Book [1], PPT - Exam-II,
22 3 1 Linear probing and Quadratic probing CH 5.4 Lecturing,
End Sem,
Page no 173- Discussion
Quiz, HA,
180
ALM.
Sem-in-
3 2 Double hashing Ref Book [1], PPT- Exam-II,
23 CH 5.4 Lecturing, End Sem,
Page no 180- Discussion Quiz, HA.
181
Sem-in-
3 2 Ref Book [1], PPT - Lecturing, Exam-II,
24 Rehashing and Extendible hashing CH 5.4 Page Discussion End Sem,
no 168-180
Quiz, HA.
Sem-in-
3 3 Binary Tree - Tree traversals, Expression tree Ref Book [1], PPT - Lecturing, Exam-II,
25 construction CH 4.2 Discussion End Sem,
Page no 108 -
Quiz, HA.
116
Ref Book [1], Sem-in-
3 3 Binary Search Tree – Construction, Insertion, CH 4.3 PPT - Lecturing,
Exam-II,
26 Deletion Page no 116- Discussion End Sem,
123 Quiz, HA.
3 3 Ref Book [1], PPT - Lecturing, Sem-in-
Binary Search Tree Implementation CH 4.3 Discussion Exam-II,
27 Page no 116- End Sem,
123
Quiz, HA.
Sess. Book No [CH Teaching- Evaluation
No. CO COI Topic (s) No] [Page No] Learning Component
Methods s
Sem-in-
3 3 Ref Book [1], PPT- Exam-II,
28 AVL Tree – Rotations and Operations CH 4.4 Lecturing, End Sem,
Page no 127- Discussion Quiz, HA,
138
ALM.
Sem-in-
3 3 AVL Tree Implementation Ref Book [1], PPT - Lecturing, Exam-II,
29 CH 4.4 Discussion
8
Page no 127- End Sem,
138 Quiz, HA,
ALM.
Sem-in-
3 3 Ref Book [1], PPT - Lecturing, Exam-II,
30 Heap Sort Analysis and Implementation CH 7.5 Discussion End Sem,
Page no 242-
Quiz, HA,
245
ALM.
Sem-in-
3 4 T. Book [1], PPT - Lecturing, Exam-II,
31 B – Tree Construction CH 4.7 Page Discussion End Sem,
no 134-138
Quiz, HA,
ALM.
Sem-in-
3 4 RefBook [1], PPT - Lecturing, Exam-II,
32 Splay tree operations CH 4.5,Page Discussion End Sem,
no 138 - 141
Quiz, HA,
ALM.
Sem-in-
3 4 RefBook [1], PPT - Lecturing, Exam-II,
33 Construction of Red-Black trees CH 4.6, Page Discussion End Sem,
no 134- 140
Quiz, HA,
ALM.
Sem-in-
4 1 Graphs Representation – Adjacency Matrix Ref Book [1], PPT - Lecturing, Exam-II,
34 CH 9.1 Discussion End Sem,
Page no 300-
Quiz, HA,
302
ALM.
Sem-in-
4 1 Ref Book [1], PPT - Lecturing, Exam-II,
35 Graphs Representation – Linked List CH 9.1 Discussion End Sem,
Page no 300-
Quiz, HA,
302
ALM.
Sem-in-
4 1 Transitive Closure Ref Book [1], PPT - Lecturing, Exam-II,
36 CH 9.1 Discussion End Sem,
Page no 299-
Quiz, HA,
300
ALM.
Sem-in-
4 2 Ref Book [1], PPT - Lecturing, Exam-II,
37 Graph Traversal – BFS, DFS CH 9.2 Discussion End Sem,
Page no 302 -
Quiz, HA,
306
ALM.
4 3 Ref Book [1], Sem-in-
Minimum Spanning Tree – Prim’s Algorithm CH 9.5 PPT - Lecturing, Exam-II,
38 Page no 330- Discussion End Sem,
332
Quiz, HA,
ALM.
4 4 Ref Book [1], Sem-in-
Minimum Spanning Tree - Kruskal’s Algorithm CH 9.5 PPT - Lecturing, Exam-II,
39 Page no 332 – Discussion End Sem,
335
Quiz, HA,
ALM.
9
SESSION WISE TEACHING – LEARNING PLAN
SESSION NUMBER: 1
Session Outcome: 1. Students come to know the types of data structures.
2. Students come to know asymptotic notations and complexity analysis.
10
Time in Topic BTL Teaching– Active
Minutes Learning Learning
Method Methods
05 Introducing about Data Structures and Syllabus and LTPS 1
Structure
20 Lecture 1: 1
Explain the classification of Data Structures - Linear & Non- Ppt –
Linear. lecturing,
20 Lecture 2: 2 discusiion
Mathematical Background. Definitions of Asymptotic notations
O(n), Ω(n) and Ɵ(n) – Best, Average and Worst Case
Ref: chapter-2 of Data structures and algorithm analysis in C
by Mark Allen Weiss
05 Conclusion and Summary
Home Assignment:
1. Write a program to count the number of subsequences
whose sum is greater than 7 in an Array of N elements.
SESSION NUMBER: 2
Session Outcome: 1. Students are come to know about running time of an algorithm.
2. Students are able to identify the incremental order of time complexity.
Teaching– Active
Time in Topic
BTL Learning Learning
Minutes
Method Methods
05 Recap
Lecture-1: Running time calculations, A simple example Ppt –
General rules Lecture,
Discussio
Ask the students to find the running time of following n
problems.
I) Problem
for( i=0; i < n-1 ; i++)
Printf(“%d”, i+75);
II) Problem
for( i=0; i < n-1 ; i++)
{
For (j=0; j<m-2; j++)
20 1
Printf(“*”);
Printf(“\n”);
}
III) Problem
For( i=0; i < n ; i++)
{ For (j=0;j<n;j++)
Printf(“*”);
Printf(“\n”);
}
05 Conclusion
SESSION NUMBER: 3
Session Outcome: 1. Students able to implement insertion sort.
2. Students able to analyze time complexity of insertion sort.
Teaching– Active
Time in BT L
Topic Learning Learning
Minutes Method Methods
5 Recap
Subtopic -1 (Lecture):
20 Explain How insertion sort works and analyze its time
complexity with an example 2
Practice session 1:
10 3
Consider there are 10 group of members in cinema hall for Ppt –
taking tickets from counter, arrange the group of members in Lecture,
a line according to the height of a persons. The height of Discussion
persons is given in centimeters as follows.
165, 173, 195, 150, 179, 184, 139, 145, 169, 151.
After each iteration, draw the elements in array.
Practice session -2:
10 Delhi City, where peace prevails most of the time. Not 3
everyone is a huge fan of peace, though. Certainly not Mr.
Rajesh, whose identity is not known to us - yet. Mr. Rajesh
has somehow managed to bring zombies to Bangalore City
to attack and destroy the city. If he sees a zombie , he marks
them in his list with their power. After generating the entire
list of power of these creatures, he decides to arrange this
data. All the zombies arranged in ascending sorted manner
of their power.
The powers are given as: 12, 43, 10, 72, 55, 32, 21, 63, 18, 31
Implement bubble sort program to arrange the powers in
ascending order.
5 Conclusion
Home Assignment:
Arrange the following set of values in ascending order using
insertion sort. 43, 12, 10, 33, 53, 24, 21,17
SESSION NUMBER: 4
Session Outcome: 1. Students able to implement shell sort.
2. Students able to analyze time complexity of shell sort
Teaching– Active
Time BT L
To Learning Learnin
in
pic Method g
Minu
Method
tes
12
s
5 Recap
2
Subtopic -1 (Lecture):
10 Explain how shell sort works using shell's original sequence:
2
N/2, N/4, ..., 1 (repeatedly divide by 2). Explain Hibbard,
Sedgwick increments.
20 Practice session 1: Ask the students to implement shell sort by QUIZ
3 Ppt –
using insertion sort independently for each pass.
Algorithm: Lecture,
1) Read “n” elements as input in array. Discussion
2) Process
/* Identify the pass here and print the each passes elements
*/
3) Display the sorted as elements output.
Subtopic -2 (Lecture):
Analyze the time complexity of shell s o r t . Discuss what
10
disadvantages of insertion sort does the shell sort overcome. 4
[ Classic Data Structures 2Nd Ed. By Samanta,
SamantaDebasis]
5
Conclusion
SESSION NUMBER: 5
Session Outcome: 1. Students able to understand the quick sort.
2. Students able to analyze the time complexity of quick sort.
SESSION NUMBER: 6
Session Outcome: 1. Students able to implement quick sort algorithm.
SESSION NUMBER: 7
13
Session Outcome: 1. Students come to understand the concept and implementation of merge sort
2. Students able to analyze the time complexity of merge sort
Teaching– Active
Time BT L
To Learning Learnin
in
pic Method g
Minu
Method
tes
s
5 Recap / Introduction
2
Subtopic-1(lecture):
10 Explain Merge sort and its basics with an example.
2
20 Practice session - 1: 2
Here is an array of ten integers: QUIZ
53 8 9 1 7 0 2 6 4 Ppt –
Draw this array after the TWO recursive calls of merge sort Lecture,
are completed, and before the final merge step has occurred. Discussion
Subtopic-2(lecture):
10 Analyze the complexity of merge sort algorithm.
MergeSort(arr[], l, r) 3
If r > l
{1. Find the middle point to divide the array into two halves:
middle m = (l+r)/2
2. Call mergeSort for first half:
Call mergeSort(arr, l, m)
3. Call mergeSort for second half:
Call mergeSort(arr, m+1, r)
4. Merge the two halves sorted in step 2&3:
Call merge(arr, l, m, r)
05 Conclusion
SESSION NUMBER: 08
Session Outcome: 1. Students able to understand the basic concept of bucket Sort
2. Students able to analyze the time complexity
SESSION NUMBER: 09
Session Outcome:1. Students able understand the external sorting.
2. Students able to analyze the time complexity of external sorting.
Time in Topic BT Teaching– Active
Minutes L Learning Learning
Method Methods
14
5 Recap / Introduction:
Sub-topic-1(lecture):
10 Explain External sorting and two phases of external sorting (1. 2
Sort phase 2. Merge phase) with an example.
Practice session - 1:
Ask the students to write an algorithm to sort the elements using
10 2
External sorting technique and also analyze its time
complexity.
Practice Session(LTC): Lecturing,
Ask the students to write and execute a C program to solve Discussion
the following example.
N = 14, M = 3 (14 records on tape Ta1, memory capacity:
20 3 records.) 3
T1: 17, 3, 29, 56, 24, 18, 4, 9, 10, 6, 45, 36, 11, 43
[Donald Knuth, The Art of Computer Programming, Volume 3:
Sorting and Searching, Second Edition. Addison-Wesley]
5 Conclusion
SESSION NUMBER: 10
Session Outcome: 1. Students come to know about singly linked list operations create, insert, delete, and display
2. Students able to implement singly linked list
Teaching Active
Time in Topic
BTL Learning Learning
Minutes Method Methods
5 2
Recap / Introduction:
Lecture
Explain singly linked list operations with diagram’s
20 1
Ref: chapter-3 of Data structures and algorithm analysis in C by
Mark Allen Weiss
Practice Session 1: Ppt –
Lecture,
Suppose the Personnel file of a small company contain the Discussion
following data for all its employees SSN (social security 3
20 number), Name and salary. A Linked list is used to store the
data. Ask the students to write a function to sort the records
based on SSN?
struct node
{ int train_no;
char train_name[20], source[20], destination[20];
float AC1_ fare, AC2_fare, AC3_fare, SL_fare, Gen_fare;
} t[20];
SESSION NUMBER: 11
Session outcome: 1. Students come to know about doubly linked list operations create, insert, delete, and display
2. Students able to implement doubly linked list
15
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap / Introduction:
20 Lecture: Explain doubly linked list operations with diagram’s 2
Ref: chapter-3 of Data structures and algorithm analysis in C by
3
Ppt –
20 1. Practice Session-1: In a browsing center, the customer Lecture,
Kishore is sitting in a computer and browses the face book. Once Discussion
he opened the face book, he wants to have a page of his friend
Hari and gave a friend request and come back to his home page
and open his other friend Lalitha’s page and read all her status
and going on doing like this. Implement this as an operation of
creation, insertion, deletion and searching of friends using
Double Linked List.
05 Conclusion
SESSION NUMBER: 12
Session outcome: 1. Students come to know about circular linked list operations create, insert, delete, and display
2. Students able to implement circular linked list
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap / Introduction:
20 Lecture: 2
Explain Insertion of elements at begin, at the given position and at
end operations of SLL, Circular SLL, and DLL 3
Ppt –
Ask the students to execute deletion at begin and end operation on Lecture,
SLL, Circular SLL, and DLL Discussion
20 Practice Session-1:
In a Coco game, Krishna, Vasu, Shiva, Ganesh, Sathesh, Naveen
and Anand are playing at an University ground. The rally tag is
given to Anand. Anand stood and ran around the players and
push Krishna as his tag. Imitate it as a circular linked list of
Single and Double direction list and display all the players
name in the list. Also Find how is the shortest person in the
list.
5 Conclusion
SESSION NUMBER: 13
Session outcome: 1. Students come to know about stack through linked list
2. Students able to implement stack operations using linked list
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap / Introduction: 1
Lecture Just one
20 Linked list implementation of stacks 2
Ppt – minute
Practice Session paper
16
20 Ask the students to write and execute a program to implement 3 Lecture,
Stack Discussion
5 Conclusion
SESSION NUMBER: 14
Session outcome: 1. Students come to know about queue through linked list
2. Students able to implement queue operations using linked list
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes Method Methods
5 Recap / Introduction: 1
Lecture Just one
20 Linked list implementation of queue 2
Ppt – minute
Practice Session Lecture, paper
20 In a railway station an engine is connected with the N 3 Discussion
number of Bogies which are connected in one direction from
engine to the last bogie. Implement this as an operation of
creation, insertion, deletion and searching of a bogie using
Single Linked List.
5 Conclusion
SESSION NUMBER: 15
Session Outcome: 1. Students come to know about operations of stack.
2. Students able to convert infix to postfix Expression.
17
SESSION NUMBER: 16
Session Outcome: 1. Students able to implement infix to postfix expression conversion
2. Students able to analyze the time complexity of infix to postfix expression conversion
SESSION NUMBER: 17
Session Outcome: 1. Students able to evaluate postfix expressions using stack.
2. Students able to use the recursion and to know types of recursion.
SESSION NUMBER: 18
Session Outcome: 1. Students able to understand the types of queues- Circular Queue
18
2. Students able to solve real-time problems using queues
Teaching – Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
Recap / Introduction:
5
Practice session-1:
Use queue concept to implement the following to print 15 files.
In the situation where there are multiple users or a networked
computer system, you probably share a printer with other users.
20 When you request to print a file, your request is added to the print 2
queue. When your request reaches the front of the print queue, your
file is printed. This ensures that only one person at a time has
access to the printer and that this access shows the served user
leaves the queue first.- Circular queue implementation.
Practice session-2: Ppt – One-
Use Queue data structure to print binary numbers from 1 to n. Lecture, minute
1) Create an empty queue of strings Discussion Paper
2) Enqueue the first binary number “1” to queue.
3) Now run a loop for generating and printing n Binary
Numbers.
20 2
a) Dequeue and Print the front of queue.
b) Append“0”attheendoffrontitemandenqueueit.
c) Append “1” at the end of front item and enqueue it.
Input: n=5
Output: 1,10,11,100,101
05 Conclusion and Summary
SESSION NUMBER: 19
Session Outcome: 1. Students able to understand the application of queues- Double ended queue
2. Students able to implement real-time problems using queues
Teaching – Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
Recap / Introduction:
5
Practice session-1:
Input: n=5
Output: 1,10,11,100,101
19
10 Ask the students to execute practice session-2. 3
05 Conclusion and Summary
SESSION NUMBER: 20
Session Out Come: 1. Students come to know about priority queues
2. Students able to implement binary heap
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
5 Conclusion
SESSION NUMBER: 21
Session Outcome: 1. Students come to know about the concept of separate chaining
2. Students able to resolve collisions using separate chaining
Teaching– Active
Time(min) Topic BTL Learning Learning
Method Methods
5 Recap / Introduction:
Subtopic -1 (Lecture):
Explanation of separate chaining using hashing technique.
10 1
Initialization routine for separate chaining hash table.
Reference: Data structures by Mark Allen Weiss.
20
Subtopic -2 (Lecture):
Explanation of separate chaining using hashing technique.
Initialization routine for separate chaining hash table. Ppt –
10 Reference: Data structures by Mark Allen Weiss. 1 Lecture,
Discussion
Practice session:
10 2
Ask the students to construct hash table using separate
chaining for the following elements of table size 15, design
your own hash function.
23,27,98,6,17,51,77,72,36,53.
Ask the students to implement initialization function
10 Practice session: 4
Ask the students to implement the following operations on
hash table using separate chaining
1.insert ()
2. search ()
Reference: Data structures by Mark Allen Weiss.
Conclusion
5
SESSION NUMBER: 22
Session Outcome: 1. Students able to resolve collisions using different collision resolution techniques.
2 Students able to implement linear probing, quadratic probing
Time in Topic BTL Teaching– Active
Minutes Learning Learning
Method Methods
5 Recap / Introduction:
20 Practice session 1 3
*Ask the students to insert keys {43, 55, 27, 73, 67} in to
hash table of size 11
SESSION NUMBER: 23
Session Outcome: 1. Students able to resolve collisions using different collision resolution techniques.
2 Students able to implement double hashing.
Time in Topic BTL Teaching– Active
Minutes Learning Learning
Method Methods
5 Recap / Introduction:
21
20 Sub topic -1 (Lecture): 1
Explanation of Open Addressing and different types of
strategies to resolve Collision.
Explanation of double hashing and its implementation.
Reference: Data structures by Mark Allen Weiss
20 Practice session 1 3
*Ask the students to insert keys {18, 41, 22, 44, 59, 32, 31, Ppt – Lecture,
73} in to hash table of size 13 Discussion
Reference:http://www.eecs.yorku.ca/course_archive/2004-05/
W/2011N/Notes/hash_tables_2.pdf
*Implement double hashing to insert keys.
5 Summary &conclusion
SESSION NUMBER: 24
Session Outcome: 1. Students able to resolve collisions using different collision resolution techniques.
2 Students able to implement linear probing, quadratic probing,
double hashing.
Time in Topic BTL Teaching– Active
Minutes Learning Learning
Method Methods
5 Recap / Introduction:
SESSION NUMBER: 25
Session Outcome: 1. Students come to know about tree traversals.
2. Students able to solve real world practical problems on expression tree.
5 Conclusion
SESSION NUMBER: 26
Session outcome: 1. Students come to know about construction of binary search tree
2. Students able to perform binary search tree operations
Teaching– Active
Time in
Topic BTL Learning Learning
Minutes
Method Methods
Ppt –
5 Recap / Introduction:
Lecture,
Subtopic-1(lecture): Discussion
Explain Tree terminology, Binary Tree – Construction and display.
20 1
Practice session -1:
20 Ask the students to construct a binary search tree for the 3
given elements 21, 32, 19, -23, 15, 65, 48, 7, 9, 55.
5 Conclusion
Home Assignment:
a. Show the result of inserting 3, 1, 4, 6, 9, 2, 5, 7 into an
initially empty binary search tree.
b. Show the result of deleting the root.
SESSION NUMBER: 27
Session Outcome: 1. Students able to implement binary search tree operations
SESSION NUMBER: 28
Session Outcome: 1. Students come to know about AVL tree rotations.
SESSION NUMBER: 29
Session Outcome: 1. Students able to implement operations on AVL tree.
Time in Topic BT L Teaching– Active
Minutes Learning Learnin
Method g
Method
s
5 Recap / Introduction:
Sub-topic – 1 (Lecture)
AVL tree ADT creation along with required function
20 1
prototypes.
Reference: Data Structures by Mark Allen Weiss
Practice Session-1
Ask students to implement an AVL Tree with necessary
20 1
functions.
Ppt –
Reference: Data Structures by Mark Allen Weiss
5 Conclusion Lecture,
Discussio
n
SESSION NUMBER: 30
Session Outcome: 1. Students able to implement heap sort.
24
2. Students able to analyze time complexities of heap sort.
Teaching– Active
Time in BT L
To Learning Learning
Minu
pic Method Methods
tes
5 Recap / Introduction:
2
Subtopic-1(lecture):
10 Explain Heap order property and two phases of heap sort (1.
2
Heap Creation 2. Sorting via deletion) with an example
Explain Max and Min Heap: QUIZ
Ppt –
Heap Property: All nodes are either greater than or equal to or Lecture,
less than or equal to each of its children. If the parent nodes are Discussion
greater than their child nodes, heap is called a Max-Heap, and if
the parent nodes are smaller than their child nodes, heap is
called Min-Heap.
20 Practice session - 1:
3
Ask the students to write an algorithm to sort the elements using
heap sort technique and also analyse its time complexity.
Analysis time Complexity of Heap Sort
Practice session - 2:
10 Suppose we are sorting an array of eight integers using heapsort,
and we have just finished some heapify (either maxheapify or 4
minheapify) operations. The array now looks like this: 16 14 15
10 12 27 28 How many heapify operations have been performed
on root of heap?
05 Conclusion
SESSION NUMBER: 31
Session Outcome: 1. Students come to know about B tree construction
2. Students able to perform insert and delete operation on B tree
SESSION NUMBER : 32
25
Session Outcome: 1.Students comes to know about splay tree construction
2. Students are able to perform splay tree operations
SESSION NUMBER: 33
Session Outcome: 1.Students comes to know about splay tree construction
2. Students are able to perform splay tree operations
SESSION NUMBER: 34
Session outcome: 1. Students come to understand the representing of graphs.
Teaching Activ
Time in
Topic BTL – e
Minutes
Learning Lear
Method ning
Meth
ods
5 Recap / Introduction:
Explanation of Graph representation – adjacency matrix
20 2
Practice session1: represent the given graph in adjacency
20 2 Ppt –
matrix
Lecture,
26
Discussio
n
05 Conclusion
SESSION NUMBER: 35
Session outcome: 1. Students come to understand the representing of graphs.
Teaching Activ
Time in
Topic BTL – e
Minutes
Learning Lear
Method ning
Meth
ods
5 Recap / Introduction:
Explanation of Graph representation –adjacency list
20 2
representation
Practice session1: represent the given graph in list
Ppt –
20 representation. 2
Lecture,
Discussio
n
05 Conclusion
SESSION NUMBER: 36
Session outcome: 1. Students come to understand the transitive closure
Teaching Active
Time in
Topic BTL – Lear
Minutes
Learning ning
Method Meth
ods
5 Recap / Introduction:
Explain Definitions of DAG, Transitive closure.
20 2
Example applications of graphs such as the airport system,
10 2 Ppt –
Traffic flow modeling etc.
Lecture,
27
Lecture: Discussio
10 Ask students to find transitive closure for the given graph 2
n
05 Conclusion
SESSION NUMBER: 37
Session outcome: 1. Students come to know about graph traversal – BFS and DFS
Teaching Activ
Time in
Topic BTL – e
Minutes
Learning Lear
Method ning
Meth
ods
5 Recap / Introduction:
Explain Definitions of graph traversals and introduce graph
20 2
traversal technique – BFS, DFS
Practice session1:
Ppt –
20 Find BFS and DFS for the given graph 2
Lecture,
Discussio
n
05 Conclusion
Home Assignment:
Given a matrix M x N of integers whose each cell contains
positive, negative or zero value. Determine the minimum
number of passes required to convert all negative values to
positive values.
SESSION NUMBER: 38
Session outcome: 1. Students able to derive minimum spanning tree from a given graph.
2. Students able to use prim’s algorithm.
Teachi Activ
BT L
Time in Topic ng– e
Minutes Learni Lear
ng ning
Metho Met
d hods
5 Recap / Introduction:
Lecture:
20 Explain the Minimum spanning tree. 1
Explain Prim’s algorithm with the help of weighted graph
Practice session Ppt –
Apply Prim’s algorithm on a weighted graph to get minimum Lecture
20 spanning tree 2 ,
Discuss
ion
05 Conclusion
28
SESSION NUMBER: 39
Session outcome: 1. Students able to understand the use and applications of minimum spanning tree.
2. Students able to understand Kruskal’s minimum spanning tree algorithm.
Teachi Active
Time in Topic BTL ng– Learnin
Minutes Learn g
ing
Metho Method
d s
5 Recap / Introduction:
Explain what is spanning tree and minimum spanning tree.
10 2
Explain applications of minimum spanning tree
Explain about Krushkal’s minimum spanning tree algorithm
and how it used to find minimum spanning tree using Ppt –
20 2
diagrams. Lecture,
Discuss
Ask the students to analyze the time complexity of Krushkal’s ion
10 4
algorithm.
05 Conclusion
29