I am working on a problem that I have generalised to what I have described in the title. Essentially I have a DAG that will look something like this: (I know it doesn't matter what the DAG looks like I just thought it might show where I am at).
I've drawn the vertex values as the edge distance (or cost) from the vertices in the layer, where layers are made of the vertices that are aligned vertically. In other words the edges (a,a') (b,a') have equal value when a and b are in the same "layer".
I need to find the path from the left most layer to the right most layer such that the sum of the values of the edges in the path are equal, or less than and as close as possible to a target value.
The original problem is basically finding a sum of single values in distinct matrices equal (or less than and as close close as possible) to a target value where exactly one value from each value is used.
I have to use tabulation, and I am not sure how to approach this problem. Im not looking for an entire solution. If this question is poorly written please tell me.