Hostname: page-component-77f85d65b8-8v9h9 Total loading time: 0 Render date: 2026-03-28T08:33:04.527Z Has data issue: false hasContentIssue false

Counting Answer Sets of Disjunctive Answer Set Programs

Published online by Cambridge University Press:  26 August 2025

MD MOHIMENUL KABIR
Affiliation:
School of Computing, National University of Singapore, Singapore, Singapore (e-mail: mahibuet045@gmail.com)
SUPRATIK CHAKRABORTY
Affiliation:
Department of Computer Science, Indian Institute of Technology Bombay, Mumbai, India (e-mail: supratik@cse.iitb.ac.in)
KULDEEP S. MEEL
Affiliation:
Georgia Institute of Technology, Atlanta, USA (e-mail: meel@cs.toronto.edu)
Rights & Permissions [Opens in a new window]

Abstract

Answer Set Programming (ASP) provides a powerful declarative paradigm for knowledge representation and reasoning. Recently, counting answer sets has emerged as an important computational problem with applications in probabilistic reasoning, network reliability analysis, and other domains. This has motivated significant research into designing efficient ASP counters. While substantial progress has been made for normal logic programs, the development of practical counters for disjunctive logic programs remains challenging. We present $\mathsf{sharpASP}$-$\mathcal{SR}$, a novel framework for counting answer sets of disjunctive logic programs based on subtractive reduction to projected propositional model counting. Our approach introduces an alternative characterization of answer sets that enables efficient reduction while ensuring the intermediate representations remain polynomial in size. This allows $\mathsf{sharpASP}$-$\mathcal{SR}$ to leverage recent advances in projected model counting technology. Through extensive experimental evaluation on diverse benchmarks, we demonstrate that $\mathsf{sharpASP}$-$\mathcal{SR}$ significantly outperforms existing counters on instances with large answer set counts. Building on these results, we develop a hybrid counting approach that combines enumeration techniques with $\mathsf{sharpASP}$-$\mathcal{SR}$ to achieve state-of-the-art performance across the full spectrum of disjunctive programs. The extended version of the paper is available at: https://arxiv.org/abs/2507.11655.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Fig. 1. The high-level architecture of $\mathsf{sharpASP}$-$\mathcal{SR}$ for a program $P$.

Figure 1

Table 1. The performance of $\mathsf{sharpASP}$-$\mathcal{SR}$ vis-a-vis existing disjunctive answer set counters, based on $1125$ instances

Figure 2

Fig. 2. The runtime performance of $\mathsf{sharpASP}$-$\mathcal{SR}$ vis-a-vis other ASP counters.

Figure 3

Table 2. The performance comparison of hybrid counters, based on $1125$ instances. The hybrid counters correspond to last $3$ columns that employ clingo enumeration followed by ASP counters. The clingo ($2$nd column) refers to clingo enumeration for $5000$ seconds

Figure 4

Table 3. The performance comparison of $\mathsf{sharpASP}$-$\mathcal{SR}$ (SA) vis-a-vis existing disjunctive answer set counters across instances with varying numbers of loop atoms. The second column ($\sum$) indicates the number of instances within each range of $|\mathsf{LA}(P)|$