算法概論 第八章第八題

算法概論 第八章第八題 題解


題目描述

In the EXACT 4SAT problem, the input is a set of clauses, each of which is a
disjunction of exactly four literals, and such that each variable occurs at most
once in each clause. The goal is to find a satisfying assignment, if one exists.
Prove that EXACT 4SAT is NP-complete.

題解

因爲EXACT 4SAT 屬於 NP,只要再證實4SAT的 NP 徹底性便可。作法是將 3SAT 歸約到 EXACT 4SAT。算法

  1. 對於任意一個 3SAT 實例,若是其中某個子句中包含了同一個文字屢次,那麼能夠縮減爲一次,若是同時包含了某個變量的確定及否認,那麼能夠將這個變量去掉。
  2. 在每一個子句中能夠添加一些輔助變量,將每一個子句所包含的文字數目擴充到四個。

歸約完成。證畢。input

總結

主要應用了歸約的思想。it

相關文章
相關標籤/搜索