Sublinear Algorithms 1 3 2 … Lecture 23: April 20.

Slides:



Advertisements
Similar presentations
1+eps-Approximate Sparse Recovery Eric Price MIT David Woodruff IBM Almaden.
Advertisements

Tight Bounds for Distributed Functional Monitoring David Woodruff IBM Almaden Qin Zhang Aarhus University MADALGO Based on a paper in STOC, 2012.
Tight Bounds for Distributed Functional Monitoring David Woodruff IBM Almaden Qin Zhang Aarhus University MADALGO.
Optimal Space Lower Bounds for All Frequency Moments David Woodruff MIT
Numerical Linear Algebra in the Streaming Model Ken Clarkson - IBM David Woodruff - IBM.
Optimal Space Lower Bounds for all Frequency Moments David Woodruff Based on SODA 04 paper.
On the Amortized Complexity of Zero-Knowledge Proofs Ronald Cramer, CWI Ivan Damgård, Århus University.
Circuit and Communication Complexity. Karchmer – Wigderson Games Given The communication game G f : Alice getss.t. f(x)=1 Bob getss.t. f(y)=0 Goal: Find.
The Communication Complexity of Approximate Set Packing and Covering
CSCI 3160 Design and Analysis of Algorithms Tutorial 4
Totally Unimodular Matrices
Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March Alessandro Panconesi University La Sapienza of Rome.
Theory of Computing Lecture 3 MAS 714 Hartmut Klauck.
Lecture 22: April 18 Probabilistic Method. Why Randomness? Probabilistic method: Proving the existence of an object satisfying certain properties without.
Dana Moshkovitz. Back to NP L  NP iff members have short, efficiently checkable, certificates of membership. Is  satisfiable?  x 1 = truex 11 = true.
Having Proofs for Incorrectness
Foundations of Cryptography Lecture 4 Lecturer: Moni Naor.
Theoretical Program Checking Greg Bronevetsky. Background The field of Program Checking is about 13 years old. Pioneered by Manuel Blum, Hal Wasserman,
Complexity 26-1 Complexity Andrei Bulatov Interactive Proofs.
Session 4 Asymmetric ciphers.
CS151 Complexity Theory Lecture 6 April 15, 2015.
CS151 Complexity Theory Lecture 7 April 20, 2004.
1 Adapted from Oded Goldreich’s course lecture notes.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
The Counting Class #P Slides by Vera Asodi & Tomer Naveh
1 Introduction to Linear and Integer Programming Lecture 9: Feb 14.
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Randomness in Computation and Communication Part 1: Randomized algorithms Lap Chi Lau CSE CUHK.
1 The PCP starting point. 2 Overview In this lecture we’ll present the Quadratic Solvability problem. In this lecture we’ll present the Quadratic Solvability.
Lecture 20: April 12 Introduction to Randomized Algorithms and the Probabilistic Method.
Finite probability space set  (sample space) function P:  R + (probability distribution)  P(x) = 1 x 
NP-Completeness: 3D Matching
Great Theoretical Ideas in Computer Science.
1 Fingerprinting techniques. 2 Is X equal to Y? = ? = ?
Chapter 14 Randomized algorithms Introduction Las Vegas and Monte Carlo algorithms Randomized Quicksort Randomized selection Testing String Equality Pattern.
Semi-Numerical String Matching. All the methods we’ve seen so far have been based on comparisons. We propose alternative methods of computation such as:
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
NP Complexity By Mussie Araya. What is NP Complexity? Formal Definition: NP is the set of decision problems solvable in polynomial time by a non- deterministic.
CS151 Complexity Theory Lecture 13 May 11, Outline proof systems interactive proofs and their power Arthur-Merlin games.
CPSC 335 Randomized Algorithms Dr. Marina Gavrilova Computer Science University of Calgary Canada.
Karatsuba’s Algorithm for Integer Multiplication
Private Approximation of Search Problems Amos Beimel Paz Carmi Kobbi Nissim Enav Weinreb (Technion)
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Great Theoretical Ideas in Computer Science.
Applied Symbolic Computation1 Applied Symbolic Computation (CS 300) Karatsuba’s Algorithm for Integer Multiplication Jeremy R. Johnson.
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
© 2001 by Charles E. Leiserson Introduction to AlgorithmsDay 12 L8.1 Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 8 Prof. Charles E. Leiserson.
Information and Coding Theory Cyclic codes Juris Viksna, 2015.
Umans Complexity Theory Lectures Lecture 7b: Randomization in Communication Complexity.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Theory of Computational Complexity M1 Takao Inoshita Iwama & Ito Lab Graduate School of Informatics, Kyoto University.
PROBABILITY AND COMPUTING RANDOMIZED ALGORITHMS AND PROBABILISTIC ANALYSIS CHAPTER 1 IWAMA and ITO Lab. M1 Sakaidani Hikaru 1.
A Prime Example CS Lecture 20 A positive integer p  2 is prime if the only positive integers that divide p are 1 and p itself. Positive integers.
Information and Coding Theory
Property Testing (a.k.a. Sublinear Algorithms )
Lap Chi Lau we will only use slides 4 to 19
Probabilistic Algorithms
Introduction to Randomized Algorithms and the Probabilistic Method
On the Size of Pairing-based Non-interactive Arguments
Topics in Algorithms Lap Chi Lau.
Algorithms and Complexity
Interactive Proofs Adapted from Oded Goldreich’s course lecture notes.
CSE 6408 Advanced Algorithms.
CS21 Decidability and Tractability
EIGENVECTORS AND EIGENVALUES
CS151 Complexity Theory Lecture 7 April 23, 2019.
Presentation transcript:

Sublinear Algorithms 1 3 2 … Lecture 23: April 20

Matrix Multiplication Matrix multiplication: Given two nxn matrices A,B, compute AB. Straightfoward: O(n3) algorithm. Sophisticated: O(n2.376) algorithm Matrix multiplication verification: Given A,B,C, check if AB=C. Would it be easier?

Matrix Multiplication Matrix multiplication verification: Given A,B,C, check if AB=C. Freivald’s technique: there is an O(n2) time randomized algorithm This technique assumes that the entries are field elements, say, rational numbers. Idea: check some random places! Can we just take some row of A and some column of B?

Matrix Multiplication Can we just take some row of A and some column of B? Each operation just takes linear time, i.e. O(n) time. 1 1 But the probability of catching it is too low, i.e. O(1/n2).

Matrix Multiplication Idea: Need to do something more global, i.e. every entry is involved. Freivald’s technique: pick a random vector Then, compute x=Br, y=Ax=ABr, z=Cr. Check if y=z. This procedure can be done in O(n2) time. Obviously, if AB=C, then y=z.

Matrix Multiplication Theorem: if AB≠C, then Pr[ABr=Cr] ≤ 1/2. Proof: Let D=AB-C; so D is not the all-zeroes matrix. We wish to bound the probability that y=z, or equivalently, the probability that Dr=0. Let say the first row D(1) of D has a non-zero entry. And let D(1) = {d1,d2,d3,…,dk,0,0,…,0}. What is the probability that D(1)·r is non-zero? This probability would give a lower bound that we catch y≠z.

Matrix Multiplication What is the probability that D(1)·r is non-zero? Recall that D(1) = {d1,d2,d3,…,dk,0,0,…,0}. This is non-zero if and only if: if and only if: r1 are uniformly chosen from two values (0 or 1), the probability that D(1)·r is non-zero is at least 1/2. Hence, we have at least 1/2 probability to catch it if AB≠C.

Verifying Polynomial Identities Given three polynomials P1(x), P2(x), and P3(x), verify that P1 P2 = P3. Fast Fourier Transform: O(n log(n)) time if P1,P2 are of degree n. Can we test it in linear time? Idea: just pick a random point y and test if P1(y) P2(y) = P3(y). Consider Q(x)=P1(x)P2(x) – P3(x). It is a degree 2n polynomial, and has at most 2n roots. If we choose randomly from, say, 4n elements and test it, then with probability at least 1/2 we can catch it.

Verifying Perfect Matching Given a bipartite graph B=(U,V,E), verify if B has a perfect matching. Consider the following matrix: if there is an edge between u(i) and v(j) = otherwise Theorem: B has a perfect matching if and only if det(A) ≠ 0.

Verifying Perfect Matching Theorem: B has a perfect matching if and only if det(A) ≠ 0. Since each variable x(i,j) occurs at most once in A, there can be no cancellation of the terms in the summation. Therefore the determinant is not identically zero if and only if there is a permutation πfor which the corresponding term is non-zero. That is, each entry is non-zero, and hence a perfect matching!

Verifying Perfect Matching Theorem: B has a perfect matching if and only if det(A) ≠ 0. So, now we “only” need to check if det(A) ≠ 0. Observation: det(A) is a (multi-variable) polynomial Idea: Substitute random points and evaluate the polynomial. Once the values are substituted, the problem reduces to compute a determinant, which can be done in O(n2.376) time. Deterministic running time = O(m√n) = O(n2.5) time.

Verifying Perfect Matching Idea: Substitute random points and evaluate the polynomial. What is the probability that it works? (Schwartz-Zippel Theorem): Let Q(x1,…,xn) in F[x1,…xn] be a multivariate polynomial of total degree d. Fix any finite set S of F, and let r1,…,rn be chosen independently and uniformly at random from S. Then, In our application, d = number of vertices on one side. Choose a field of size at least 2n, say modulo a small prime number, will do.

Any deterministic consistency check requires to transmit all n bits. Verifying Equality of Strings Suppose that Alice maintains a large database of information. Bob maintains a second copy of the database. Periodically, they want to compare their databases for consistency. Any deterministic consistency check requires to transmit all n bits. Can we do better? Let the bits of Alice be (a1,…,an) and the bits of Bob be (b1,…,bn). Check random bits? Not efficient enough if there is only one error. Need some more “global” method.

Verifying Equality of Strings Idea: create “fingerprints” for the two databases. Interpret the data as n-bit integers a and b, by defining Define the fingerprinting function as where p is a prime number. Algorithm: pick a random prime, test if F(a) = F(b).

Verifying Equality of Strings Algorithm: pick a random prime, test if F(a) = F(b). Bits sent: O(log(p)) instead of n. To be efficient, want p to be small. What is the probability of making mistake? Consider c = |a-b|. How many primes can divide c? Since c ≤ 2n, the number of distinct prime divisor of c is at most n, why?

Verifying Equality of Strings There are at most n primes which divide c = |a-b|. Bits sent: O(log(p)) instead of n. To be efficient, want p to be small. Now we want to choose a number z, large enough so that there are enough primes smaller than z, small enough so that the communication is efficient. Given z, by the Prime Number Theorem, there are about z/ln(z) primes smaller than z.

Verifying Equality of Strings Fix z. Probability of making mistake ≤ n/(z/ln(z)) = nln(z)/z. Bits need to be sent ≤ O(log(z)) A good choice: set z = tn log(tn) for a large t. Probability of making mistake ≤ O(1/t). Bits need to be sent ≤ O(log(t) + log(n)) Set t=n would be good.

Pattern Matching Given a text X = x1 x2 … xn, and a pattern Y = y1 y2 … ym, check if there is a j so that xj … x(j+m-1) = y1 … ym. There is a straightforward O(mn) algorithm. There is an optimal O(m+n) deterministic algorithm. We now show a very simple O(m+n) randomized algorithm. Idea: fingerprinting.

Pattern Matching Write X(j) for xj … x(j+m-1). Goal: to check if Y=X(j) for some j. Idea: fingerprinting. Algorithm: compare F(Y) and F(X(j)), say “match” if they are equal Fix a number z, choose a random prime p smaller than z. There could be false match, but this probability is at most

Pattern Matching There are n positions, so the probability that we make a false match Choose This is at most O(1/n). What is the running time? So, the fingerprints can be updated in O(1) time, and hence O(n+m) time.

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!

Interactive Proof System Counting 3-SAT: Given a boolean formula, check if the number of satisfying assignments is equal to k. Key technique: arithmetization And then use the previous technique or picking random element to evaluate…

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!

about this course Focus: analysis Exact algorithm: running time Approximation algorithm: performance guarantee Randomized algorithm: probability Techniques: Combinatorial approaches Linear programming Probabilities Algebraic technique? Topological method?????

Feedback?