# Virtual University of Pakistan

## CS502 : Fundamentals of Algorithms

### Course Overview

#### Course Synopsis

This course is designed to provide students with an understanding of the principles and techniques used in the design and analysis of algorithms. The course is primarily theoretical and does not require programming, but it does require understanding of the notion of a mathematical proof and some knowledge of elementary discrete mathematics. We will discuss and analyze a variety of data structures and algorithms chosen for their importance and their illustration of fundamental concepts. We will emphasize analyzing the worst-case running time of an algorithm as a function of input size. We will also spend some time exploring the boundary between feasible computations, taken to be those doable in polynomial time, and infeasible computations

#### Course Learning Outcomes

At the end of this course you should be able to :

• Analyze the worst-case running time of an algorithm as a function of input size
• Solve Recurrence relations
• Understand and implement Divide and Conquer strategy
• Understand the concepts of Dynamic programming
• Understand the concepts of Greedy Algorithm
• Understand the concepts of Graph traversing
• Understand and explain basics of Complexity theory

#### Course Calendar

 Topic Lecture Resource Page Introduction,Implementation Issues, Analyzing Algorithms 1 Handouts 7-9 Model of Computation 2 Handouts 10-10 Brute-Force Algorithm,Running Time Analysis 3 Handouts 11-13 Analysis of the brute-force maxima algorithm 4 Handouts 14-17 Plane-sweep Algorithm its analysis and Comparison to Brute-force Algorithim 5 Handouts 18-22 Asymptotic Notation 6 Handouts 23-26 Divide and Conquer Strategy,Merge Sort 7 Handouts 27-28 Analysis of Merge Sort 8 Handouts 29-30 Assignment No. 01 The Iteration and Recursion Tree Methods for Solving Recurrence Relations 9 Handouts 31-33 Sieve Technique 10 Handouts 34-35 Analysis of Selection, Sorting, Heaps 11 Handouts 36-40 Heap sort algorithm 12 Handouts 41-45 Quick sort 13 Handouts 46-49 Average-case Analysis of Quicksort 14 Handouts 50-53 Assignment No. 02 In-place,Stable Sorting 15 Handouts 54-57 Radix sort 16 Handouts 71-72 Dynamic Programming ,Edit Distance Applications and Algorithim 17 Handouts 73-77 Edit Distance: Dynamic Programming Algorithm and its Analysis 18 Handouts 77-84 Quiz No. 01 Chain Matrix Multiply 19 Handouts 84-90 Chain Matrix Multiply 20 Handouts 84-90 Knapsack Problem 21 Handouts 91-92 Knapsack Problem: Dynamic Programming Approach 22 Handouts 93-96 Midterm Greedy Algorithms,Examples:Counting Money 23 Handouts 97-99 Huffman Encoding Algorithm 24 Handouts 99-99 Huffman Encoding: Correctness, Activity Selection 25 Handouts 100-104 Correctness of Greedy Activity Selection 26 Handouts 105-106 Fractional Knapsack Problem ,Graphs 27 Handouts 107-112 Assignment No. 03 Graphs: Representations,Traversal 28 Handouts 113-114 Breadth-first Search,Generic Graph Traversal Algorithm 29 Handouts 114-119 Breadth-first Search,Generic Graph Traversal Algorithm 30 Handouts 114-119 DFS - Timestamp Structure ,DFS - Cycles 31 Handouts 119-130 Precedence Constraint Graph ,Topological Sort 32 Handouts 130-132 Strong Components and DFS 33 Handouts 133-136 Minimum Spanning Trees 34 Handouts 137-141 GDB Computing MST: Generic Approach,Greedy MST 35 Handouts 142-143 Kruskal''s Algorithm 36 Handouts 143-146 Prim''s Algorithm 37 Handouts 147-152 Shortest Paths 38 Handouts 153-154 Dijkstra''s Algorithm 39 Handouts 154-156 Quiz No. 02 Correctness of Dijkstra''s Algorithm, Bellman-Ford Algorithm 40 Handouts 157-160 Floyd-Warshall Algorithm 41 Handouts 161-168 Floyd-Warshall Algorithm 42 Handouts 161-168 Complexity Theory,Classes P,NP 43 Handouts 169-172 Reductions ,NP-Completeness 44 Handouts 173-177 Boolean Satisfiability Problem:Cook''s Theorem,Independent Sets 45 Handouts 178-184 Final Examination NOTE: It is a tentative plan and can be changed as per requirement. You are advised to check VULMS for updates and announcements from time to time.