R1UC407B Design and Analysis of Algorithm
R1UC407B Design and Analysis of Algorithm
FRAMEWORK
The Course Pack is a comprehensive and complete pedagogical guideline document that describes the
components of instruction delivery by a faculty member. It consists of the scheme of the course, Course
Overview, Course Objectives, Prerequisite course, Program-specific Outcomes (PSOs), Course
outcomes (COs), Bloom’s taxonomy (Knowledge Levels), Types of Courses, Course articulation
matrix, Course assessment patterns, Course content, Lesson Plan, Bibliography, Problem-based
learning/case-studies/clinical, and Student-Centered learning (self- learning towards life-long-
learning). It not only provides a uniform design of Course delivery across the University but also
ensures freedom and flexibility to introduce innovations in learning and teaching and create vivid kinds
of assessment tools (alternate assessment tools) by a faculty member.
The course pack is developed by the faculty member teaching a course. If more than one faculty
teaches the same course, all the faculty members teaching the course shall be formed as a cluster,
and a senior faculty member (Course-lead) lead the Course delivery design in a team effort. The
Course Pack provides ample scope and opportunity to bring innovations in teaching pedagogies in
a school/department.
Hence, the Course pack is a comprehensive learning-teaching strategy framework to be followed by all
the faculty members in schools/departments in the university. It is not only a tool for measuring the
learning of a class but also analyses the achievement levels (learning outcomes of the course) of all the
students in a class in a continuous manner.
SCHEME
The scheme is an overview of work-integrated learning opportunities and gets students out into the real world. This
will give what a course entails.
Practical
Tutorial
Tutorial
0 0
Theory
delivery
study
Self-
SEE
CIE
Practical 1 4
Self-study 1
Total 5 8 45 0 30 105 50% 50%
Course Lead Dr. Ashok Kumar Yadav Course Dr. Mili Dhar
Coordinator
Names Course Theory Practical
Instructors Faculty Name Faculty Name
Mandeep Mandeep
COURSE OVERVIEW
An Algorithm is a sequence of steps to solve a problem. Design and Analysis of Algorithm is very important
for designing algorithm to solve different types of problems in the branch of computer science and information
technology. This tutorial introduces the fundamental concepts of Designing Strategies, Complexity analysis of
Algorithms, followed by problems on Graph Theory and Sorting methods. This tutorial also includes the basic
concepts on Complexity theory.
PREREQUISITE COURSE
This course will introduce students to searching and sorting as well as data structures like stack, queue, and binary tree.
Students will write many programs around these topics during this course. The objective of the course:
• Analyze and design different searching and sorting algorithm algorithms based upon different designing
approaches.
• Analyze and design different tree algorithms based upon different designing approaches.
• Design efficient algorithmic techniques for solving industry oriented real time problems using Greedy Algorithm.
• Design efficient algorithmic techniques for solving industry oriented real time problems using Dynamic
Programming.
• Apply and synthesize efficient algorithms.
After the completion of the course, the student will be able to:
Problem Analysis: Identify, formulate, review research literature and analyse complex
PO2: engineering problems reaching substantiated conclusions with consideration for sustainable
development. (WK1 to WK4).
Design/Development of Solutions: Design creative solutions for complex engineering
problems and design/develop systems/components/processes to meet identified needs with
PO3:
consideration for the public health and safety, whole-life cost, net zero carbon, culture, society
and environment as required. (WK5).
Conduct Investigations of Complex Problems: Conduct investigations of complex
PO4: engineering problems using research-based knowledge including design of experiments,
modelling, analysis & interpretation of data to provide valid conclusions. (WK8).
Modern Tool Usage: Create, select and apply appropriate techniques, resources and modern
PO5: engineering & IT tools, including prediction and modelling recognizing their limitations to solve
complex engineering problems. (WK2 and WK6).
The Engineer and The World: Analyze and evaluate societal and environmental aspects while
PO6: solving complex engineering problems for its impact on sustainability with reference to
economy, health, safety, legal framework, culture and environment. (WK1, WK5, and WK7).
Ethics: Apply ethical principles and commit to professional ethics, human values, diversity and
PO7:
inclusion; adhere to national & international laws. (WK9).
Have the ability to work with emerging technologies in Computer Science and Engineering
PSO1:
requisite to Industry 4.0.
Demonstrate Engineering Practice learned through industry internship and research project
PSO2:
to solve live problems in various domains.
COURSE ARTICULATIONMATRIX
PSO1
PSO2
PO10
PO11
PO1
PO2
PO3
PO4
PO5
PO6
PO7
PO8
PO9
COs#/POs
R1UC407B.1 3 3 3
R1UC407B.2 3 2 2 2
R1UC407B.3 3 2 2
R1UC407B.4 3 2 2
R1UC407B.5 3 3 3 3 3
Note: 1-Low, 2-Medium, 3-High
COURSE CONTENT
Content
THEORY:
Introduction
Notion of an Algorithm, Fundamentals of Algorithmic Problem Solving, Problem Types, Analysis of Algorithm
Efficiency, Asymptotic Notations and their properties, Analysis Framework, Empirical Analysis, Mathematical
analysis for Recursive and Non-recursive algorithms, Solving Recurrence relations.
List of Practical
1. Write a program to sort given set of numbers in ascending/descending order using Bubble sort and also
search a number using binary search.
2. Write a program to sort given set of numbers in ascending/descending order using Insertion sort and also
search a number using linear search.
3. Write a program to sort given set of numbers in ascending/descending order using Quick sort and any other
sorting algorithm. Also record the time taken by these two programs and compare them.
4. Write a program to sort given set of numbers using Heap sort.
6. Write a program to sort given set of numbers in ascending/descending order using merge sort
15. Write a program to implement minimum spanning trees using Prims algorithm
18. Compute the transitive closure of a given directed graph using Warshall's algorithm. Write a program to
implement the shortest path algorithm
19. Write a program to solve the LCS problem.
27. Write a program to implement the Greedy algorithm using Activity Selection Problem.
30. Write a program to implement Greedy algorithm using Task Scheduling Problem
COURSE ASSESSMENT
The course assessment patterns are the assessment tools used both in formative and summative
examinations.
* Passing criteria – 30% of marks to be secured in the lab exam conducted by two examiners
(one internal + one external).
Text Book
1. Thomas H. Coreman, Charles E. Leiserson and Ronald L. Rivest, “Introduction to Algorithms”, The MIT
Press, 3rd edition, 2009.
Reference Books
1. Ellis Horowitz, Sartaj Sahni, Sanguthevar Rajasekaran. Fundamentals of Computer Algorithms, MIT Press,
Second Edition (Indian reprint: Prentice-Hall), 2008.
2. Aho, Hopcraft, Ullman, “The Design and Analysis of Computer Algorithms” Pearson Education.
Journals/Magazines/Govt.Reports/Gazatte/IndustryTrends
1. https://leetcode.com
SWAYAM/NPTEL/MOOCs Certification
1. Code Tantra
2. Coding Ninjas
3. Code Chef
4. https://onlinecourses.nptel.ac.in/noc19_cs47/preview (Swayam)
5. GeeksforGeeks
COURSEPACK
FRAMEWORK
PROBLEM-BASED LEARNING
Exercises in Problem-based Learning (Value Added Experiments)
SNo Problem KL
1 Write a program to implement Minimum Cost spanning tree. KL5
2 Write a program to implement Sum of subset problem. KL5
3 Write a program to implement Task Scheduling Problem using Greedy technique. KL5
4 Write a program to implement Activity Selection Problem using Greedy technique. KL5
5 Compute the transitive closure of a given directed graph using Warshall's algorithm. Write KL6
a program to implement shortest path algorithm.
6 Write a program to find all Hamiltonian Cycles in a connected undirected Graph G of n KL5
vertices using backtracking principle.
9 Find Minimum Cost Spanning Tree of a given connected undirected graph using KL6
Kruskal's algorithm. Use Union-Find algorithms in your program.
10 Find Minimum Cost Spanning Tree of a given undirected graph using Prim’s algorithm. KL6
11 Design a program to (a) Implement All-Pairs Shortest Paths problem using Floyd's KL6
algorithm.
(b) Implement Travelling Sales Person problem using Dynamic programming.
12 Design and implement to find a subset of a given set S = {Sl, S2, .... , Sn} of n positive KL6
integers whose SUM is equal to a given positive integer d. For example, if S ={1, 2, 5, 6,
8} and d= 9, there are two solutions {1,2,6}and {1,8}. Display a suitable message, if the
given problem instance doesn't have a solution.
13 Transpose of Matrix KL5
15 Given an array arr[] of size N-1 with integers in the range of [1, N], the task is to find the KL6
missing number from the first N integers.
16 Given a string, the task is to count all palindrome sub string in a given string. Length of KL6
palindrome sub string is greater than or equal to 2.
18 Given two strings, the task is to find if a string can be obtained by rotating another string KL6
by two places.
19 Given an expression string exp, write a program to examine whether the pairs and the KL5
orders of “{“, “}”, “(“, “)”, “[“, “]” are correct in the given expression.
20 Given a string, reverse it using stack. KL5
21 Given an integer k and a queue of integers, The task is to reverse the order of the first k KL6
elements of the queue, leaving the other elements in the same relative order.
22 Given a singly linked list with N nodes and a number X. The task is to find the node at KL5
the given index (X)(1 based index) of linked list.
23 Given a Linked List and a number N, write a function that returns the value at the Nth KL5
node from the end of the Linked List.
24 Given a linked list, check if the linked list has a loop (cycle) or not. The below diagram KL6
shows a linked list with a loop.
25 Given two sorted arrays arr1[] and arr2[] of sizes n and m in non-decreasing order. Merge KL5
them in sorted order without using any extra space. Modify arr1 so that it contains the
first N elements and modify arr2 so that it contains the last M elements.
26 Given a string S of size N, the task is to sort the string without changing the position of KL5
vowels.
27 Given an array arr[] of size N and a number K, where K is smaller than the size of the KL5
array. Find the K’th smallest element in the given array. Given that all array elements are
distinct.
28 Given the arrival and departure times of all trains that reach a railway station, the task is KL6
to find the minimum number of platforms required for the railway station so that no train
waits. We are given two arrays that represent the arrival and departure times of trains that
stop.
29 Given two strings ‘str1’ and ‘str2’ of size m and n respectively. The task is to KL6
remove/delete and insert the minimum number of characters from/in str1 to transform it
into str2. It could be possible that the same character needs to be removed/deleted from
one point of str1 and inserted at some another point.
30 Given are N ropes of different lengths, the task is to connect these ropes into one rope KL6
with minimum cost, such that the cost to connect two ropes is equal to the sum of their
lengths.
31 Given a binary search tree, task is to find Kth largest element in the binary search tree. KL6
32 Given a weighted graph and a source vertex in the graph, find the shortest paths from the KL6
source to all the other vertices in the given graph.
STUDENT-CENTERED LEARNING (Seff-Learning towards lifelong
learning)
Self-Learning (it’s a typical course-based project to be carried out by a whole class in groups of four students
each; they should exhibit higher level BTLs)
The students, in a group, are expected to conceive an idea based on the content (objectives/outcomes) and
apply the suitable knowledge to demonstrate their learning.
S. No Suggested Projects KL
1 Comparing Kruskal and Prim’s algorithm in MST. KL5
4 Solving Travelling Salesman Problem Using Greedy Algorithm and Brute Force KL3
Algorithm
5 Design and Analysis 0/1 Knapsack Problem. KL6
6 Design Coin Change Problem using Brute Force and Greedy Algorithm KL6
7 Comparing Exhaustive Search Algorithm and Greedy Algorithm in job Scheduling KL5
Problem
8 Build a Cash Flow Minimiser KL6
11 Build a Snakes & Ladders game, challenge the player to win in minimum number of KL6
moves. You can use BFS to compute it.
12 Make an application like Google Maps - You can use Dijkshtra’s algorithm to find the KL6
shortest paths, A* Search for more efficient & real time use.
13 Create a Binary Search Algorithm to Search for a Value with a Certain Precision KL6
15 Design the game- Place eight queens on an 8 × 8 chessboard so that no queen attacks KL6
another queen.
16 Build a game like SPACE- SHOOTER. KL6
18 Use a string compression algorithm, like run length encoding or Huffman coding KL3
20 Build a snake and Ladders game, challenge the player to win in minimum number of KL6
moves. You can use BFS to compute it.
B) SELF-LEARNING THROUGH MOOCs (Cognitive Skills):
1. Code tantra
2. https://www.coursera.org/courses?query=algorithm%20design
3. https://www.geeksforgeeks.org/learn-data-structures-and-algorithms-dsa-tutorial/?ref=shm