DESIGN AND ANALYSIS OF ALGORITHMS
[As per Choice Based Credit System (CBCS) scheme]
SEMESTER – IV
Course Code : 22CS2402 Credits : 04
Hours / : 03 Hours Total Hours : 39(Th)+26(P) Hours
Week
L–T–P–J : 3–0–2–0
Course Learning Objectives:
This Course will enable students to:
1. Analyze the non-recursive and recursive algorithms and to represent efficiency of
these algorithms in terms of the standard Asymptotic notations.
2. Acquire the knowledge of Brute Force and Divide and Conquer techniques to design
the algorithms and apply these methods in designing algorithms to solve a given
problem.
3. Master the Decrease and Conquer, Transform and Conquer algorithm design
techniques, and Time versus Space Trade-offs.
4. Learn Greedy method and dynamic programming methods and apply these methods in
designing algorithms to solve a given problem.
5. Understand the importance of Backtracking and Branch and Bound algorithm design
techniques to solve a given problem.
Teaching-Learning Process (General Instructions)
These are sample new pedagogical methods, where teacher can use to accelerate the
attainment of the various course outcomes.
1. Lecture method means it includes not only traditional lecture method, but different
type of teaching methods may be adopted to develop the course outcomes.
2. Interactive Teaching: Adopt the Active learning that includes brainstorming,
discussing, group work, focused listening, formulating questions, notetaking,
annotating, and roleplaying.
3. Show Video/animation films to explain functioning of various concepts.
4. Encourage Collaborative (Group Learning) Learning in the class.
5. To make Critical thinking, ask at least three Higher order Thinking questions in the
class.
6. Adopt Problem Based Learning, which fosters students’ Analytical skills, develop
thinking skills such as the ability to evaluate, generalize, and analyse information
rather than simply recall it.
7. Show the different ways to solve the same problem and encourage the students to
come up with their own creative ways to solve them.
8. Discuss how every concept can be applied to the real world - and when that's
possible, it helps improve the students' understanding.
UNIT – I 08 Hours
INTRODUCTION:
What is an Algorithm? Fundamentals of Algorithmic Problem Solving.
(Text Book-1: Chapter 1: 1.1 to 1.2)
FUNDAMENTALS OF THE ALGORITHMS EFFICIENCY:
Analysis Framework, Asymptotic Notations and Standard notations and common functions
(Text Book-2: Chapter 3: 3.1, 3.2),
Mathematical Analysis of Non-recursive and Recursive Algorithms,
(Text Book-1: Chapter 2: 2.1, 2.3, 2.4,)
UNIT – II 08 Hours
BRUTE FORCE:
Background, Selection Sort, Brute-Force String Matching. TSP
(Text Book-1: Chapter 3: 3.1, 3.2)
DIVIDE AND CONQUER:
General method, Recurrences: The substitution method, The recursion-tree method, The
master method.
(Text Book-2: Chapter 4: 4.4, 4.5),
Merge sort, Quick sort, Binary Search, Multiplication of large integers,
Case study: Strassen’s Matrix Multiplication.
(Text Book-1: Chapter 4: 4.1 to 4.3, 4.5)
UNIT – III 06 Hours
DECREASE & CONQUER:
General method, Insertion Sort, Graph algorithms: Depth First Search, Breadth First Search,
Topological Sorting
TRANSFORM AND CONQUER:
Case study: Heaps and Heap sort.
TIME AND SPACE TRADEOFFS:
Input Enhancement in String Matching: Horspool’s algorithm, Hashing: Open and Closed
hashing.
(Text Book-1: Chapter 5: 5.1 to 5.3, Chapter 6: 6.3 to 6.4, Chapter 7: 7.2 to 7.3)
UNIT – IV 9 Hours
GREEDY TECHNIQUE:
General method of Greedy technique, Single-Source Shortest Paths: General method, The
Bellman-Ford algorithm, Single-Source Shortest Paths in DAGs, Dijkstra’s Algorithm
(Text Book-2: Chapter 24: 24.1 to 24.3).
Minimum Spanning Trees: Prim’s Algorithm, Optimal Tree problem: Huffman Trees;
Case study: Kruskal’s Algorithm. Fractional Problem
(Text Book-1: Chapter 9: 9.1, 9.2, 9.4).
DYNAMIC PROGRAMMING:
General method, The Floyd-Warshall Algorithm, Johnson’s algorithm for sparse graphs (Text
Book-2: Chapter 25: 25.1 to 25.3),
The Knapsack problem (Text Book-1: Chapter 8: 8.4).
UNIT – V 08 Hours
LIMITATIONS OF ALGORITHMIC POWER
P, NP and NP-complete problems (Text Book-1: Chapter 11: 11.3)
BACKTRACKING:
General method, N-Queens problem, Subset-sum problem.
(Text Book-1: Chapter 12: 12.1)
BRANCH AND BOUND:
General method, Travelling Salesman problem, Approximation algorithms for TSP.
Case study: Knapsack Problem.
(Text Book-1: Chapter 12: 12.2, 12.3)
Bloom’s
Course
Description Taxonomy
Outcome
Level
At the end of the course the student will be able to:
Exemplify the algorithm design techniques and standard
Asymptotic notations. Analyze non-recursive and recursive
1 algorithms to obtain worst-case running times of algorithms using L3
asymptotic analysis
Interpret the brute-force, divide-and-conquer paradigms and
explain when an algorithmic design situation calls for it. Recite
2 algorithms that employ this paradigm. Synthesize divide-and- L3
conquer algorithms. Derive and solve recurrences describing the
performance of divide-and-conquer algorithms.
Demonstrate the Decrease and Conquer, Transform and Conquer
3 algorithm design techniques and analyze the performance of these L3
algorithms.
Identify and interpret the greedy technique, dynamic-
programming paradigm as to when an algorithmic design situation
4 calls for it. Recite algorithms that employ this paradigm. Synthesize L3
dynamic-programming algorithms and analyze them
Illustrate the Backtracking, Branch and Bound algorithm design
paradigms and explain when an algorithmic design situation calls
5 L3
for it. Recite algorithms that employ these paradigms. Summarize
the limitations of algorithmic power.
Table: Mapping Levels of COs to POs / PSOs
COs Program Outcomes (POs) PSOs
1 2 3 4 5 6 7 8 9 10 11 12 1 2
CO1 3 3 2 3
CO2 3 3 2 2 3
CO3 3 3 1 3
CO4 3 3 2 2 3
CO5 3 3 1 3
3: Substantial (High) 2: Moderate (Medium) 1: Poor (Low)
TEXT BOOKS:
1. Anany Levitin, “Introduction to the Design & Analysis of Algorithms”, 2nd Edition, Pearson
Education, 2011.
2. Thomas H. Cormen, Charles E.Leiserson, Ronald L. Rivest, Clifford Stein, “Introduction to
Algorithms”, 3rd Edition, PHI, 2014.
REFERENCE BOOKS:
1. Horowitz E., Sahni S., Rajasekaran S, “Computer Algorithms”, Galgotia Publications, 2001.
2. R.C.T. Lee, S.S. Tseng, R.C. Chang & Y.T.Tsai, “Introduction to the Design and Analysis of
Algorithms A Strategic Approach”, Tata McGraw Hill, 2005.
E-Resources:
1. https://nptel.ac.in/courses/106/101/106101060/
2. http://cse01-iiith.vlabs.ac.in/
3. http://openclassroom.stanford.edu/MainFolder/CoursePage.php?course=IntroToAlgorith
ms
4. https://www.coursera.org/specializations/algorithms
Activity Based Learning (Suggested Activities in Class)
1. Real world problem solving and puzzles using group discussion. E.g., Fake coin
identification, Cabbage puzzle, Konigsberg bridge puzzle etc.,
2. Demonstration of solution to a problem through programming.
LABORATORY EXPERIMENTS
Total Contact Hours: 26
Following are experiments to be carried out using either C programming language or Object-oriented
programming language:
1. Apply divide and conquer method and Design a C program to implementation of Binary Search
algorithm.
2. Sort a given set of n integer elements using Merge Sort method and compute its time complexity.
Demonstrate this algorithm using Divide-and-Conquer method.
3. Sort a given set of n integer elements using Quick Sort method and compute its time complexity.
Demonstrate this algorithm using Divide-and-Conquer method.
4. Incorporate the array data structure and demonstrate whether a given
unweighted graph isconnected or not using DFS method.
5. Implement the graph traversal technique using BFS method to print all the
nodes reachablefrom a given starting node in an unweighted graph.
6. Compute the Transitive Closure for a given directed graph using Warshall’s algorithm.
7. For a given weighted graph, construct an All-Pairs Shortest Paths problem using
Floyd’s algorithm and implement this algorithm to find the shortest distance and
their shortest paths for every pair of vertices.
8. Implement 0/1 Knapsack problem using Dynamic Programming Memory Functions
technique
9. Find Minimum Cost Spanning Tree for a given weighted graph using Prim’s
and Kruskal’salgorithm.
10. From a given vertex in a weighted connected graph, determine the Single Source
Shortest Pathsusing Dijkstra’s algorithm.
11. Mini project proposal should be submitted and Implementation should be done
based on theproblem stated in the proposal
Open ended experiments
1. Implement Fractional Knapsack problem using Greedy Method.
2. Implement N-Queens problem using Backtracking technique.
3. implementation of Travelling Sales man problem using Dynamic programming
**********************************