1. Trang chủ
  2. » Thể loại khác

Logic as a tool a guide to formal logical reasoning ( PDFDrive ) 110

1 2 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1
Dung lượng 63,67 KB

Nội dung

86 Logic as a Tool 2.6 Supplementary: The Boolean satisfiability problem and NP-completeness The Boolean satisfiability problem (SAT) is the problem of deciding whether a given input propositional (Boolean) formula is satisfiable, that is, whether there is a truth assignment to the propositional (Boolean) variables occurring in the formula that makes it true It is the most popular NP-complete decision problem, the meaning of which I explain in the following First, NP stands for “non-deterministic polynomial” time An algorithmic decision problem (that requires an answer Yes/No for every input) is in the complexity class NP if, intuitively, for every input where the answer is Yes there is an evidence (proof or witness) that can be verified “quickly and efficiently”, which is assumed to mean in polynomial time, that is, in a number of steps that is bounded by a fixed polynomial in the length of the input Equivalently, and again intuitively, a problem is in NP if there is an algorithm that can run on a hypothetical non-deterministic computing device (e.g., non-deterministic Turing machine) to always solve the problem and, when the answer is Yes, to produce that answer in polynomial time Simply put, an NP problem may be computationally difficult (slow) to find a solution, but it is easy (quick) to check whether a proposed, or guessed, solution is correct Of course, every decision problem that can be solved (for any answer) by an algorithm that works in deterministic polynomial time (i.e., one that runs on a usual digital computer and always takes a number of steps that is bounded by a fixed polynomial in the length of the input) is in NP Besides, there may be problems that are in NP but for which there is no algorithm that can solve them in polynomial time The SAT problem seems to be a case in point Indeed, it is in NP because whenever a Boolean formula is satisfiable, any given satisfying truth assignment can be verified very quickly in a number of steps which is linear in the length of the input formula Alternatively, the SAT problem can be solved efficiently with a non-deterministic computing device that guesses a satisfying assignment, if there is one, and then verifies in linear time that it indeed works Equivalently, we can think of solving SAT by using a hypothetical unboundedly parallel computing device, simply by determining simultaneously all truth assignments whether any of them renders the formula true There is a number of practically very efficient algorithms for solving the SAT problem, known as SAT solvers, which usually solve most of the input SAT problems involving thousands of variables and millions of clauses within seconds On the other hand, there is currently no known algorithm run on a digital computer that can always solve the SAT problem efficiently, that is, in polynomial time Indeed, all methods for solving the SAT problem that are known so far – including truth tables, Semantic Tableaux, Propositional Resolution, and many more modern, extremely clever and practically efficient algorithms – require in the worst case a number of steps which is exponential in the number of variables occurring in the input formula, and therefore exponential in the length of the formula This is because there are 2n possible truth assignments for a set of n propositional variables

Ngày đăng: 28/10/2022, 16:01