Finding the shortest path in a DAG is extremely easy:
See the example here http://www.utdallas.edu/~sizheng/CS4349.d/l-notes.d/L17.pdf
However, I cannot find a way of parallelising this code. Is there a way of doing that?
Finding the shortest path in a DAG is extremely easy:
See the example here http://www.utdallas.edu/~sizheng/CS4349.d/l-notes.d/L17.pdf
However, I cannot find a way of parallelising this code. Is there a way of doing that?
In complexity theory, the notion of P-complete (wiki) denotes the problems that are (widely believed) difficult to parallelize effectively. (Note: I am not good at this area. Please correct me if I am wrong.)
One typical P-complete problem is
Circuit Value Problem (CVP): Given a circuit, the inputs to the circuit, and one gate in the circuit, calculate the output of that gate.
The "shortest path in DAG" problem is similar to CVP. I think it is not hard for you to find a reduction in the literature with, for example, the paper A Compendium of Problems Complete for P as a starting point.
A positive side: Of course you can layer the nodes in DAG and parallel the computation layer by layer to some extent.