Combinatorial Optimization Problems
Many of the hardest problems in computer science share the same structure: you have a set of discrete choices, a cost function over those choices, and you want the assignment that makes the cost as large (or as small) as possible. These are called combinatorial optimization problems — "combinatorial" because the search space is built from combinations of discrete variables.
The difficulty of exhaustive search
Suppose you have binary variables where each . The number of possible assignments grows as . For that is only 1024 cases, but for it reaches — far beyond any classical computer's ability to enumerate.
Many natural combinatorial problems are NP-hard: no polynomial-time classical algorithm is known, and most complexity theorists believe none exists. Finding good approximate solutions efficiently is therefore a major open problem, and it is one of the most promising near-term applications of quantum computing.
Graph problems as a unifying language
Graphs provide a compact, visual language for combinatorial problems. A graph consists of a set of vertices and edges . Vertices can represent cities, logic variables, financial assets, or protein residues; edges represent connections, conflicts, or interactions between them.
Assigning a value to each vertex — a colour, a partition label, a spin — while optimizing some score over the edges is the common template behind dozens of NP-hard problems.
Max-Cut: the canonical example
Given an undirected graph , a cut is a partition of into two disjoint sets and . An edge is cut if and land in different sets. Max-Cut asks: which partition maximises the number of cut edges?
Encoding with bits
Label each vertex with a bit: if vertex is in , and if it is in . An edge is cut when , which we can write using the XOR:
The total number of cut edges is
Maximising over all bit strings is the Max-Cut objective.
A small example
Consider a triangle graph: vertices with edges . The three possible partition sizes (up to symmetry) give the following cut counts:
| Partition | Cut edges | |---|---| | vs | 2 | | vs | 2 | | vs | 2 | | vs | 0 |
The maximum cut has value 2 (any single vertex against the other two). Note that a perfect 3-cut does not exist for a triangle — this is why Max-Cut is hard in general: constraints between variables can be contradictory, and no assignment satisfies all of them.
Why this matters for QAOA
The Quantum Approximate Optimization Algorithm (QAOA), introduced by Farhi, Goldstone, and Gutmann in 2014, targets exactly this class of problem. The key insight is that each bit variable maps to a qubit: represents being in set and represents being in . The cost function then lifts to a quantum operator — a cost Hamiltonian — whose eigenvalues are exactly the values of for each bitstring.
Finding the maximum cut becomes finding the ground state of (i.e., the state with the largest eigenvalue of ). QAOA constructs a parameterised quantum state that interpolates between an equal superposition over all bitstrings and the optimal solution, using two alternating unitaries:
- — the cost unitary, which encodes preferences for high-cut assignments.
- — the mixing unitary, which explores the space of solutions.
We will construct both of these explicitly in the next lessons.
Other combinatorial problems in the same family
Max-Cut is the entry point, but the same encoding idea covers a wide family of problems:
- Maximum Independent Set — find the largest subset of vertices with no two adjacent.
- Graph Colouring — assign colours to vertices so no adjacent pair shares a colour.
- Travelling Salesman Problem — find the shortest tour that visits every city exactly once.
- Portfolio Optimisation — choose a subset of assets that maximises return for a given risk budget.
All of them can be written as a binary optimisation problem, mapped to a cost Hamiltonian, and (in principle) attacked with QAOA or related quantum variational algorithms.
Sign in on the full site to ask questions and join the discussion.