CNF与Horn可满足性(CNF vs Horn Satisfiability)

编程入门 行业动态 更新时间:2024-10-18 22:37:45
CNF与Horn可满足性(CNF vs Horn Satisfiability)

我知道更容易证明喇叭配方是否可以满足。 我的问题是:为什么使用喇叭配方而不是普通的CNF更容易?

I know that it's easier to prove if a horn-formula is satisfiable. My Question is: Why is it easier with a horn formula rather than a normal CNF?

最满意答案

可以在线性时间内显示Horn可满足性的存在或不存在。 以下是一些很好的介绍。 可以通过单元传播找到解决方案而无需回溯。

伯克利大学的伪代码讲义 :

在此处输入图像描述

一般CNF表达式的可满足性是典型的NP完全问题。 对于CNF可满足性,没有多项式时间算法是已知的(除非P = NP )。

Presence or absence of Horn satisfiability can be shown in linear time. Here is a good introduction with some examples. The solution can be found by unit propagation without backtracking.

Pseudocode from a UC Berkeley lecture note:

enter image description here

Satisfiability for general CNF expressions is a classic NP-complete problem. No polynomial time algorithms are known for CNF satisfiability (except if P=NP).

更多推荐

本文发布于:2023-04-28 03:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329758.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:CNF   Horn   Satisfiability

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!