randomized algorithms cs648

Post on 15-Feb-2016

52 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Randomized Algorithms CS648. Lecture 23 Probabilistic methods - II. Its solution can be viewed as an application of Probabilistic method. 3-SAT Problem. 3-SAT Problem. Notations : A Boolean variable: a variable that can take value true or false . - PowerPoint PPT Presentation

TRANSCRIPT

Randomized AlgorithmsCS648

Lecture 23Probabilistic methods - II

1

3-SAT PROBLEM

Its solution can be viewed as an application of Probabilistic method.

2

3-SAT Problem

Notations:• A Boolean variable: a variable that can take value true or false. • A term: a Boolean variable or its negation.• A clause : Disjunction of 3 disjoint terms.

Let ,…, be Boolean variables.Examples of a term: • • Examples of a clause:• • Note that is not a clause.

3

3-SAT Problem

Problem: Given clauses ,…, defined over Boolean variables ,…, , is there any assignment of true/false to the variables that will satisfy each clause.

Why is this problem difficult ?

Setting and to true and to false the first 3 clauses get satisfied but 4th clause is not satisfied.So trying to satisfy a subset of clause, one might render many others dissatisfied.

4

3-SAT Problem

Problem: Given clauses ,…, defined over Boolean variables ,…, , is there any assignment of true/false to the variables that will satisfy each clause.

Results known: 3-SAT Problem NP-complete. It is unlikely to have any polynomial time solution.

5

Max 3-SAT Problem

Problem: Given clauses ,…, defined over Boolean variables ,…, , compute the maximum number of clauses that can be satisfied simultaneously ?

Results known: Max 3-SAT Problem NP-complete. It is unlikely to have any polynomial time solution.

The power of RandomizationAn approximation algorithm:There is a very simple randomized algorithm that will satisfy at least clauses.

6

Max 3-SAT Problem

Monte Carlo Algorithm: For each to assign value true/false to randomly uniformly and independently;return all the clauses that are satisfied.

Analysis: : the number of clauses that are satisfied.

7

¿∑𝒊

𝟕𝟖

¿𝟕𝟖𝒎

Max 3-SAT Problem

Las Vegas Algorithm: Repeat{ For each to { assign value true/false to randomly uniformly and independently; } Let be the number of clauses that are satisfied.}Until

Analysis: : the probability that a single iteration of Repeat loop is successful Expected running time:

8

Getting a lower bound on

: the number of clauses that are satisfied.

Alternate formulation of :Let : probability that there are exactly clauses that are satisfied.

Question: What is the relation between and ’s ?Answer:

9

Getting a lower bound on Aim: To get a lower bound on Let be the largest integer

10

Express as where.So .

If then is 1.For all other cases, is a fraction with

denominator . So

Max 3-SAT Problem

Las Vegas Algorithm: Repeat{ For each to { assign value true/false to randomly uniformly and independently; } Let be the number of clauses that are satisfied.}Until

Analysis: : the probability that a single iteration of Repeat loop is successful Expected running time:

11

¿𝑶 ((𝒎+𝒏 )𝟐)

Max 3-SAT Problem

Theorem:There is an time Las Vegas algorithm for approximate Max 3-SAT Problem. It computes an assignment which satisfies at least fraction of clauses.

Question: Is the best approximation factor that can be achieved for this problem ?Answer: Yes, indeed. It has also been proved that if P≠NP, then there can not be any approx. algorithm that can achieve a factor better than .

So the simple randomized algorithm is also the best possible algorithm. Isn’t it very inspiring ?

12

PROBABILISTIC METHOD:ALTERATION

13

Alteration

Suppose we wish to show the existence of a structure with desired properties. The following method is sometimes quite useful

• Form a random instance of the structure.

• This structure will not have the desired property but it will be very close to having the desired property.

• Slightly alter the random instance and the resulting structure will have the desired property.

14

AN INTERESTING PROBLEM IN COMBINATORIAL GEOMETRY

15

A conjecture:If points are placed in a unit square, the smallest of the triangles will have area .

The conjecture was disproved in 1982.

Theorem: It is possible to place points in a unit square so that each triangle has area .

16

𝟏

Theorem (we shall prove): It is possible to place points in a unit square so that each triangle has area at least .

17

𝟏

1. Select points randomly uniformly.2. : the no. of triangles with area less

than.3. Calculate and make useful

inference… Suppose are 3 points selected randomly uniformly from unit square.Let probability that triangle has area less than .

Question: What is relation between and ?Answer:

18

𝟏

Probability(triangle has area less than )

Question:Given that | , what is the prob. that triangle has area ? Answer: less than

19

𝒓𝑷

𝑸

𝟏

𝑹

𝟐𝒂𝒓

𝟐𝒂𝒓

Probability(triangle has area less than )

Question:Given that | , what is the prob. that triangle has area ? Answer: less than

Question: P( ) = ?Answer:

Question: What is P(triangle has area )? Answer:

20

𝒓𝒓+𝜟𝒓

𝑷

𝑸

𝟏

¿∫0

√ 2

𝟖√𝟐𝝅 𝒂𝒅𝒓

Probability(triangle has area less than )

Lemma:If Suppose are 3 points selected randomly uniformly from unit square, then the prob. that triangle has area less than is bounded by .

: the no. of triangles with area less than.

Question: What is if points are selected ?Answer:

21

𝑷

𝑸

𝟏

𝑹

¿𝟎 .𝟏𝒏

1. Select points randomly uniformly.2. : the no. of triangles with area less

than.3. Note that 4. Remove one point from each

triangle with area less than .

Expected number of points left: .

There is no triangle formed by these points with area less than .

22

𝟏

AN INTERESTING PROBLEM IN GRAPH THEORY

23

Dense graphs with large girth

: undirected unweighted graph on vertices and edges.

Girth of : Length of smallest cycle in .

It can be observed that if a graph is dense, its girth will be small. For example, a complete graph has girth . In fact the following result is well known in graph theory.

Theorem: If a graph has or more edges, its girth must be at most .

Question: Is the result mentioned in the theorem above tight ? Answer: Yes, there are graphs which have () edges and girth at least .

24

Dense graphs with large girth

Theorem: For each , there are graphs on vertices having at least edges and girth at least .

We shall prove this theorem using the method of alteration. We shall provide just a sketch. The remaining details are straightforward and you are encouraged to fill in these details.

The following Lemma will be useful.Lemma: The number of cycles of length in a complete graph on vertices is

25

Dense graphs with large girth

• Construct a random graph where we add each edge randomly independently with probability .

• What should be the value of so that expected number of edges is close to ?

• Show that the expected number of cycles of length in the random graph will be less than .

• Show that expected number of cycles of length less than is less than .• Remove one edge from each cycle of length less than .• Show that there will still be edges left (choose sufficiently large value of ).• We are done.

26

choose

top related