This is my personal repository for E0225: Design and Analysis of Algorithms. It is a foundational course at the Computer Science department, IISc Bengaluru. It aims to develop algorithmic thinking in students. You can find my codes and assignment solution along with class notes. Feel free to fork and use. Don't hesitate to report mistakes if you find them in the documents.
Algorithm Design by Jon Kleinberg and Eva Tardos.
Introduction to Algorithms by Thomas Cormen, Charles Leiserson, Ronald Rivest, and Clifford Stein.
Highlights of important algorithmic paradigms and their real-world applications:
⭐ (Graphic) Metroid Scheme: Power and limitations of Greedy approach
🎯
🎯
⭐ Shortest path in a weighted graph G(V,E):
⭐ All pair shortest path problem (APSP): Floyd-Warshall
⭐ Knapsack problem using dynamic programming
🌟 Ford-Fulkerson
🌟 Improvement in Ford-Fulkerson algo. by Edmond-Karp
⭐ Orlin's Algorithm:
Applications in
Find a vector:
that maximize:
subjected to:
and:
🌟 Maximum Flow problem in Linear programming template
🌟 Linear Regression with absolute error loss function
⭐ Linear Classification via Support vector machine (Hinge Loss)
⭐ Maximum weight bipartile matching
⭐ Shortest path in a weighted graph
Find a vector:
that maximize:
subjected to:
and:
Find a vector:
that minimize:
subjected to:
and:
🎯 Interpretation of Primal and Dual problem
🎯
2-D and 3-D skyline using
Sweep line technique with sorted points.
Binary tree data structure (BST) with the doubly linked list; Successor and Predecessor Query in BST
Chan Algorithms:
High dimensional generalization: More elaborate Data structures to solve these problems
Polynomial time approximation algorithms for NP-completes problems
⭐ Minimum set cover via Greedy algorithms
Greedy is the optimal approach if P is not NP: log(n)-approximate algorithms
⭐ Optimal Machine-Job scheduling problem:
Naive greedy algorithms: 2-approximate algorithms
Greedy on the sorted dataset: 3/2-approximate algorithm
⭐ Vertex cover via linear programming with rounding: 2-approximate algorithms
Vertex cover and set cover interconversion
P and NP classes
Polytime primality test (Lucas test)
Karp Reduction
3-SAT reduction to IND-SET
IND-SET reduction to vertex cover
Monte Carlo and Las vegas algorithms
Probabilistic techniques: Markov, Chebyshev, Chernoff bound
Application:
Hash function
Randamized median finding algotithms
Randamised SAT-solver
certain Database algorithms