Parameterized algorithms are a way to solve hard problems more efficiently, given that a specific parameter of the input is small. In this paper, we apply this idea to the field of answer set programming (ASP). To this end, we propose two kinds of graph representations of programs to exploit their treewidth as a parameter. Treewidth roughly measures to which extent the internal structure of a program resembles a tree. Our main contribution is the design of parameterized dynamic programming algorithms, which run in linear time if the treewidth and weights of the given program are bounded. Compared to previous work, our algorithms handle the full syntax of ASP. Finally, we report on an empirical evaluation that shows good runtime behaviour for benchmark instances of low treewidth, especially for counting answer sets.
In this paper, we introduce a novel algorithm to solve projected model counting (PMC). PMC asks to count solutions of a Boolean formula with respect to a given set of projected variables, where multiple solutions that are identical when restricted to the projected variables count as only one solution. Our algorithm exploits small treewidth of the primal graph of the input instance. It runs in time O(2 2 k+4 n 2 ) where k is the treewidth and n is the input size of the instance. In other words, we obtain that the problem PMC is fixed-parameter tractable when parameterized by treewidth. Further, we take the exponential time hypothesis (ETH) into consideration and establish lower bounds of bounded treewidth algorithms for PMC, yielding asymptotically tight runtime bounds of our algorithm.
In this paper, we introduce novel algorithms to solve projected answer set counting (#PAs). #PAs asks to count the number of answer sets with respect to a given set of projected atoms, where multiple answer sets that are identical when restricted to the projected atoms count as only one projected answer set. Our algorithms exploit small treewidth of the primal graph of the input instance by dynamic programming (DP).We establish a new algorithm for head-cycle-free (HCF) programs and lift very recent results from projected model counting to #PAs when the input is restricted to HCF programs. Further, we show how established DP algorithms for tight, normal, and disjunctive answer set programs can be extended to solve #PAs. Our algorithms run in polynomial time while requiring double exponential time in the treewidth for tight, normal, and HCF programs, and triple exponential time for disjunctive programs.Finally, we take the exponential time hypothesis (ETH) into account and establish lower bounds of bounded treewidth algorithms for #PAs. Under ETH, one cannot significantly improve our obtained worst-case runtimes. * This work extends an abstract [18] explaining only concepts, and a preliminary workshop paper [17], and has beento count the answer sets of a disjunctive program with respect to a given set of projected atoms (#PAs). Particularly, multiple answer sets that are identical when reduced to the projected atoms are considered as only one solution. Intuitively, #PAs is needed to count answer sets without counting functionally independent auxiliary atoms. Under standard assumptions the problem #PAs is complete for the class #·Σ 2 P . However, if we take all atoms as projected, then #PAs is again #·coNP-complete and if there are no projected atoms then it is simply Σ p 2 -complete. But some fragments of ASP have lower complexity. A prominent example is the class of head-cycle-free (HCF) programs [4], which requires the absence of cycles in a certain graph representation of the program. Deciding whether a HCF program has an answer set is NP-complete.A way to solve computationally hard problems is to employ parameterized algorithmics [12], which exploits certain structural restrictions in a given input instance. Because structural properties of an input instance often allow for algorithms that solve problems in polynomial time in the size of the input and exponential time in a measure of the structure, whereas under standard assumptions an efficient algorithm is not possible if we consider only the size of the input. In this paper, we consider the treewidth of a graph representation associated with the given input program as structural restriction, namely the treewidth of the primal graph [30]. Generally speaking, treewidth 1 measures the closeness of a graph to a tree, based on the observation that problems on trees are often easier to solve than on arbitrary graphs.Our results are as follows: We establish the classical complexity of #PAs and a novel algorithm that solves ASP problems by exploiting treewidth when ...
Many problems from the area of AI have been shown tractable for bounded treewidth. In order to put such results into practice, quite involved dynamic programming (DP) algorithms on tree decompositions have to be designed and implemented. These algorithms typically show recurring patterns that call for tasks like subset-minimization. In this paper we present D-FLATˆ2, a system that allows one to obtain DP algorithms (specified in ASP) from simpler principles, where the DP formalization of subset-minimization is performed automatically. We illustrate the method at work by providing several DP algorithms-given in form of ASP programs-that are more space-efficient than existing solutions, while featuring improved readability, reuse and therefore maintainability of ASP code. Experiments show that our approach also yields a significant improvement in runtime performance.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.