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-测度的计算。