# The Stony Brook Algorithm Repository

## 1.3.10 Satisfiability ## INPUT OUTPUT

Input Description: A set of clauses in conjunctive normal form.

Problem: Is there a truth assignment to the boolean variables such that every clause is satisfied?

Excerpt from The Algorithm Design Manual: Satisfiability arises whenever we seek a configuration or object that must be consistent with (\ie satisfy) a given set of constraints. For example, consider the problem of drawing name labels for cities on a map. For the labels to be legible, we do not want the labels to overlap, but in a densely populated region many labels need to be drawn in a small space. How can we avoid collisions?

For each of the n cities, suppose we identify two possible places to position its label, say right above or right below each city. We can represent this choice by a Boolean variable vi, which will be true if city ci's label is above ci, otherwise vi = false. Certain pairs of labels may be forbidden, such as when ci's above label would obscure cj's below label. This pairing can be forbidden by the two-element clause $(\bar{v_i} \OR v_j )$, where $\bar{v}$ means not $v$''. Finding a satisfying truth assignment for the resulting set of clauses yields a mutually legible map labeling if one exists.

Satisfiability is the original NP-complete problem. Despite its applications to constraint satisfaction, logic, and automatic theorem proving, it is perhaps most important theoretically as the root problem from which all other NP-completeness proofs originate.

## Recommended Books Satisfiability Testing by H. Kautz and B. Selman and R. Brachman and T. Dietterich Algorithm Design by Jon Kleinberg and Éva Tardos Cliques, Coloring, and Satisfiability: Second Dimacs Implementation Challenge by David S. Johnson and Michael A. Trick, Editors Introduction to Algorithms by T. Cormen and C. Leiserson and R. Rivest and C. Stein Computers and Intractability: A Guide to the Theory of NP-Completeness by M. R. Garey and D. S. Johnson

• SAT Live! up-to-date source for papers, programs, and test sets for satisfiability and related logic optimization problems
• Reactive Search, a History-Sensitive Heuristic for Max-Sat by R. Battiti and M. Protasi
• 9th International Conference on Theory and Applications of Satisfiability Testing
• Journal on Satisfiability, Boolean Modeling and Computation

## Related Problems Finite State Machine Minimization Traveling Salesman Problem Constrained and Unconstrained Optimization
{"ft_lang_label":"__label__en","ft_lang_prob":0.8657529,"math_prob":0.85241395,"size":1972,"snap":"2022-40-2023-06","text_gpt3_token_len":444,"char_repetition_ratio":0.09705284,"word_repetition_ratio":0.0,"special_character_ratio":0.20436105,"punctuation_ratio":0.12295082,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9603791,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],"im_url_duplicate_count":[null,null,null,2,null,null,null,2,null,null,null,2,null,null,null,null,null,7,null,2,null,2,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-04T22:04:05Z\",\"WARC-Record-ID\":\"<urn:uuid:ee8a52c8-e328-49bf-a090-4f682d4fc02e>\",\"Content-Length\":\"21230\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:268cd7af-93af-45fd-80b7-a2c37952b960>\",\"WARC-Concurrent-To\":\"<urn:uuid:05332c62-fea2-4fd8-8006-68d20db0b0ba>\",\"WARC-IP-Address\":\"130.245.27.3\",\"WARC-Target-URI\":\"https://www3.cs.stonybrook.edu/~algorith/files/satisfiability.shtml\",\"WARC-Payload-Digest\":\"sha1:OWMWH6JQWPMWOKDFJLUZKUIGCZY364S5\",\"WARC-Block-Digest\":\"sha1:D6CMPOKI2IRUG5A7MN7OEQF54UHXW4NU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500154.33_warc_CC-MAIN-20230204205328-20230204235328-00683.warc.gz\"}"}