Algorithms and Topics Overview

1. Computational Geometry

2. String Algorithms

  • Knuth-Morris-Pratt algorithm.
    • Problems - NHAY, PERIOD on SPOJ.
    • Suggested Reading - Cormen chapter on Strings.
  • Aho-Corasick algorithm.
  • Suffix Arrays
    • O(n^2 * logn) Naive method of suffix array construction.
    • O(n * logn^2) method of suffix array construction.
    • O(n * logn) method of suffix array construction.
    • O(n) method of suffix array construction.
    • O(n) LCA preprocess on Suffix Arrays to solve a variety of string problems.
  • Suffix Trees
    • O(n) construction of Suffix trees using Ukkonon’s algorithm.
    • O(n) construction of Suffix Trees if provided with Suffix Arrays using Farach’s algorithm.
  • Suffix Automata
    • O(n) Suffix Automaton construction.
  • Dictionary Of Basic Factors
    • O(n * log n) method of DBF construction using Radix Sort.
  • Manacher’s algorithm to find length of palindromic substring of a string centered at a position for each position in the string. Runtime -> O(n).
  • Searching and preprocessing Regular Expressions consisting of ‘?’, ‘*’.
  • Multi-dimensional pattern matching.
  • Problems on Strings

Basic Graphs [beginner]

  • Representation of graphs as adjacency list, adjacency matrix, incidence matrix, and edge list and uses of different representations in different scenarios.
  • Breadth First Search.
    • Problems - PPATH, ONEZERO, WATER on SPOJ
  • Depth First Search.
  • Strongly Connected Components.
    • Problems - TOUR and BOTTOM on SPOJ.
  • Biconnected Components, Finding articulation points and bridges.
    • Problems - RELINETS, PT07A on SPOJ.
  • Dijkstra algorithm.
    • Problems - SHPATH on SPOJ.
  • Floyd Warshall algorithm.
    • Problems - COURIER on SPOJ.
  • Minimum Spanning Tree.
    • Problems - BLINNET on SPOJ.
  • Flood-fill algorithm.
  • Topological sort.
  • Bellman-Ford algorithm.
  • Euler Tour/Path.
    • Problems - WORDS1 on SPOJ.
  • Suggested reading for most of the topics in Graph algorithms

Flow Networks/Matching [Intermediate/Advanced]

  • Maximum flow using Ford Fulkerson Method.
    • Suggested Reading - Max Flow
    • Problems - TAXI, POTHOLE, IM, QUEST4, MUDDY, EN, CABLETV, STEAD, NETADMIN, COCONUTS, OPTM on SPOJ.
  • Maximum flow using Dinic’s Algorithm.
    • Problems - PROFIT on SPOJ.
  • Minimum Cost Maximum Flow.
    • Successive Shortest path algorithm.
    • Cycle Cancelling algorithm.
    • Suggested Reading - Min Cost Flow
  • Maximum weighted Bipartite Matching (Kuhn Munkras algorithm/Hungarian Method).
  • Stoer Wagner min-cut algorithm.
  • Hopcroft Karp bipartite matching algorithm.
    • Problems - ANGELS on SPOJ.
  • Maximum matching in general graph (blossom shrinking).
  • Gomory-Hu Trees.
    • Problems - MCQUERY on Spoj.
  • Chinese Postman Problem.
  • Suggested Reading for the full category
    • Network flow - Algorithms and Applications by Ahuja.
    • Cormen book chapter 25.

Dynamic Programming

Greedy

  • Suggested Reading
  • problems - refer to the topcoder tutorial.

Number Theory

Math (Probability, Counting, Game Theory, Group Theory, Generating functions, Permutation Cycles, Linear Algebra)

Data Structures.

Search Techniques/Bruteforce writing techniques/Randomized algorithms.

General programming issues in contests