Combinatorics Problems That Needs Algorithms

Demonstrated in C++

Why Writing Algorithms?

  • Prove correctness of your solution using math

  • Too hard to solve using math

  • When we want to see the solution in addition to the count

Typical Approaches

  • Strategy: Other algorithmic paradigms

  • Enumeration problems

    • Simple enumeration: brute force, backtracking

    • With overlapping sub-problems: dynamic programming

  • Optimization problems (Combinatorial optimization)

    • With overlapping sub-problems: greedy algorithm, dynamic programming

    • Without overlapping sub-problems: greedy algorithm

    • Heuristic algorithms: simulated annealing, genetic algorithm, etc.

    • Linear programming