Course overview
Choose the right structure, and the right technique, and a hard problem becomes an easy one.
This course is about choosing and building the right tool for a computational problem:
- data structures that stay fast however the data arrives (balanced trees, B-trees, tries);
- algorithms that search text and graphs efficiently;
- the main design techniques: divide and conquer, greedy, dynamic programming, backtracking, and branch and bound;
- the theory that tells you when no fast algorithm is likely to exist (NP-completeness).
Every topic page explains the idea with pictures first, then traces it step by step, then gives a short Python implementation you can run and change.
Course outcomes
| CO | You will be able to | Level |
|---|---|---|
| CO1 | Apply advanced data structures (balanced search trees, B-trees, segment and suffix trees, tries) and string-matching algorithms for efficient data organisation. | Apply |
| CO2 | Analyse real-world scenarios to choose and implement graph algorithms: traversal, shortest paths, spanning trees and network flow. | Analyse |
| CO3 | Examine problem requirements to choose between divide and conquer, greedy and dynamic programming, and implement the right one. | Analyse |
| CO4 | Analyse computational problems to decide whether backtracking, branch and bound or complexity-based arguments suit them. | Analyse |
| CO5 | Implement and analyse advanced algorithms and data structures in working programs (the lab programs). | Analyse |
Syllabus
- Advanced data structures:
- binary search trees;
- self-balancing trees: AVL, red-black and splay trees;
- B-trees and B+ trees, segment trees and range trees;
- suffix trees, N-ary trees, and tries and their types.
- Pattern matching: Knuth–Morris–Pratt, Boyer–Moore and Aho–Corasick.
- Graph algorithms:
- DFS and BFS;
- Dijkstra, Bellman–Ford and Floyd–Warshall;
- minimum spanning trees by Prim's and Kruskal's algorithms.
- Network flow: the Ford–Fulkerson method, the Edmonds–Karp algorithm, and the max-flow min-cut theorem.
- Divide and conquer: merge sort, quicksort and closest pair.
- Greedy: coin change, activity selection, Borůvka's algorithm and Huffman coding.
- Dynamic programming: matrix-chain multiplication, longest common subsequence and 0/1 knapsack.
- Backtracking: N-Queens, Sudoku, graph colouring and Hamiltonian cycles.
- Branch and bound: 0/1 knapsack, and the travelling salesperson problem by FIFO and least-cost (LC) search.
- Computational complexity:
- deterministic and nondeterministic algorithms;
- the classes P and NP, NP-hard and NP-complete;
- 3-SAT and the Cook–Levin theorem;
- NP-hard graph problems: the clique decision problem (CDP) and the node cover decision problem (NCDP).
Textbooks
Topic pages refer to these books by number.
- Textbook 1: Introduction to Algorithms, 3rd edition, The MIT Press, 2009.
- Textbook 2: Fundamentals of Computer Algorithms, 2nd edition, University Press, 2008.
- Textbook 3: Data Structures and Algorithm Analysis in C, 2nd edition, Pearson, 2010.
- Textbook 4: Fundamentals of Data Structures in C, 2nd edition, 2015.
- Textbook 5: Design and Analysis of Algorithms, Oxford University Press.
Reference books: 1. The Algorithm Design Manual, 2nd edition, Springer, 2008. 2. Data Structures and Algorithms in Python, Wiley, 2013. 3. The Art of Computer Programming, 3rd edition, Addison-Wesley, 1997. 4. Data Structures and Algorithms, Pearson Education, 2003.
Free online courses
- NPTEL: Data Structures and Algorithms, IIT Delhi.
- Coursera: Algorithmic Toolbox.
- Coursera: Trees and Graphs: Basics.
- Coursera: Foundations of Data Structures and Algorithms, University of Colorado Boulder.