Given a combinatorial search problem, it may be highly useful to enumerate its (all) solutions besides just finding one solution, or showing that none exists. The same can be stated about optimal solutions if an objective function is provided. This work goes beyond the bare enumeration of optimal solutions and addresses the computational task of solution enumeration by optimality (SEO). This task is studied in the context of Answer Set Programming (ASP) where (optimal) solutions of a problem are captured with the answer sets of a logic program encoding the problem. Existing answer-set solvers already support the enumeration of all (optimal) answer sets. However, in this work, we generalize the enumeration of optimal answer sets beyond strictly optimal ones, giving rise to the idea of answer set enumeration in the order of optimality (ASEO). This approach is applicable up to the best k answer sets or in an unlimited setting, which amounts to a process of sorting answer sets based on the objective function. As the main contribution of this work, we present the first general algorithms for the aforementioned tasks of answer set enumeration. Moreover, we illustrate the potential use cases of ASEO. First, we study how efficiently access to the next-best solutions can be achieved in a number of optimization problems that have been formalized and solved in ASP. Second, we show that ASEO provides us with an effective sampling technique for Bayesian networks.
翻译:鉴于组合搜索问题,除了只找到一种解决办法,或显示不存在任何解决办法之外,列出其(所有)解决方案可能非常有用。如果提供客观功能,也可以就最佳解决方案指出最佳解决方案。这项工作超越了简单列举最佳解决方案的范围,并涉及以最佳性(SEO)来计算解决方案的计算任务。这一任务在“答案设定”方案(ASP)范围内研究,因为根据一个逻辑程序对问题的解答组合进行编码。现有的答案设置解析器已经支持列出所有(最佳)答案组。然而,在这项工作中,我们将最佳答案组的列举范围扩大到严格最佳的答案组之外,从而产生按最佳性(ASEO)排列答案组的想法。这一方法适用于最佳的 k 答案组或无限制的设置,这相当于根据目标功能对答案组进行分类的过程。作为这项工作的主要贡献,我们为上述答案组的解答组合提供了第一种通用的算法。此外,我们展示了ASEO网络的潜在用途。首先,我们研究如何以最佳的方法有效地展示了我们实现最佳的第二套方法。