Rather than storing a single best parse of each edge, one stores n of them.
when using dynamic programming, rather than throwing away a candidate if it scores less than the best, one keeps it if it is one of the top n analyses for this edge discovered so far.