Programmer Passport: Prolog: (page 49)

@redrapids

Wrong definition of rule: use max instead of min in aggregate:

maximum_path(From, To, Path, Weight) :-
aggregate(min(W, P), path(From, To, P, W), min(Weight, Path)).