Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Randomized Algorithms and the Probabilistic Method

Similar presentations


Presentation on theme: "Introduction to Randomized Algorithms and the Probabilistic Method"— Presentation transcript:

1 Introduction to Randomized Algorithms and the Probabilistic Method

2 Making Decision Flip a coin.

3 Making Decision Flip a coin!
An algorithm which flip coins is called a randomized algorithm.

4 Why Randomness? Making decisions could be complicated.
A randomized algorithm is simpler. Consider the minimum cut problem Can be solved by max flow. Randomized algorithm? Pick a random edge and contract. And repeat until two vertices left.

5 Why Randomness? Making good decisions could be expensive.
A randomized algorithm is faster. Consider a sorting procedure. 8 Picking an element in the middle makes the procedure very efficient, but it is expensive (i.e. linear time) to find such an element. Picking a random element will do.

6 Why Randomness? Making good decisions could be expensive.
A randomized algorithm is faster. Minimum spanning trees A linear time randomized algorithm, but no known linear time deterministic algorithm. Primality testing A randomized polynomial time algorithm, but it takes thirty years to find a deterministic one. Volume estimation of a convex body A randomized polynomial time approximation algorithm, but no known deterministic polynomial time approximation algorithm.

7 Why Randomness? Probabilistic method:
Proving the existence of an object satisfying certain properties without actually constructing it. Show that a random object satisfying those properties with positive probability! Ramsey graph Find a two colouring of a complete graph of size n so that there is no monochromatic complete subgraph of size 2log(n) A random 2 colouring will do.

8 Why Randomness? Probabilistic method:
Proving the existence of an object satisfying certain properties without actually constructing it. Show that a random object satisfying those properties with positive probability! High girth high chromatic number graphs Find a graph with high girth (i.e. without short cycles) which requires many colours to colour it properly A (cleverly constructed) random graph will do.

9 Why Randomness? In many practical problems,
we need to deal with HUGE input, and don’t even have time to read it once. But can we still do something useful? Sublinear algorithm: randomness is essential. Fingerprinting: verifying equality of strings, pattern matching. The power of two choices: load balancing, hashing. Random walk: check connectivity in log-space.

10 Why Randomness? To fool an adversary, or not to be fooled by an adversary. Graph isomorphism: to test if two graphs are the same. This problem is hard and no one knows how to do it in polynomial time. Suppose Bob wants to convince you that two graphs are the same. You want to verify Bob’s claim, and you can ask Bob questions. What do you ask? Simply ask Bob to give you an ordering of the graphs to prove his claim.

11 Graph non-isomorphism
Suppose Bob wants to convince you that two graphs are not the same. You want to verify Bob’s claim, and you can ask him questions. What do you ask? Goal: If the graphs are not the same, then you believe Bob. If the graphs are the same, then you will catch Bob lying. The idea is very simple. Use randomness.

12 An Analogy Suppose Bob wants to convince you that two coins are not the same. (Bob claims that one is real and one is counterfeit, but you don’t know how to check.) You want to verify Bob’s claim, and you can ask him questions. What do you ask? Goal: If the coins are not the same, then you believe Bob. If the coins are the same, then you will catch Bob lying. Idea: put the coins in your back, pick one randomly (but you know which one you pick), and ask Bob whether the coin picked is real or counterfeit. Why does it work?

13 Graph non-isomorphism
You can do the following: - Label the graphs as G1 and G2. Randomly pick one graph and randomly permutes the ordering of its vertices. Ask Bob if the resulting graph is G1 or G2. Believe Bob if his answer is correct; otherwise not. Claim: if G1 and G2 are the same graphs, then you’ll catch Bob with probability at least ½. Proof: If G1 and G2 are the same graphs, then Bob doesn’t know which one you originally picked, and so can just guess, and hence with probability ½ he is incorrect.

14 Interactive Proof System
This kind of protocol is called an interactive proof system, it has important applications in cryptography and complexity theory. This also shows that asking questions is really important in learning, e.g. can ask questions to your teacher to verify his claim! Theorem: Any PSPACE problem has an interactive proof system.

15 Interactive Proof System
3-SAT: Given a boolean formula, check if there is a satisfying assignment. Counting 3-SAT: Given a boolean formula, check if the number of satisfying assignments is equal to k. Reversi: Given a broad configuration, check if the black player has a winning strategy. All have an interactive proof system. Implication: even being foolish doesn’t mean someone can fool you easily!

16 Probabilistic Checkable Proofs
3-SAT: Given a boolean formula, check if this formula is satisfiable. If this is satisfiable, you can convince me by showing a truth assignment, then I can check in linear time whether it indeed satisfies the formula. Can we do it in sublinear time? PCP theorem: There is a proof protocol with the following property: I only need to read 3 bits of the proof and if you are honest, then I always trust you; if you are lying, then I can catch you lying with probability at least ½!! Has deep implication in hardness of approximation!

17 Plan Randomized algorithms Randomized rounding Probabilistic method
Sublinear algorithm Tool: basic probability random variables, expected value, linearity of expectations, some basic inequalities, etc.

18 This Summary is an Online Content It is edited for Computation Theory Course by: T.Mariah Sami Khayat Teacher Adam University College For Contacting: Kingdom of Saudi Arabia Ministry of Education Umm AlQura University Adam University College Computer Science Department المملكة العربية السعودية وزارة التعليم جامعة أم القرى الكلية الجامعية أضم قسم الحاسب الآلي


Download ppt "Introduction to Randomized Algorithms and the Probabilistic Method"

Similar presentations


Ads by Google