computer-science - 3-cnf-sat有一个问题

标签 computer-science np-complete conjunctive-normal-form

如果按以下方式更改3-cnf-sat问题:
对于每个ci,ci = -xi1 OR -xi2 OR xi3意味着恰好出现一个变量而没有取反。
还为某些(或全部)x赋予了值(0或1)。
您应该能够在多项式时间内解决问题(找到满足问题的x的值或证明它不满足要求)。

  • 什么是可以解决此问题的多项式运行时间算法?
  • 证明它在多项式时间内运行。

  • 提示:表明ci = -xi1 OR -xi2 OR xi3等于c =(xi1 AND -xi2)-> xi3

    最佳答案

    您描述的公式是Horn公式的子集。因此,可满足性问题并不比Horn satisfiability难,并且接受相同的线性时间解。

    关于computer-science - 3-cnf-sat有一个问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3005161/

    相关文章:

    floating-point - IEEE 754 中表示的最大 float

    algorithm - 这个子集和问题的变体更容易解决吗?

    logic - 将一阶逻辑转换为 CNF

    first-order-logic - 将一阶逻辑转换为 CNF 没有指数膨胀

    prolog - 使用 Prolog 求解 CNF

    c - C 数独检查器问题

    computer-science - 有没有用 "real"语言抽引引理的例子?

    c++ - 流行的 C++ 编译器对 std::sort 和 std::stable_sort 使用什么算法?

    algorithm - 子集推理 NP 完全?

    algorithm - 最小顶点覆盖的验证算法?