Lecture 24: Randomized Complexity, Course Summary

Similar documents
CS154, Lecture 17: conp, Oracles again, Space Complexity

Lecture 23: More PSPACE-Complete, Randomized Complexity

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

conp, Oracles, Space Complexity

Definition: conp = { L L NP } What does a conp computation look like?

Lecture 20: conp and Friends, Oracles in Complexity Theory

20.1 2SAT. CS125 Lecture 20 Fall 2016

Lecture 19: Finish NP-Completeness, conp and Friends

Umans Complexity Theory Lectures

Computation Histories

1 Randomized Computation

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

Umans Complexity Theory Lectures

Computability and Complexity

Time to learn about NP-completeness!

CSE 105 THEORY OF COMPUTATION

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Homework Assignment 6 Answers

V Honors Theory of Computation

Notes for Lecture 3... x 4

Exam Computability and Complexity

6.045 Final Exam Solutions

Space Complexity. The space complexity of a program is how much memory it uses.

Time and space classes

Lecture 12: Mapping Reductions

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

CS151 Complexity Theory. Lecture 1 April 3, 2017

Lecture 21: Space Complexity (The Final Exam Frontier?)

Quantum Computing Lecture 8. Quantum Automata and Complexity

SOLUTION: SOLUTION: SOLUTION:

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

BBM402-Lecture 11: The Class NP

Review of Complexity Theory

Umans Complexity Theory Lectures

Randomized Complexity Classes; RP

Lecture Examples of problems which have randomized algorithms

CS 154, Lecture 3: DFA NFA, Regular Expressions

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

Chapter 5 : Randomized computation

Computational Complexity Theory

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Lecture 12: Interactive Proofs

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

Time to learn about NP-completeness!

CS154, Lecture 10: Rice s Theorem, Oracle Machines

CSCE 551 Final Exam, Spring 2004 Answer Key

CS 154 Introduction to Automata and Complexity Theory

Handout 5. α a1 a n. }, where. xi if a i = 1 1 if a i = 0.

Pr[X = s Y = t] = Pr[X = s] Pr[Y = t]

Randomized Computation

CS Communication Complexity: Applications and New Directions

6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.

MTAT Complexity Theory October 13th-14th, Lecture 6

CSE200: Computability and complexity Space Complexity

CS154, Lecture 13: P vs NP

Turing Machines and Time Complexity

: On the P vs. BPP problem. 30/12/2016 Lecture 11

Intro to Theory of Computation

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010

Non-emptiness Testing for TMs

Introduction to Advanced Results

Non-Approximability Results (2 nd part) 1/19

CS 151 Complexity Theory Spring Solution Set 5

1 More finite deterministic automata

Lecture 4 : Quest for Structure in Counting Problems

Lecture 2 Sep 5, 2017

CSCI3390-Lecture 14: The class NP

Lecture 12: Randomness Continued

Computer Sciences Department

Week 3: Reductions and Completeness

Notes on Complexity Theory Last updated: November, Lecture 10

Chapter 3: The Church-Turing Thesis

CS154, Lecture 13: P vs NP

INAPPROX APPROX PTAS. FPTAS Knapsack P

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

Exponential time vs probabilistic polynomial time

Lecture 22: PSPACE

Part I: Definitions and Properties

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

Logarithmic space. Evgenij Thorstensen V18. Evgenij Thorstensen Logarithmic space V18 1 / 18

Final exam study sheet for CS3719 Turing machines and decidability.

CSE 135: Introduction to Theory of Computation NP-completeness

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

Introduction to Interactive Proofs & The Sumcheck Protocol

CS 154. Finite Automata vs Regular Expressions, Non-Regular Languages

Theory of Computation

Lecture 19: Interactive Proofs and the PCP Theorem

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

DM17. Beregnelighed. Jacob Aae Mikkelsen

Lecture 23: Alternation vs. Counting

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch

Could we potentially place A in a smaller complexity class if we consider other computational models?

CSCI 1590 Intro to Computational Complexity

6.840 Language Membership

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

compare to comparison and pointer based sorting, binary trees

Transcription:

6.045 Lecture 24: Randomized Complexity, Course Summary 1

1/4 1/16 1/4 1/4 1/32 1/16 1/32 Probabilistic TMs 1/16 A probabilistic TM M is a nondeterministic TM where: Each nondeterministic step is called a coin flip Each nondeterministic step has only two legal next moves (heads or tails) The probability that M runs on a branch b is: Pr [ b ] = 2 -k where k is the number of coin flips that occur on branch b 2

Definition. A probabilistic TM M decides a language A with error if for all strings w, w A Pr [ M accepts w ] 1 - w A Pr [ M doesn t accept w ] 1 - Theorem: A language A is in NP if there is a nondeterministic polynomial time TM M such that for all strings w: w A Pr[ M accepts w ] > 0 w A Pr[ M accepts w ] = 0 3

BPP = Bounded Probabilistic P BPP = { L L is recognized by a probabilistic polynomial-time TM with error at most 1/3 } Why 1/3? It doesn t matter what error value we pick, as long as the error is smaller than 1/2. When the error is smaller than 1/2, we can apply the error reduction lemma. 4

Checking Matrix Multiplication CHECK = { (M 1,M 2,N) M 1, M 2 and N are matrices and M 1 M 2 = N } If M 1 and M 2 are n x n matrices, computing M 1 M 2 takes O(n 3 ) time normally, and O(n 2.373 ) time using very clever methods. Here is an O(n 2 )-time randomized algorithm for CHECK: Pick a 0-1 bit vector r at random, test if M 1 M 2 r = Nr Claim: If M 1 M 2 = N, then Pr [M 1 M 2 r = Nr ] = 1 If M 1 M 2 N, then Pr [M 1 M 2 r = Nr ] 1/2 WHY? 5

Checking Matrix Multiplication CHECK = { (M 1,M 2,N) M 1, M 2 and N are matrices and M 1 M 2 = N } If M 1 and M 2 are n x n matrices, computing M 1 M 2 takes O(n 3 ) time normally, and O(n 2.373 ) time using very clever methods. Here is an O(n 2 )-time randomized algorithm for CHECK: Pick a 0-1 bit vector r at random, test if M 1 M 2 r = Nr Claim: If M 1 M 2 = N, then Pr [M 1 M 2 r = Nr ] = 1 If M 1 M 2 N, then Pr [M 1 M 2 r = Nr ] 1/2 If we pick 20 random vectors and test them all, what is the probability of incorrect output? 1/2 20 < 0.000001 6

An arithmetic formula is like a Boolean formula, except it has +,, and * instead of OR, NOT, AND. ZERO-POLY = { p p is an arithmetic formula that is identically zero} Two examples of polynomials in ZERO-POLY: (x + y) (x + y) x x y y 2 x y Abbreviate as: (x + y) 2 x 2 y 2 2xy (x 2 + a 2 ) (y 2 + b 2 ) (x y a b) 2 (x b + a y) 2 There is a rich history of polynomial identities in mathematics. Useful also in program testing! 7

Testing Polynomials Let p(x) be a polynomial in one variable over Z p(x) = a 0 + a 1 x + a 2 x 2 + + a d x d Suppose p is hidden in a black box we can only see its inputs and outputs. Want to determine if p is identically 0 Simply evaluate p on d+1 distinct values! Non-zero degree d polynomials have d roots. But the zero polynomial has every value as a root. 8

Testing General Polynomials Let p(x 1,,x n ) be a polynomial in n variables over Z Suppose p(x 1,,x n ) is given to us, but as a very complicated arithmetic formula. Can we efficiently determine if p is identically 0? If p(x 1,,x n ) is a product of m polynomials, each of which is a polynomial in t terms, expanding out the whole expression could take t m time! Big Idea: Evaluate p on random values 9

Theorem (Schwartz-Zippel) Let p(x 1,x 2,,x n ) be a nonzero polynomial on n variables, where each variable has degree at most d. Let F ½ Z be finite. If a 1,, a m are selected randomly from F, then: Pr [ p(a 1,, a m ) = 0 ] dn/ F Proof (by induction on n): Base Case (n = 1): Pr [ p(a 1 ) = 0 ] d/ F Nonzero polynomials of degree d have most d roots, so at most d elements in F make p zero 10

Inductive Step (n > 1): Assume true for n-1 and prove true for n First we factor out the last variable, x n Write: p = p 0 + x n p 1 + x n2 p 2 + + x nd p d where x n does not occur in any p i (x 1,,x n-1 ) If p(a 1,,a n ) = 0, there are two possibilities: (1) For all i, p i (a 1,,a n-1 ) = 0 (2) Some p i (a 1,,a n-1 ) 0, and a n is a root of the 1-variable degree-d polynomial on x n that results from evaluating p 0,,p d on (a 1,,a n-1 ) Pr [ (1) ] (n-1)d/ F Pr [ (2) ] d/ F Pr [ (1) or (2) ] nd/ F 11

An arithmetic formula is like a Boolean formula, except it has +,, and * instead of OR, NOT, AND. ZERO-POLY = { p p is an arithmetic formula that is identically zero} Theorem: ZERO-POLY BPP Proof Idea: Suppose n= p. Then p has k n variables, and the degree of each variable is O(n). For all i=1,,k, choose r i randomly from {1,,n 3 }. If p(r 1,, r k ) = 0 then output zero else output nonzero This actually WORKS with high probability! 12

ZERO-POLY = { p p is an arithmetic formula that is identically zero} Theorem: ZERO-POLY BPP It is not known how to solve this problem efficiently without randomness! Showing ZERO-POLY P WOULD IMPLY NEW LOWER BOUNDS (not P NP, but still a breakthrough!) 13

BPP = { L L is recognized by a probabilistic polynomial-time TM with error at most 1/3 } Is BPP NP? THIS IS AN OPEN QUESTION! 14

Is BPP PSPACE? Yes! Run through all possible sequences of coin flips one at a time, and count the number of branches that accept. In fact, BPP NP NP is known, but BPP P NP is open! 15

Is NP BPP? THIS IS AN OPEN QUESTION! 16

Is BPP = EXPTIME? THIS IS AN OPEN QUESTION!?*!#! 17

Definition: A language A is in RP (Randomized P) if there is a nondeterministic polynomial time TM M such that for all strings x: x A Pr[M(x) accepts] = 0 x A Pr[M(x) accepts] > 2/3 NONZERO-POLY = { p p is an arithmetic formula that is not identically zero} Theorem: NONZERO-POLY RP 18

Is RP NP? Yes! 19

Is RP BPP? Yes! 20

Deterministic Finite Automata states 0 q 1 accept states (F) 1 0,1 1 q 0 q 2 0 0 start state (q 0 ) q 3 1 states 21

Deterministic Computation Non-Deterministic Computation reject accept or reject accept Are these equally powerful??? YES for finite automata 22

Regular Languages are closed under all of the following operations: Union: A B = { w w A or w B } Intersection: A B = { w w A and w B } Complement: A = { w Σ* w A } Reverse: A R = { w 1 w k w k w 1 A } Concatenation: A B = { vw v A and w B } Star: A* = { w 1 w k k 0 and each w i A } 23

Streaming Algorithms Have three components Initialize: <variables and their assignments> When next symbol seen is σ: <pseudocode using σ and vars> When stream stops (end of string): <accept/reject condition on vars> (or: <pseudocode for output>) Algorithm A computes L Σ if A accepts the strings in L, rejects strings not in L

Communication Complexity A theoretical model of distributed computing Function f : {0,1}* {0,1}*! {0,1} Two inputs, x {0,1}* and y {0,1}* We assume x = y =n. Think of n as HUGE Two computers: Alice and Bob Alice only knows x, Bob only knows y Goal: Compute f(x, y) by communicating as few bits as possible between Alice and Bob We do not count computation cost. We only care about the number of bits communicated. 25

Deterministic TM Computation (Decidable) Non-Deterministic TM Computation (Recognizable) reject accept or reject accept Are these equally powerful??? NO for Turing machines 26

recognizable decidable Always halts with answer co-recognizable

Reducing One Problem to Another f : Σ* Σ* is a computable function if there is a Turing machine M that halts with just f(w) written on its tape, for every input w A language A is mapping reducible to language B, written as A m B, if there is a computable f : Σ* Σ* such that for every w Σ*, w A f(w) B f is called a mapping reduction (or many-one reduction) from A to B 28

recognizable decidable co-recognizable

Deterministic Poly-Time Computation Non-Deterministic Poly-Time Computation reject accept or reject accept Are these equally powerful??? P = NP???? 30

conp NP MIN-FORMULA conp BPP P NP TAUT P FACTORING RP SAT NP NP NP EXPTIME PSPACE

What s next? A few possibilities 6.046 Design and Analysis of Algorithms 6.841/18.405 Advanced Complexity Theory 18.408 Topics in Theoretical Computer Science 18.416 Randomized Algorithms 6.875 Cryptography and Cryptanalysis 6.XXX Fine-Grained Algorithms & Complexity 32

Thank you! For being a great class