complexity of counting
play

Complexity of Counting Lecture 20 #P 1 FP 2 FP Turing Machines - PowerPoint PPT Presentation

Complexity of Counting Lecture 20 #P 1 FP 2 FP Turing Machines computing a (not necessarily Boolean) function of the input 2 FP Turing Machines computing a (not necessarily Boolean) function of the input Writes the output on an output


  1. Complexity of Counting Lecture 20 #P 1

  2. FP 2

  3. FP Turing Machines computing a (not necessarily Boolean) function of the input 2

  4. FP Turing Machines computing a (not necessarily Boolean) function of the input Writes the output on an output tape 2

  5. FP Turing Machines computing a (not necessarily Boolean) function of the input Writes the output on an output tape FP: class of efficiently computable functions 2

  6. FP Turing Machines computing a (not necessarily Boolean) function of the input Writes the output on an output tape FP: class of efficiently computable functions Computed by a TM running in polynomial time 2

  7. Counting Problems 3

  8. Counting Problems Counting: Functions of the form “number of witnesses” 3

  9. Counting Problems Counting: Functions of the form “number of witnesses” #R(x) = |{w: R(x,w)=1}| 3

  10. Counting Problems Counting: Functions of the form “number of witnesses” #R(x) = |{w: R(x,w)=1}| e.g: Number of subgraphs of a given graph with some property (trees, cycles, spanning trees, cycle covers, etc.) 3

  11. Counting Problems Counting: Functions of the form “number of witnesses” #R(x) = |{w: R(x,w)=1}| e.g: Number of subgraphs of a given graph with some property (trees, cycles, spanning trees, cycle covers, etc.) e.g.: Number of satisfying assignments to a boolean formula 3

  12. Counting Problems Counting: Functions of the form “number of witnesses” #R(x) = |{w: R(x,w)=1}| e.g: Number of subgraphs of a given graph with some property (trees, cycles, spanning trees, cycle covers, etc.) e.g.: Number of satisfying assignments to a boolean formula e.g.: Number of inputs less than x (lexicographically) that are in a language L 3

  13. #P 4

  14. #P Class of functions of the form number of witnesses for an NP language 4

  15. #P Class of functions of the form number of witnesses for an NP language #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation 4

  16. #P Class of functions of the form number of witnesses for an NP language #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation e.g.: #SPANTREE(G) = number of spanning trees in a graph G 4

  17. #P Class of functions of the form number of witnesses for an NP language #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation e.g.: #SPANTREE(G) = number of spanning trees in a graph G e.g.: #CYCLE(G) = number of simple cycles in a directed graph G 4

  18. #P Class of functions of the form number of witnesses for an NP language #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation e.g.: #SPANTREE(G) = number of spanning trees in a graph G e.g.: #CYCLE(G) = number of simple cycles in a directed graph G e.g.: #SAT( φ ) = number of satisfying assignments of φ 4

  19. #P Class of functions of the form number of witnesses for an NP language #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation e.g.: #SPANTREE(G) = number of spanning trees in a graph G e.g.: #CYCLE(G) = number of simple cycles in a directed graph G e.g.: #SAT( φ ) = number of satisfying assignments of φ Easy to see: FP ⊆ #P [Exercise] 4

  20. #P vs. NP 5

  21. #P vs. NP #R(x) = |{w: R(x,w)=1}|, were R is a polynomial time relation 5

  22. #P vs. NP #R(x) = |{w: R(x,w)=1}|, were R is a polynomial time relation To compute a function in #P: compute #R(x) 5

  23. #P vs. NP #R(x) = |{w: R(x,w)=1}|, were R is a polynomial time relation To compute a function in #P: compute #R(x) To decide a language in NP: check if #R(x) > 0 5

  24. #P vs. NP #R(x) = |{w: R(x,w)=1}|, were R is a polynomial time relation To compute a function in #P: compute #R(x) To decide a language in NP: check if #R(x) > 0 #P “harder” than NP 5

  25. #P vs. NP #R(x) = |{w: R(x,w)=1}|, were R is a polynomial time relation To compute a function in #P: compute #R(x) To decide a language in NP: check if #R(x) > 0 #P “harder” than NP If #P = FP, then P = NP 5

  26. #P vs. NP #R(x) = |{w: R(x,w)=1}|, were R is a polynomial time relation To compute a function in #P: compute #R(x) To decide a language in NP: check if #R(x) > 0 #P “harder” than NP If #P = FP, then P = NP How much harder? 5

  27. How hard is it to count? 6

  28. How hard is it to count? Not hard for some problems 6

  29. How hard is it to count? Not hard for some problems e.g.: #SPANTREE(G) = number of spanning trees in a graph G 6

  30. How hard is it to count? Not hard for some problems e.g.: #SPANTREE(G) = number of spanning trees in a graph G Kirchhoff's theorem: evaluating a simple determinant gives the answer 6

  31. How hard is it to count? Not hard for some problems e.g.: #SPANTREE(G) = number of spanning trees in a graph G Kirchhoff's theorem: evaluating a simple determinant gives the answer Hard for counting witnesses of NP-complete languages: e.g. #SAT (unless P=NP) 6

  32. How hard is it to count? Not hard for some problems e.g.: #SPANTREE(G) = number of spanning trees in a graph G Kirchhoff's theorem: evaluating a simple determinant gives the answer Hard for counting witnesses of NP-complete languages: e.g. #SAT (unless P=NP) Hard for some other problems too 6

  33. How hard is it to count? Not hard for some problems e.g.: #SPANTREE(G) = number of spanning trees in a graph G Kirchhoff's theorem: evaluating a simple determinant gives the answer Hard for counting witnesses of NP-complete languages: e.g. #SAT (unless P=NP) Hard for some other problems too If #CYCLE ∈ FP, then P=NP 6

  34. #CYCLE ∈ FP ⇒ P=NP 7

  35. #CYCLE ∈ FP ⇒ P=NP Reduce HAMILTONICITY to #CYCLE: Given G, to construct G’ such that #CYCLE(G’) is “large” iff G has a Hamiltonian cycle 7

  36. #CYCLE ∈ FP ⇒ P=NP Reduce HAMILTONICITY to #CYCLE: Given G, to construct G’ such that #CYCLE(G’) is “large” iff G has a Hamiltonian cycle Replace each edge in G by a gadget such that each cycle in G becomes “many” cycles in G’ 7

  37. #CYCLE ∈ FP ⇒ P=NP Reduce HAMILTONICITY to #CYCLE: Given G, to construct G’ such that #CYCLE(G’) is “large” iff G has a Hamiltonian cycle Replace each edge in G by a gadget such that each cycle in G becomes “many” cycles in G’ Longer the cycle in G, more the cycles in G’ it results in 7

  38. #CYCLE ∈ FP ⇒ P=NP Reduce HAMILTONICITY to #CYCLE: Given G, to construct G’ such that #CYCLE(G’) is “large” iff G has a Hamiltonian cycle Replace each edge in G by a gadget such that each cycle in G becomes “many” cycles in G’ Longer the cycle in G, more the cycles in G’ it results in A single n-long cycle in G will result in more cycles in G’ than produced by all shorter cycles in G put together 7

  39. #CYCLE ∈ FP ⇒ P=NP Reduce HAMILTONICITY to #CYCLE: Given G, to construct G’ such that #CYCLE(G’) is “large” iff G has a Hamiltonian cycle Replace each edge in G by a gadget such that each cycle in G becomes “many” cycles in G’ Longer the cycle in G, more the cycles in G’ it results in A single n-long cycle in G will result in more cycles in G’ than produced by all shorter cycles in G put together At most n n-1 shorter cycles in G 7

  40. #CYCLE ∈ FP ⇒ P=NP Reduce HAMILTONICITY to #CYCLE: Given G, to construct G’ such that #CYCLE(G’) is “large” iff G has a Hamiltonian cycle Replace each edge in G by a gadget such that each cycle in G becomes “many” cycles in G’ Longer the cycle in G, more the cycles in G’ it results in A single n-long cycle in G will result in more cycles in G’ than produced by all shorter cycles in G put together At most n n-1 shorter cycles in G t-long cycle in G → (2 m ) t = n nt cycles in G’ (m := n log n) 7

  41. #CYCLE ∈ FP ⇒ P=NP Reduce HAMILTONICITY to #CYCLE: Given G, to construct G’ such that #CYCLE(G’) is “large” iff G has a Hamiltonian cycle Replace each edge in G by a gadget such that each cycle in G becomes “many” cycles in G’ Longer the cycle in G, more the cycles in G’ it results in A single n-long cycle in G will result in more cycles in G’ than produced by all shorter cycles in G put together At most n n-1 shorter cycles in G t-long cycle in G → (2 m ) t = n nt cycles in G’ (m := n log n) HAMILTONICITY(G) ⇔ #CYCLES(G) ≥ n n^2 7

  42. #P vs. PP 8

  43. #P vs. PP Recall PP: x in L if for at least half the strings w (of some length) we have R(x,w)=1 8

  44. #P vs. PP Recall PP: x in L if for at least half the strings w (of some length) we have R(x,w)=1 i.e., checking the most significant bits of #R 8

  45. #P vs. PP Recall PP: x in L if for at least half the strings w (of some length) we have R(x,w)=1 i.e., checking the most significant bits of #R Recall: We already saw NP ⊆ PP 8

  46. #P vs. PP Recall PP: x in L if for at least half the strings w (of some length) we have R(x,w)=1 i.e., checking the most significant bits of #R Recall: We already saw NP ⊆ PP PP as powerful as #P (and vice versa) 8

  47. #P vs. PP Recall PP: x in L if for at least half the strings w (of some length) we have R(x,w)=1 i.e., checking the most significant bits of #R Recall: We already saw NP ⊆ PP PP as powerful as #P (and vice versa) #P ⊆ FP PP [exercise] (and PP ⊆ P #P [why?]) 8

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend