文摘
Given a directed acyclic graph with non-negative edge-weights, two vertices s and t, and a threshold-weight L, we present a fully-polynomial time approximation-scheme for the problem of counting the s-t paths of length at most L. This is best possible, as we also show that the problem is #P-complete. We then show that, unless P=NP, there is no finite approximation to the bi-criteria version of the problem: count the number of s-t paths of length at most L 1 in the first criterion, and of length at most L 2 in the second criterion. On the positive side, we extend the approximation scheme for the relaxed version of the problem, where, given thresholds L 1 and L 2, we relax the requirement of the s-t paths to have length exactly at most L 1, and allow the paths to have length at most L 1′ : = (1+δ)L 1, for any δ > 0.