Lecture 20: April 12 Introduction to Randomized Algorithms and the Probabilistic Method.

Slides:



Advertisements
Similar presentations
Sublinear Algorithms … Lecture 23: April 20.
Advertisements

Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Introduction to Algorithms NP-Complete
CSCI 3160 Design and Analysis of Algorithms Tutorial 4
Lecture 22: April 18 Probabilistic Method. Why Randomness? Probabilistic method: Proving the existence of an object satisfying certain properties without.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Great Theoretical Ideas in Computer Science for Some.
Theory of Computing Lecture 16 MAS 714 Hartmut Klauck.
Dana Moshkovitz. Back to NP L  NP iff members have short, efficiently checkable, certificates of membership. Is  satisfiable?  x 1 = truex 11 = true.
Complexity 26-1 Complexity Andrei Bulatov Interactive Proofs.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
1 Adapted from Oded Goldreich’s course lecture notes.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Randomized Algorithms and Randomized Rounding Lecture 21: April 13 G n 2 leaves
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Complete Problems Problems in Computer Science are classified into
Analysis of Algorithms CS 477/677
Chapter 11: Limitations of Algorithmic Power
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
Chapter 11 Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
Approximating the MST Weight in Sublinear Time Bernard Chazelle (Princeton) Ronitt Rubinfeld (NEC) Luca Trevisan (U.C. Berkeley)
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Chapter 11 Limitations of Algorithm Power. Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples:
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
CS151 Complexity Theory Lecture 13 May 11, Outline proof systems interactive proofs and their power Arthur-Merlin games.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
NP-complete Problems Prof. Sin-Min Lee Department of Computer Science.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 29.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
Great Theoretical Ideas in Computer Science.
The Theory of NP-Completeness
P & NP.
Property Testing (a.k.a. Sublinear Algorithms )
Probabilistic Algorithms
Introduction to Randomized Algorithms and the Probabilistic Method
Lecture 2-2 NP Class.
Part VI NP-Hardness.
Lecture 22 Complexity and Reductions
Lecture 5 NP Class.
NP-Completeness Yin Tat Lee
Analysis and design of algorithm
ICS 353: Design and Analysis of Algorithms
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
1. for (i=0; i < n; i+=2) if (A[i] > A[i+1]) swap(A[i], A[i+1])
Chapter 11 Limitations of Algorithm Power
NP-Completeness Yin Tat Lee
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Instructor: Aaron Roth
Instructor: Aaron Roth
Our old list of problems
Lecture 22 Complexity and Reductions
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
Presentation transcript:

Lecture 20: April 12 Introduction to Randomized Algorithms and the Probabilistic Method

Making Decision Flip a coin.

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

Why Randomness? A randomized algorithm is simpler. Making decisions could be complicated. 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.

Why Randomness? A randomized algorithm is faster. Making good decisions could be expensive. Consider a sorting procedure 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.

Why Randomness? A randomized algorithm is faster. Making good decisions could be expensive.  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.

Why Randomness? Probabilistic method: Proving the existence of an object satisfying certain properties without actually constructing it. 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) Show that a random object satisfying those properties with positive probability! A random 2 colouring will do.

Why Randomness? Probabilistic method: Proving the existence of an object satisfying certain properties without actually constructing it. 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 Show that a random object satisfying those properties with positive probability! A (cleverly constructed) random graph will do.

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.

Why Randomness? To fool an adversary, or not to be fooled by an adversary. Graph isomorphism: to test if two graphs are the same. 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? This problem is hard and no one knows how to do it in polynomial time. Simply ask Bob to give you an ordering of the graphs to prove his claim.

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.

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?

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.

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.

Interactive Proof System Counting 3-SAT: Given a boolean formula, check if the number of satisfying assignments is equal to k. 3-SAT: Given a boolean formula, check if there is a satisfying assignment. 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!

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!

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