SlideServe
Menu
Préférences
© SlideServe · v2026

Randomized Algorithms CS648

galeno avatar
30 diapositives · 517 Views · Jul 29, 2014

Randomized Algorithms CS648. Lecture 25 Derandomization using conditional expectation A probability gem. Derandomization using conditional expectation. Problem 1 : Large cut in a graph. Problem: Let be an undirected graph on vertices and edges. Compute a cut of size at least .

Randomized Algorithms CS648 - slide 1
01 / 30Randomized Algorithms CS648
1 / 17

Télécharger la présentation

Randomized Algorithms CS648
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Randomized AlgorithmsCS648 Lecture 25 Derandomization using conditional expectation A probability gem

  2. Derandomization using conditional expectation

  3. Problem 1: Large cut in a graph Problem: Let be an undirected graph on vertices and edges. Compute a cut of size at least . A randomized algorithm: ∅; ∅; For each vertex Add to or randomly with probability independent of other vertices return the cut defined by . : size of cut () returned by the randomized algorithm. E[] = Question: How to deterministically compute a cut of size in () time? A simple application of conditional expectation 

  4. Problem 2: Approximate Distance Oracles Problem: Let be an undirected graph on vertices and edges. Compute a 3-approximate distance oracle of size . A randomized algorithm: ∅; Add each vertex from to randomly independently with probability . for each , compute Ball(,) for each ,compute distance to all vertices. : returned by the randomized algorithm. E[] = Question: How to deterministically compute a 3-approximate distance oracle of size O()? A non-trivial application of conditional expectation (published in ICALP 2005)

  5. Problem 3: Min-Cut Problem: Let be an undirected graph on vertices and edges. Compute minimum cut of . Randomized algorithmMin-cut(): { Repeat times { Let ; Contract(). } return the edges of multi-graph ; } Theorem: The algorithm computes a min-cut with probability at least . Question: How to deterministically compute a min-cut in time ? No idea whether we can use conditional expectation ?

  6. Large cut in a graph A randomized algorithm: ∅; ∅; For each vertex Add to or randomly with probability independent of other vertices returnthe cut defined by .

  7. Notations: For a given graph , and , : set of all edges from that have as one of the endpoint. : set of all edges from that have at least one end point in . : set of all edges from with one endpoint in and another in. : set of all edges from with one endpoint and another endpoint in .

  8. Notations: : random variable denoting the number of edges in a cut output by the algorithm. : random variable taking value 1 if and 0 otherwise : {,,…, } : {, , …, } where for . means.

  9. Make sure you understand “Conditional expectation” before using it. So try to focus on the following slide. conditional expectation

  10. || + | … …

  11. Derandomization using conditional expectation

  12. Role of conditional expectation Either or In general,  Either or

  13. The Binary tree associated with the Randomized algorithm … A cut of value

  14. Using Conditional expectation We wish to make choices for ’s such that IDEA: Given that , choose such that …

  15. = ||+ | … …

  16. = || + | = ?? = ?? Question: Should we assign to or to ?  Assign to if || || || + || +| || + || +|

  17. Making Choice for … …

  18. Deterministic algorithm for Large cut Input: = () ∅; ∅; For each vertex { if ||> || Add to ; else Add to ; } returnthe cut defined by . Time Complexity: O(). Theorem: There is a deterministic O() time algorithm to compute a cut of size at least in any given undirected graph. • This was a simple example of using conditional expectation to derandomize a randomized algorithm. But it conveys the crux of this powerful method. In order to use it to derandomize any other algorithm, all you might need is creative and analytical skills. • Also remember, we can not hope to derandomized every randomized algorithm. But if it is possible to derandomizeand algorithm, conditional expectation may prove to be a useful tool.

  19. An interesting PRoblem

  20. Selecting a random number Question: How many random bits are needed to select a number randomly uniformly from [1,32] ? Answer: 5 Question: How many random bits are needed to select a number randomly uniformly from [1,34] ? Answer: < 6⨯2 • Select a random number from [1,64] • If return ; else repeat;

  21. Selecting a random interval Question: There are rational numbers .  intervals {(), (),…,()} How to select an interval randomly with probability proportional to their length? Example: , , , Answer: • Select a random number from [] • If { if , returnI; if , returnII; if , returnIII; else return IV; } else repeat;

  22. Selecting a random interval There are rational numbers , with common denominator .  intervals {(), (),…,()} Example : , . Question: How many random bits are needed for selecting an interval randomly with probability proportional to their length? Answer: Surprise: In fact we just need bits only.

  23. Solution for2 Intervals

  24. 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 1 ………. 0 1 0 1 1 0 1 2 3 4 5 6 7 8 9 10 … 30 31

  25. 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 1 ………. 0 1 0 1 1 0 1 2 3 4 5 6 7 8 9 10 … 30 31

  26. 1 0 0 1 1 0 Show that expected number of random bits needed to select an interval is 0 1 2 3 4 5 6 7 8 9 10 … 30 31

  27. For any The expected number of random bits needed: Last gem of this course: There are intervals {(), (),…,()}, where ’s are rational. Show that we need expected random bits to select an interval randomly.

  28. Last slide Question: Why did the instructor conclude the course with a probability gem ? Answer: It is the joy of pondering over a probabilistic or algorithmic puzzle that is the strongest driving force to teach this course. Perhaps the same is the driving force for you to study this course. You disagree! You will realize this fact after a few years down the line… Thanks for the attention you paid to this course