In this paper, we study the problem of optimizing a linear program whose variables are the answers to a conjunctive query. For this we propose the language LP(CQ) for specifying linear programs whose constraints and objective functions depend on the answer sets of conjunctive queries. We contribute an efficient algorithm for solving programs in a fragment of LP(CQ). The natural approach constructs a linear program having as many variables as there are elements in the answer set of the queries. Our approach constructs a linear program having the same optimal value but fewer variables. This is done by exploiting the structure of the conjunctive queries using generalized hypertree decompositions of small width to factorize elements of the answer set together. We illustrate the various applications of LP(CQ) programs on three examples: optimizing deliveries of resources, minimizing noise for differential privacy, and computing the s-measure of patterns in graphs as needed for data mining.
翻译:本文研究优化一个线性规划的问题,其中变量为合取查询的答案。为此,我们提出语言LP(CQ),用于描述约束条件和目标函数依赖于合取查询答案集的线性规划。我们贡献了一种高效算法,用于求解LP(CQ)子类中的规划问题。自然方法会构建一个线性规划,其变量数量与查询答案集中的元素数量相同。而我们的方法构建的线性规划具有相同的最优值,但变量更少。这是通过利用广义超树分解的小宽度结构来因式化答案集中的元素实现的。我们通过三个示例说明LP(CQ)规划的各种应用:优化资源配送、最小化差分隐私中的噪声,以及计算数据挖掘所需的图模式s-测度。