1 / 26

Randomized Algorithms CS648

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 .

anka
Télécharger la présentation

Randomized Algorithms CS648

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Randomized AlgorithmsCS648 Lecture 23 Probabilistic methods - II

  2. Its solution can be viewed as an application of Probabilistic method. 3-SAT Problem

  3. 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 3disjoint terms. Let ,…, be Boolean variables. Examples of a term: Examples of a clause: Note that is not a clause.

  4. 3-SAT Problem Problem: Givenclauses ,…, 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 notsatisfied. So trying to satisfy a subset of clause, one might render many others dissatisfied.

  5. 3-SAT Problem Problem: Givenclauses ,…, 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.

  6. Max 3-SAT Problem Problem: Givenclauses ,…, defined over Boolean variables ,…,, compute the maximum number of clauses that can be satisfied simultaneously ? Results known: Max3-SAT Problem NP-complete. • It is unlikely to have any polynomial time solution. The power of Randomization An approximation algorithm: There is a very simple randomized algorithm that will satisfy at least clauses.

  7. 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. 

  8. 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:

  9. 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:

  10. Getting a lower bound on Express as where. So. If then is 1. For all other cases, is a fraction with denominator . So Aim: To get a lower bound on Let be the largest integer   

  11. 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:

  12. 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 ?

  13. Probabilistic Method:Alteration

  14. 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.

  15. An interesting problem in Combinatorial Geometry

  16. 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 .

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

  18. Select points randomly uniformly. • : the no. of triangles with area less than. • Calculate and make useful inference… Suppose are3 points selected randomly uniformly from unit square. Let probability that triangle has area less than. Question: What is relation between and ? Answer:

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

  20. 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:

  21. Probability(triangle has area less than ) Lemma: If Suppose are3 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:

  22. Select points randomly uniformly. • : the no. of triangles with area less than. • Note that • 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 .

  23. An interesting problem in Graph Theory

  24. 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 .

  25. 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

  26. 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. choose

More Related