A number of general design paradigms, such as divide-and-conquer, play an important role in the development of algorithms. Familiarity with these paradigms can aid the programmer in the development of algorithms to solve new problems. It is not enough just to derive an algorithm that solves a problem. If the algorithm is inefficient, it may be useless in practice. One can better appreciate an algorithm if one can analyse its use of resources, such as memory and computing time. Such analyses provide the basis for comparison of different algorithms to solve the same problem.
Time and space complexity: the desire for an implementation independent measure; worst-case and average-case complexity. Evaluating efficiency: rate of growth, asymptotic time complexity; notation. Iterative algorithms: analysis of "while" and "for" loops; summations.
Divide-and conquer: recursion; divide, conquer and combine. Solving recurrences: substitution; iterating the recurrence to get a summation; recursion trees; master method.
vertex, edge, predecessor, successor, in-degree, out-degree, path, reachable, simple, cycle; weighted graphs. Graph representations: adjacency list and matrix representations. Graph algorithms: breadth-first search; depth-first search; topological sort. Minimal spanning tree: generic form, greedy choice strategy.
Optimal substructure; overlapping sub-problems; table of sub-problem solutions; memoization; order of evaluation; dynamic programming.
Greedy method: optimal substructure; greedy choice property; comparison of dynamic programming and greedy paradigms.
Efficiency analysis in terms of sequences of operations; crude analysis; global analysis; the accounting method; the potential method.
Decision problems; tractable and intractable problems; Polynomial time; the class P; Polynomial time verification; the class NP; reducibility; NP-completeness. Traveling-salesman problem.
probabilistic analysis, randomised quicksort
- Analyse, compare, and contrast algorithms and data structures by evaluating their time and space complexity.
- Apply algorithm design paradigms to generate novel solutions.
- Design abstract solutions based on graph algorithms, dynamic programming, and greedy methods.
- Develop efficient implementations to abstract solutions.
- Perform amortised analysis of data structures and algorithms. 6 Explain the theory and relevance of theoretical complexity classes.