Let G(N,A) be a graph with nodes set N and arcs set A.
Problem: find the shortest path from node i to node j such that the path contains exactly one arc from the set $A', which is a subset of A.
I am guessing this is a well-known problem. Can someone point me to a reference? Thanks!
You can modify standard shortest path algorithms by keeping two labels at each node i: distance(i,TRUE) and distance(i,FALSE). The TRUE labels track paths that have contained A', the FALSE contains those with no A' edges.
At each step, choose the node i with the smallest unhandled label (track the handling of the labels for TRUE and FALSE separately), and update accordingly
At the end, you want distance(target,TRUE)