panoz in prolog
Manhattan has several outlets of the famous Belgian bakery Panoz. During an experiment
with a new kind of chocolate pastry, the old bakery has exploded. A new bakery will be
built, somewhere in Manhattan, and this occasion is used to optimize the distribution of all
the goodies. Clearly Panoz wants the location in Manhattan which minimizes the maximal
(Manhattan) distance from the bakery to any outlet.
Write a predicate panoz/2 whose queries look like ?- panoz(Outlets,Sol). where Sol
is the location of the new bakery. The outlet coordinates Outlets are given as a list of
tuples, e.g. [(0,1),(0,2),(4,0),(4,3)].

 Here is a typical query and its answer:

?- panoz([(0,1),(0,2),(4,0),(4,3)],Sol).
Sol = (2,2)

Of course, Sol = (2,1) would also have been a good solution.
panoz in prolog
===

Manhattan has several outlets of the famous Belgian bakery Panoz. During an experiment
with a new kind of chocolate pastry, the old bakery has exploded. A new bakery will be
built, somewhere in Manhattan, and this occasion is used to optimize the distribution of all
the goodies. Clearly Panoz wants the location in Manhattan which minimizes the maximal
(Manhattan) distance from the bakery to any outlet.
Write a predicate panoz/2 whose queries look like ?- panoz(Outlets,Sol). where Sol
is the location of the new bakery. The outlet coordinates Outlets are given as a list of
tuples, e.g. [(0,1),(0,2),(4,0),(4,3)].

 Here is a typical query and its answer:

?- panoz([(0,1),(0,2),(4,0),(4,3)],Sol).
Sol = (2,2)

Of course, Sol = (2,1) would also have been a good solution.