» ASP Competition

Example of Input and Output for Search Problem

Consider the search problem of colouring a graph. The input vocabulary consists of symbols vertex/1, edge/2, color/1. The output vocabulary consists of the predicate colored/2. In this case, an instance is represented as a set of atoms in the input vocabulary representing respectively the vertices and edges of the graph, and the colors. The output should consist of a set of atoms of the form colored(a,c) where a is a vertex and c a color.

The atom sets of input and output will be formatted as follows. An example of the input, to be read from standard input, is:

vertex(a). vertex(b). vertex(c). edge(a,b). edge(b,c). color(red). color(blue).

One possible correct and correctly formatted output for this instance, to be written on standard output, is:

colored(a,red). colored(c,red). colored(b,blue).

An example of the input and output format of an optimization problem can be found here.