2SAT
Instance: A 2-CNF formula
Problem: To decide if is satisfiable
Example: a 2CNF formula
(xy)(yz)(xz)(zy)
(xy)(yz)(xz)(zy)
Complexity
D.Moshkovits
1
PAP 184-185
2SAT is in P
Theorem: 2SAT is polynomial-time
decidable.
Proof: Well show how to solve t

2SAT Notes
Let us now investigate some variants
of the SAT problem and see how
various parameters may affect the
complexity of a problem.
In particular, we study the 2SAT
problem and its optimization version.
2SAT Page 1
We can limit the number of literal

Traveling Salesperson Problem
NP-Completeness
You have to visit n cities
You want to make the shortest trip
How could you do this?
What if you had a machine that could guess?
Lecture for CS 302
Non-deterministic polynomial time
Deterministic Polynomial Ti

Prove that 2SAT is in P
Shobhit Chaurasia (11010179), Harshil Lodhi (11010121), Hitesh Arora (11010122)
We propose the following polynomial time algorithm to decide whether a given 2SAT expression is
satisfiable or not.
Consider a 2CNF formula with n vari

Question:
Is there a polynomial algorithm for solving 2-SAT?
Proposition 1 2SAT P.
Proof. Given a formula F on variables cfw_x1, x2, . . . , xn,
construct a directed graph G whose vertices are
cfw_x1, x2, . . . , xn, x1, x2, . . . , xn.
For every clause l

Answers for Homework 11
CIS 675 L Algorithms
(i) DPV Exercise 8.2.
(iii) DPV Exercise 8.4.
Suppose, given a graph G, the procedure D(G) re- (a) An instance of clique-3 consists of a graph G and
an integer k. A possible solution consists of a set
turns tru

CoNP and Function Problems
coNP
By denition, coNP is the class of problems
whose complement is in NP.
NP is the class of problems that have succinct
certicates.
coNP is therefore the class of problems that
have succinct disqualications:
A no instance of a

C
B
A
Our First NP-Complete
Problem
The Cook-Levin theorem
Compl
1
Introduction
Objectives:
To present the first NP-Complete
problem
Overview:
SAT - definition and examples
The Cook-Levin theorem
What next?
Compl
2
SAT
Instance: A Boolean formula.

Where Can We Draw The
Line?
On the Hardness of
Satisfiability Problems
1
Introduction
Objectives:
To show variants of SAT and check if
they are NP-hard
Overview:
Known results
2SAT
Max2SAT
2
What Do We Know?
Checking if a propositional calculus
for

Lecture 20
NP-Completeness II
20.1
Overview
In the last lecture, we defined the class NP and the notion of NP-completeness, and proved
that the Circuit-SAT problem is NP-complete. In this lecture we continue our discussion of NPCompleteness, showing the f