A collection of Answer Set Programming examples
Analyse a logic circuit for all possible valid signals.
Compute the number of squares which contain equal to or over a number of grains.
There are n chairs (and people) around a circular table. Some guests like or dislike eachother. Find the seating arrangement such that guests who like each other sit next to each other, and guests who dislike each other do not sit next to each other.
A clique in a graph
A vertex cover of a graph is a set of vertices such that every edge of the graph has at least one point in the set. Write a program that has as answer sets all the vertex covers of size
Place eight queens on a chessboard so that no two queens threaten each other.
Cover a chessboard by 21 3-by-1 tiles and 1 1-by-1 tile.
A formula in conjunctive normal form consists of a set of clauses of the form
where
A vertex cover of a graph is a set of vertices such that every edge of the graph has at least one point in the set. Write a program that has as answer sets all the vertex covers of size n.\pause
We are given a set of items with a value and weights.
Which items can we pack so that the weight stays under a given number and the total value is as large as possible?
List of