Display program code

shortest_paths.pl : All-pairs shortest paths of a graph
Computes for a directed graph the shortest length for each path.

How to use:
For a directed graph with edges A1->B1, A2->B2, .., An->Bn
edge(A1,B1), edge(A2,B2), .., edge(An,Bn),
you get all shortest paths from Xi to Yi with length Li (1<=i<=m)
path(X1,Y1,L1), .., path(Xm,Ym,Lm).

Program: Change the code, then submit!

Console: Enter query or select example from below, then submit and wait for answer!

Select example query: 

CHR
WebCHR help - CHR Website - (c) Copyrights Martin Kaeser Uni Ulm 2007