Added seeded dynamic programming function.

The ChunkDatabase
built on the reference is used to identify allowed edges in the
DAG underlying the dynamic programming. A dynamic programming
routine was implemented to use these edges.

Needs to be tested.