简体   繁体   English

逐渐减弱 Maxsat

[英]Incremental weakening Maxsat

I've an idea about MaxSat and have already implemented a naive Maxsat solver using MSU3 along with sequential encoding with minisat APIs我对 MaxSat 有一个想法,并且已经使用 MSU3 以及使用 minisat API 的顺序编码实现了一个简单的 Maxsat 求解器

I was wondering if there's a way to speed up this solver.我想知道是否有办法加快这个求解器的速度。

I came with this paper: https://www.researchgate.net/publication/264936663_Incremental_Cardinality_Constraints_for_MaxSAT我附带了这篇论文: https://www.researchgate.net/publication/264936663_Incremental_Cardinality_Constraints_for_MaxSAT

That talks about incremental weakening and it's implementation using totalizer encoding这谈到了增量削弱及其使用累加器编码的实现

Is there a way to implement incremental weakening with sequential encoding?有没有办法通过顺序编码来实现增量弱化?

Will that give a considerable speed up?这会大大加快速度吗?

Is there a way to implement incremental weakening with sequential encoding?有没有办法通过顺序编码来实现增量弱化?

The sequential counter encoding can be built incrementally, that is, given a circuit <= k(1..n) this can be extended to <= k+1(1..n) and <= k(1..n+1) .顺序计数器编码可以增量构建,也就是说,给定一个电路<= k(1..n) ,这可以扩展到<= k+1(1..n)<= k(1..n+1) When asserting a new soft-clause in OptiMathSAT, we incrementally extend the size of the sequential counter circuit by 1 in both directions (ie k , n ).当在 OptiMathSAT 中声明一个新的软子句时,我们将顺序计数器电路的大小在两个方向(即kn )上递增1 I see no reason why this couldn't be done along one dimension only.我看不出为什么不能只在一个维度上做到这一点。

After a quick glance at the results sections, it looks like the iterative encoding is significantly better than the incremental weakening technique.快速浏览一下结果部分后,看起来迭代编码明显优于增量弱化技术。 So you might as well try to implement the former approach rather than the latter.因此,您不妨尝试实施前一种方法而不是后者。

The iterative encoding technique would require starting from <= 0(1..n) and progressively extend the sequential counter encoding along the k dimension.迭代编码技术需要从<= 0(1..n)开始,并沿k维逐步扩展顺序计数器编码。 (As mentioned in the paper, some MaxSAT algorithms may want to increase the circuit in both directions). (正如论文中提到的,一些 MaxSAT 算法可能希望在两个方向上增加电路)。

  • The inputs of the sequential counter circuit would be the negated literals of each soft-clause, so that the circuit counts the number of falsified soft-clauses.顺序计数器电路的输入将是每个软子句的否定文字,以便电路计算伪造的软子句的数量。

  • At the first iteration, s_n_1 would be assumed to be false , back-propagating all inputs to false (ie forcing all soft-clauses to be true ).在第一次迭代中, s_n_1将被假定为false ,将所有输入反向传播为false (即强制所有软子句为true )。

  • If the first step is unsat , one extends <= 0(1..n) to encode <= 1(1..n) , and then assumes s_n_1 to be true and s_n_2 to be false at the next satisfiability check.如果第一步是unsat ,则扩展<= 0(1..n)以编码<= 1(1..n) ,然后在下一次可满足性检查中假定s_n_1trues_n_2false During the search, as soon as one soft-clause is assigned to false , the remaining soft-clauses are back-propagated to true unless a new conflict is found.在搜索过程中,一旦将一个软子句分配给false ,其余的软子句就会反向传播为true ,除非发现新的冲突。

  • Repeat.重复。

Will that give a considerable speed up?这会大大加快速度吗?

It's hard to predict performance without a rock-solid experiment.如果没有坚如磐石的实验,就很难预测性能。 However, my suggestion is to go for it: it shouldn't be that hard to implement this approach and the results of the paper look solid.但是,我的建议是 go :实施这种方法应该不难,而且论文的结果看起来很可靠。

The sequential counter encoding requires O(n * k) clauses, the same number as the totalizer encoding after applying the k-simplification at pag.顺序计数器编码需要O(n * k)子句,与在 pag 应用k 简化后的累加器编码相同。 6, and O(n * k) auxiliary variables. 6、和O(n * k)辅助变量。 Given the similar memory footprint, a similar performance gain is also possible.鉴于类似的 memory 占位面积,类似的性能增益也是可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM