The Nussinov algorithm is a dynamic programming algorithm used for the prediction of RNA secondary structure. It was introduced by Ruth Nussinov and Ann B. Jacobson in 1980. The algorithm predicts the secondary structure by maximizing the number of base pairs (specifically, Watson-Crick and wobble pairs) in the structure, subject to the constraint that the structure is non-crossing (i.e., it contains no pseudoknots).
Algorithm Overview The algorithm computes a score matrix $M$ where $M(i, j)$ represents the maximum number of base pairs in the subsequence from position $i$ to position $j$. The recurrence relation is defined as:
$$M(i, j) = \max \begin{cases} M(i, j-1) \ M(i+1, j) \ M(i+1, j-1) + \delta(i, j) \ \max_{i < k < j} [M(i, k) + M(k+1, j)] \end{cases}$$
Where $\delta(i, j) = 1$ if bases $i$ and $j$ can form a valid pair (A-U, U-A, G-C, C-G, and sometimes G-U), and $0$ otherwise. The four cases correspond to: base $j$ unpaired, base $i$ unpaired, bases $i$ and $j$ paired, and bifurcation (splitting the structure into two independent substructures).
Complexity The time complexity is $O(N^3)$ for a sequence of length $N$, due to the bifurcation term requiring a loop over $k$. The space complexity is $O(N^2)$ for storing the score matrix.
Limitations and Extensions The original Nussinov algorithm maximizes the number of base pairs without considering the thermodynamic stability of specific loops or stacking interactions. Consequently, it often produces biologically unrealistic structures (e.g., structures with many isolated base pairs or unstable loops). Modern RNA folding algorithms (such as those implemented in the ViennaRNA Package, mfold, or RNAstructure) utilize thermodynamic models (Turner energy parameters) minimizing free energy rather than maximizing base pair count, though they retain the $O(N^3)$ dynamic programming framework established by Nussinov.