  We present a dynamic programming algorithm for optimally solving the Cograph
Editing problem on an $n$-vertex graph that runs in $O(3^n n)$ time and uses
$O(2^n)$ space. In this problem, we are given a graph $G = (V, E)$ and the task
is to find a smallest possible set $F \subseteq V \times V$ of vertex pairs
such that $(V, E \bigtriangleup F)$ is a cograph (or $P_4$-free graph), where
$\bigtriangleup$ represents the symmetric difference operator. We also describe
a technique for speeding up the performance of the algorithm in practice.
Additionally, we present a heuristic for solving the Cograph Editing problem
which produces good results on small to medium datasets. In application it is
much more important to find the ground truth, not some optimal solution. For
the first time, we evaluate whether the cograph property is strict enough to
recover the true graph from data to which noise has been added.
