KR& R Group @ SU
# Finding Similar/Diverse and/or Weighted Solutions in Answer Set Programming

## OVERVIEW

In [1] and [2], we have introduced some methods to compute similar/diverse and/or weighted solutions in Answer Set Programming.
Below you will find a description of these methods, as well as their implementations.

### CLASP-NK

CLASP-NK is an answer set solver which extends CLASP.
CLASP-NK takes three parameters as input N, K and a distance function (from a solution to the problem to real numbers) which is implemented in C++ along with an ASP
program that defines a solution to a problem. Then, it computes a set of N solutions to the problem whose distance is at most/least K (n k-similar/diverse solutions).
See [1] for technical details

You can download the source code of CLASP-NK from below (we recomend you to download the latest version):

Version 2 (with documentation and examples): download

Version 1: download

### CLASP-W

Similar to CLASP-NK, CLASP-W is an answer set solver which extends CLASP. CLASP-W takes
two parameters as input W and a weight function (from a solution to real numbers) which is implemented in C++ along
with the program that defines a solution to a problem. Then, it computes a solution whose weight is above/below W (w-weighted solution).
See [2] for technical details.

You can download the source code of CLASP-W from here.

We suggest you to read this documentation before using clasp-w.

### PUBLICATIONS

[1] T. Eiter, E. Erdem, H. Erdogan, and M.Fink. Finding Similar or Diverse
Solutions in Answer Set Programming. In Proc. of ICLP'09.

[2] D. Cakmak, E. Erdem, and
H. Erdogan.
Computing Weighted Solutions in Answer Set Programming. In Proc. of LPNMR'09.

[3] D. Cakmak, E. Erdem, and H. Erdogan. Computing Weighted Solutions in ASP:
Representation-Based Method vs. Search-Based Method. In Proc. of RCRA'10.