Computational Complexity
Lecture 0 Computation Computation
A paradigm of modern science Computation
A paradigm of modern science
Theory of computation/computational complexity is to computer science what theoretical physics is to electronics Computational Complexity Computational Complexity
Computation: Computational Complexity
Computation:
Problems to be solved Computational Complexity
Computation:
Problems to be solved
Algorithms to solve them Computational Complexity
Computation:
Problems to be solved
Algorithms to solve them
in various models of computation Computational Complexity
Computation:
Problems to be solved
Algorithms to solve them
in various models of computation
Complexity of a problem (in a comp. model) Computational Complexity
Computation:
Problems to be solved
Algorithms to solve them
in various models of computation
Complexity of a problem (in a comp. model)
How much “resource” is sufficient/necessary Computational Complexity
in w.r.t of Models of Complexity Problems computation measures Problems Problems
Input represented as (say) a binary string Problems
Input represented as (say) a binary string
Given input, find a “satisfactory output” Problems
Input represented as (say) a binary string
Given input, find a “satisfactory output”
Function evaluation: only one correct output Problems
Input represented as (say) a binary string
Given input, find a “satisfactory output”
Function evaluation: only one correct output
Approximate evaluation Problems
Input represented as (say) a binary string
Given input, find a “satisfactory output”
Function evaluation: only one correct output
Approximate evaluation
Search problem: find one of many (if any) Problems
Input represented as (say) a binary string
Given input, find a “satisfactory output”
Function evaluation: only one correct output
Approximate evaluation
Search problem: find one of many (if any)
Decision problem: find out if any Problems
Input represented as (say) a binary string
Given input, find a “satisfactory output”
Function evaluation: only one correct output
Approximate evaluation
Search problem: find one of many (if any)
Decision problem: find out if any
A Boolean function evaluation (TRUE/FALSE) Decision Problems Decision Problems
Evaluate a Boolean function (TRUE/FALSE) Decision Problems
Evaluate a Boolean function (TRUE/FALSE)
i.e., Decide if input has some property Decision Problems
Evaluate a Boolean function (TRUE/FALSE)
i.e., Decide if input has some property
Language Decision Problems
Evaluate a Boolean function (TRUE/FALSE)
i.e., Decide if input has some property
Language
Set of inputs with a particular property Decision Problems
Evaluate a Boolean function (TRUE/FALSE)
i.e., Decide if input has some property
Language
Set of inputs with a particular property
e.g. L = {x | x has equal number of 0s and 1s} Decision Problems
Evaluate a Boolean function (TRUE/FALSE)
i.e., Decide if input has some property
Language
Set of inputs with a particular property
e.g. L = {x | x has equal number of 0s and 1s}
Decide if input is in L Complexity of Languages Complexity of Languages
Some languages are “simpler” than others Complexity of Languages
Some languages are “simpler” than others
L1 = {x | x starts with 0} Complexity of Languages
Some languages are “simpler” than others
L1 = {x | x starts with 0}
L2 = {x | x has equal number of 0s and 1s} Complexity of Languages
Some languages are “simpler” than others
L1 = {x | x starts with 0}
L2 = {x | x has equal number of 0s and 1s}
Simpler in what way? Complexity of Languages
Some languages are “simpler” than others
L1 = {x | x starts with 0}
L2 = {x | x has equal number of 0s and 1s}
Simpler in what way?
Fewer calculations, less memory, need not read all input, can do in an FSM Complexity of Languages
Some languages are “simpler” than others
L1 = {x | x starts with 0}
L2 = {x | x has equal number of 0s and 1s}
Simpler in what way?
Fewer calculations, less memory, need not Fl yin read all input, can do in an FSM g Spa M o ns ghe te t r? ti Complexity of Languages Complexity of Languages
Relating complexities of problems Complexity of Languages
Relating complexities of problems
Mo = {x | x has more 0s than 1s} Complexity of Languages
Relating complexities of problems
Mo = {x | x has more 0s than 1s}
Eq = {x | x has equal number of 0s and 1s} Complexity of Languages
Relating complexities of problems
Mo = {x | x has more 0s than 1s}
Eq = {x | x has equal number of 0s and 1s}
Eq(x): Complexity of Languages
Relating complexities of problems
Mo = {x | x has more 0s than 1s}
Eq = {x | x has equal number of 0s and 1s}
Eq(x):
if (Mo(x0) == TRUE and Mo(x) == FALSE) then TRUE; else FALSE Complexity of Languages
Relating complexities of problems
Mo = {x | x has more 0s than 1s}
Eq = {x | x has equal number of 0s and 1s}
Eq(x):
if (Mo(x0) == TRUE and Mo(x) == FALSE) then TRUE; else FALSE
Eq is not (much) more complex than Mo. Mo is at least (almost) as complex as Eq. Complexity of Languages
Relating complexities of problems
Mo = {x | x has more 0s than 1s}
Eq = {x | x has equal number of 0s and 1s}
Eq(x): Eq reduces to Mo
if (Mo(x0) == TRUE and Mo(x) == FALSE) then TRUE; else FALSE
Eq is not (much) more complex than Mo. Mo is at least (almost) as complex as Eq. Models of Computation Models of Computation
FSM, PDA, TM Models of Computation
FSM, PDA, TM
Variations: Non-deterministic, probabilistic. Other models: quantum computation Models of Computation
FSM, PDA, TM
Variations: Non-deterministic, probabilistic. Other models: quantum computation
Church-Turing thesis: TM is as “powerful” as it gets Models of Computation
FSM, PDA, TM
Variations: Non-deterministic, probabilistic. Other models: quantum computation
Church-Turing thesis: TM is as “powerful” as it gets
Not enough TMs (algorithms/programs) to solve all decision problems! Models of Computation
FSM, PDA, TM
Variations: Non-deterministic, probabilistic. Other models: quantum computation
Church-Turing thesis: TM is as “powerful” as it gets
Not enough TMs (algorithms/programs) to solve all decision problems!
Non-uniform computation: circuit families Complexity Measures Complexity Measures
Number of computational steps, amount of memory, circuit size/depth, ... Complexity Measures
Number of computational steps, amount of memory, circuit size/depth, ...
Exact numbers very much dependent on exact specification of the model (e.g. no. of tapes in TM) Complexity Measures
Number of computational steps, amount of memory, circuit size/depth, ...
Exact numbers very much dependent on exact specification of the model (e.g. no. of tapes in TM)
But “broad trends” robust Complexity Measures
Number of computational steps, amount of memory, circuit size/depth, ...
Exact numbers very much dependent on exact specification of the model (e.g. no. of tapes in TM)
But “broad trends” robust Complexity Measures
Number of computational steps, amount of memory, circuit size/depth, ...
Exact numbers very much dependent on exact specification of the model (e.g. no. of tapes in TM)
But “broad trends” robust
Trends: asymptotic Complexity Measures
Number of computational steps, amount of memory, circuit size/depth, ...
Exact numbers very much dependent on exact specification of the model (e.g. no. of tapes in TM)
But “broad trends” robust
Trends: asymptotic
Broad: Log, Poly, Exp Complexity Measures
Number of computational steps, amount of memory, circuit size/depth, ...
Exact numbers very much dependent on exact specification of the model (e.g. no. of tapes in TM)
But “broad trends” robust
Trends: asymptotic
Broad: Log, Poly, Exp Log Poly Exp Complexity Theory Complexity Theory
Understand complexity of problems (i.e., how much resource used by best algorithm for it) Complexity Theory
Understand complexity of problems (i.e., how much resource used by best algorithm for it)
Relate problems to each other [Reduce] Complexity Theory
Understand complexity of problems (i.e., how much resource used by best algorithm for it)
Relate problems to each other [Reduce]
Relate computational models/complexity measures to each other [Simulate] Complexity Theory
Understand complexity of problems (i.e., how much resource used by best algorithm for it)
Relate problems to each other [Reduce]
Relate computational models/complexity measures to each other [Simulate]
Calculate complexity of problems Complexity Classes Complexity Classes
Collect (decision) problems with similar complexity into classes Complexity Classes
Collect (decision) problems with similar complexity into classes Complexity Classes
Collect (decision) problems with similar complexity into classes P Complexity Classes
Collect (decision) problems with similar complexity into classes NP P Complexity Classes
Collect (decision) problems with similar complexity IP into classes NP P Complexity Classes
Collect (decision) problems with PSPACE similar complexity IP into classes NP P Complexity Classes
Collect (decision) problems with PSPACE similar complexity IP into classes NP P
BPP Complexity Classes
Collect (decision) problems with PSPACE similar complexity IP into classes NP P Relate classes to each other BPP Complexity IP=PSPACE Classes
Collect (decision) problems with PSPACE similar complexity IP into classes NP P Relate classes to each other BPP Complexity IP=PSPACE Classes P vs NP ?
Collect (decision) problems with PSPACE similar complexity IP into classes NP P Relate classes to each other BPP Complexity IP=PSPACE P vs NP ? Classes P vs BPP ?
Collect (decision) problems with PSPACE similar complexity IP into classes NP P Relate classes to each other BPP Complexity IP=PSPACE P vs NP ? Classes P vs BPP ?
Collect (decision) problems with PSPACE similar complexity IP into classes NP P Relate classes to each other BPP Hundreds of classes! Complexity Zoo!
Collect problems with similar complexity into classes
Relate classes to each other
Hundreds of classes! ALL
AH
RE
R
PR
ELEMENTARY
Complexity NEEE P-Sel
NEEXP EEE
EEXP EESPACE
MIP_{EXP} EXPSPACE
IP_{EXP} PEXP EXPH
SEH NEXP^{NP} NEE
EXP^{NP} AM_{EXP}
NEXP/poly MA_{EXP} BPEE
Zoo! EXP/poly NEXP BPEXP EE +EXP
EXP QRG ESPACE
RG Almost-PSPACE QPSPACE
PSPACE Coh
PL_{infty} CH
MP^{#P} AvgE Collect problems P^{PP} EH PP/poly P^{#P[1]}
BP.PP MP
PH SF_4 with similar Sigma_3P AmpMP QMIP QMIP_{le} QMIP_{ne} SQG Delta_3P
BQP/qpoly MIP* QIP MIP RG[1] Sigma_2P BPP^{NP}
BQP/mpoly NE/poly XOR-MIP*[2,1] QMA(2) QIP[2] IP RP^{NP} frIP complexity into BQP/poly NP/poly QSZK QAM AM[polylog] compIP ZPP^{NP} QS_2P PP SF_3 (NP-cap-coNP)/poly BQP/qlog DQP CZK AM S_2P P^{QMA} A_0PP SF_2
P/poly BQP/mlog N.NISZK SZK QMA Delta_2P BPP_{path} APP Check
BPP//log BQP/log YQP NIQSZK NISZK_h QCMA SBP MA_E P^{NP[log^2]} AWPP C_=P classes IC[log,poly] BPP/rlog BQP NE NISZK MA WAPP BPE P^{NP[log]} WPP BPP/mlog HeurBPP YPP N.BPP PZK AmpP-BQP RPE BPQP UE BH ModP
NP/log BPP/log AVBPP FH TreeBQP ZPE BH_2 LWPP Mod_5P +P Mod_3P
Nearly-P NP/one P/log BPP E US RP^{PromiseUP} SPP NT*
AvgP NP RQP SUBEXP P^{FewP} NT
YP compNP RBQP ZQP QP Few EP
ZBQP RP EQP betaP QPLIN FewP UAP
Relate classes to QNC ZPP Q beta_2P UP
P-Close RNC HalfP NLINSPACE
P NLIN polyL
NC LIN SC
each other QCFL AL NC^2
+L/poly +SAC^1 L^{DET} AC^1
NL/poly +L SAC^1 PL CSL
L/poly C_=L 1NAuxPDA^p GCSL
NL SPL CFL BPL
LFew RL DCFL Hundreds of FewL LogFew FewUL FOLL
UL R_HL
QNC^1 L classes! TC^0/poly NC^1 PBP QACC^0 TC^0 REG
PT_1 QAC^0 MAC^0 ACC^0 (k>=5)-PBP
PL_1 AC^0/poly AC^0[2] MAJORITY 4-PBP
SPARSE QNC_f^0 AC^0 3-PBP
TALLY QNC^0 SAC^0 +SAC^0 2-PBP
NC^0 PARITY
NONE ALL
AH
RE
R
PR
ELEMENTARY
NEEE P-Sel
NEEXP EEE
EEXP EESPACE
MIP_{EXP} EXPSPACE
IP_{EXP} PEXP EXPH
SEH NEXP^{NP} NEE
EXP^{NP} AM_{EXP}
NEXP/poly MA_{EXP} BPEE
EXP/poly NEXP BPEXP EE +EXP
EXP QRG ESPACE
RG Almost-PSPACE QPSPACE
PSPACE Coh
PL_{infty} CH
MP^{#P} AvgE
P^{PP} EH
PP/poly P^{#P[1]}
BP.PP MP
PH SF_4
Sigma_3P AmpMP
QMIP QMIP_{le} QMIP_{ne} SQG Delta_3P
BQP/qpoly MIP* QIP MIP RG[1] Sigma_2P BPP^{NP} BQP/mpolyComplNE/poly eXxOR-MiIPty*[2,1] QMA(2) QIP[2] IP RP^{NP} frIP BQP/poly NP/poly QSZK QAM AM[polylog] compIP ZPP^{NP} QS_2P PP SF_3
(NP-cap-coNP)/poly BQP/qlog Zoo! DQP CZK AM S_2P P^{QMA} A_0PP SF_2
P/poly BQP/mCollog lect problems N.NISZK SZK QMA Delta_2P BPP_{path} APP Check with similar BPP//log BQP/log YQP NIQSZK NISZK_h QCMA SBP MA_E P^{NP[log^2]} AWPP C_=P complexity into IC[log,poly] BPP/rlog classes BQP NE NISZK MA WAPP BPE P^{NP[log]} WPP
BPP/mlog RelatHeeur BPcP lasseYPP s to N.BPP PZK AmpP-BQP RPE BPQP UE BH ModP each other NP/log BPP/log AVBPP FH TreeBQP ZPE BH_2 LWPP Mod_5P +P Mod_3P
Nearly-P NP/one P/log Hundreds of BPP E US RP^{PromiseUP} SPP NT* classes!
AvgP NP RQP SUBEXP P^{FewP} NT
YP compNP RBQP ZQP QP Few EP
ZBQP RP EQP betaP QPLIN FewP UAP
QNC ZPP Q beta_2P UP
P-Close RNC HalfP NLINSPACE
P NLIN polyL
NC LIN SC
QCFL AL NC^2
+L/poly +SAC^1 L^{DET} AC^1
NL/poly +L SAC^1 PL CSL
L/poly C_=L 1NAuxPDA^p GCSL
NL SPL CFL BPL
LFew RL DCFL
FewL LogFew
FewUL FOLL
UL R_HL
QNC^1 L
TC^0/poly NC^1 PBP
QACC^0 TC^0 REG
PT_1 QAC^0 MAC^0 ACC^0 (k>=5)-PBP
PL_1 AC^0/poly AC^0[2] MAJORITY 4-PBP
SPARSE QNC_f^0 AC^0 3-PBP
TALLY QNC^0 SAC^0 +SAC^0 2-PBP
NC^0 PARITY
NONE Complexity in various settings Complexity in various settings
With various models of computation: decision trees, interactive settings, probabilistic computation Complexity in various settings
With various models of computation: decision trees, interactive settings, probabilistic computation
Various measures: depth, width, amount of communication, number of rounds, amount of randomness, amount of non-uniformity, ... Complexity in various settings
With various models of computation: decision trees, interactive settings, probabilistic computation
Various measures: depth, width, amount of communication, number of rounds, amount of randomness, amount of non-uniformity, ...
Various connections: time vs. space, randomness vs. hardness Cryptography Cryptography
Need to prove that a scheme is secure (according to some definition) Cryptography
Need to prove that a scheme is secure (according to some definition)
i.e., breaking security has high complexity Cryptography
Need to prove that a scheme is secure (according to some definition)
i.e., breaking security has high complexity
Reductions: if you could break my scheme’s security efficiently, I can solve a hard problem almost as efficiently Cryptography
Need to prove that a scheme is secure (according to some definition)
i.e., breaking security has high complexity
Reductions: if you could break my scheme’s security efficiently, I can solve a hard problem almost as efficiently
Hard problems: almost all instances hard Cryptography
Need to prove that a scheme is secure (according to some definition)
i.e., breaking security has high complexity
Reductions: if you could break my scheme’s security efficiently, I can solve a hard problem almost as efficiently
Hard problems: almost all instances hard
For most keys scheme should be secure All that and much more.. All that and much more..
Welcome to CS 579! All that and much more..
Welcome to CS 579! Textbook: www.cs.princeton.edu/theory/complexity/ All that and much more..
Welcome to CS 579! Textbook: www.cs.princeton.edu/theory/complexity/ About 6 assignments and a class test All that and much more..
Welcome to CS 579! Textbook: www.cs.princeton.edu/theory/complexity/ About 6 assignments and a class test Office hours: TBA