A Datalog program solves a constraint satisfaction problem (CSP) if and only if it derives the goal predicate precisely on the unsatisfiable instances of the CSP. There are three Datalog fragments that are particularly important for finite-domain constraint satisfaction: arc monadic Datalog, linear Datalog, and symmetric linear Datalog, each having good computational properties. We consider the fragment of Datalog where we impose all of these restrictions simultaneously, i.e., we study \emph{symmetric linear arc monadic (slam) Datalog}. We characterise the CSPs that can be solved by a slam Datalog program as those that have a gadget reduction to a particular Boolean constraint satisfaction problem. We also present exact characterisations in terms of a homomorphism duality (which we call \emph{unfolded caterpillar duality}), and in universal-algebraic terms (using known minor conditions, namely the existence of quasi Maltsev operations and $k$-absorptive operations of arity $nk$}, for all $n,k \geq 1$). Our characterisations also imply that the question whether a given finite-domain CSP can be expressed by a slam Datalog program is decidable.
翻译:Datalog程序求解约束满足问题(CSP)当且仅当它恰好在不满足的CSP实例上推导出目标谓词。对于有限域约束满足问题,有三个特别重要的Datalog子类:弧一元Datalog、线性Datalog和对称线性Datalog,它们各自具有良好的计算性质。我们考虑同时施加所有这些限制的Datalog子类,即研究*对称线性弧一元(slam)Datalog*。我们刻画了可由slam Datalog程序求解的CSP,其特征为存在到特定布尔约束满足问题的子程序归约。我们还以同态对偶性(称为*展开毛毛虫对偶性*)以及泛代数术语(使用已知的minor条件,即所有 $n,k \geq 1$ 上存在拟Maltsev运算和 $nk$ 元 $k$ 吸收运算)给出了精确刻画。我们的刻画还表明,给定有限域CSP是否可由slam Datalog程序表达的问题是可判定的。