析取正态形式和令人满意的是P(DNFSAT)

发布于 2025-01-29 20:02:01 字数 57 浏览 3 评论 0原文

我正在读到一种以正常形式进行分离的语言,是P语言中的一种语言,但是没有解释,有人可以告诉我为什么吗?

I am reading that a language that is in Disjunctive Normal Form and is satisfiable is a language in P, but there is no explanation, could anyone tell me why?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

丘比特射中我 2025-02-05 20:02:01

要使DNF中的表达式为真,您只需要将其单个析取子句正确即可。典型的子句将是a ^ b ^ 〜c或类似的东西,因此您将A和B设置为true,并且C为false。

因此,算法将是:

  1. 找到一些不是自相矛盾的析取子句。 (即它同时包含x和〜x)。
  2. 如果所有分离的子句都包含一些自相矛盾,则无法满足整个表达式。
  3. 如果甚至有一个子句都没有自相矛盾,那么变量的明显分配使该子句是正确的。在这种情况下,整个表达式为真。

To make an expression that is in DNF be true, you just need to make a single disjunctive clause of it true. A typical clause would be something like A ^ B ^ ~C or something like that, and so you set A and B to true and C to false.

So the algorithm would be:

  1. Find some disjunctive clause that is not self-contradictory. (I.e. it contains both X and ~X).
  2. If all the disjunctive clauses contain some self-contradiction, then the entire expression cannot be satisfied.
  3. If there is even one clause that doesn't self-contradict, then there is an obvious assignment of variables that makes that clause be true. In that case the entire expression is true.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文