TITLE: Surprising applications of cohomology
QUESTION [29 upvotes]: The concept of cohomology is one of the most subtle and powerful in modern mathematics. While its application to topology and integrability is immediate (it was probably how cohomology was born in the first place), there are many more fields in which cohomology is at least a very interesting point of view. Group cohomology is a famous one, and for example it helps in studying extensions.
Here are good points about the "philosophy" behind cohomology.
Here are very good, but advanced, ideas on what cohomology "really is".
I would like to ask something a little different: 

What are the most unexpected applications of cohomology, or of cohomology-related ideas?  Why is cohomology useful/important/interesting when applied to such problems?

Bonus point for real-world applications, or at least outside algebra/geometry/theoretical physics.
Update: Oops, looks like there is a very similar question here, with beautiful answers.

REPLY [11 votes]: Close to a real-world application is maybe the application to mixed finite elements.
Finite element
exterior calculus
In a nutshell: Instead of solving numerically $$\Delta u =0,$$
one approximates the solution of
$$
\mathrm{div}~ u = \sigma \quad \text{and} \quad \mathrm{grad}~ \sigma = 0.
$$
Both formulations lead to the same solutions $u$, but surprisingly, there is a high risk to get a completely wrong solution by a naive finite element approximation. 
(Slides with pictures, examples (and the theory))
Mixed finite elements are for example used in elasticity or fluid dynamics,
where the pressure $p$ a Lagrange multiplier, lives naturlly in different spaces than the deformation $\varphi$ of the material. It was known before, that the choice of the approximation spaces of $p$ and $\varphi$ is crucial. Numerical solutions might exist, but they can differ tremendously from the real solution, also for high resolution simulations. (Lack of stability.)
the use of (co)homology leads to a unified understanding of this area. First, you have to find a Hilbert complex such that the associated Hodge Laplace equation is the PDE of your interest.
Finding the right complex or combining several complexes to build a new one, involves application of tools from homological algebra.
If the numerical approximation implies a bounded morphism between two complexes which preserves the cohomology groups, then the corresponding finite elements are stable! (Of course, there are some typical assumptions for finite elements which also have to be statisfied.)
I love the fact, that here numerical mathematics benefits from an more abstract approach and actually this technique also helped to solve previously unsolved problems!