# 3sat - CS 601/IITB Randomizd algorithm for 3 SAT Abhiram...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 601/IITB Randomizd algorithm for 3 SAT Abhiram Ranade Input: CNF formula. We will consider 3-CNF for simplicity. n variables. Output: A satisfying assignment. The obvious algorithm is to try out all 2 n assignments. For (2 n ) time. Since the problem is extremely important, exponential time algorithms have also been looked at, and the goal is minimize the exponent, i.e. minimize q where time = O ( q n ). Actually, we dont mind polynomial factors say n 2 q n . So let us use ~ O ( f ) to denote f 2 o ( n ) . So we are looking for algorithms with time ~ O ( q n ) for as small q as possible. We will see a randomized ~ O ((4 = 3) n ) algorithm. This is nearly the best algorithm known today { some minor variations of it improve the time in a fairly minor manner. It beats the best deterministic algorithms which are better than ~ O (2 n ). 1 The Algorithm The algorithm starts with a random initial state, and tries to improve it in the sense of going closer to a satisfying assignment. 1. Start with a random assignment to all variables. 2. For i = 1 :: 3 n If the current assignment is satisfying, then stop. Else let c be a clause that is false. Randomly pick any variable in c and negate it. 3. End for. Suppose s £ is any satisfying assignment, and s i the assignment constructed by the algo- rithm after i iterations. Let d i denote the Hamming distance between s i and d i . If clause c is not satisfying, then s i   1 ; s £ must di er in one of the variables in c . If we negate that variable, then d i = d i   1   1 and we will make progrss. Thus we have least 1/3 chance of making progress, and at most 2/3 chance of making regress. But it turns out that this gamble is good enough!...
View Full Document

## This note was uploaded on 01/04/2010 for the course CSE CS601 taught by Professor Prof.ranade during the Summer '09 term at IIT Bombay.

### Page1 / 3

3sat - CS 601/IITB Randomizd algorithm for 3 SAT Abhiram...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online