Computational Complexity Theory

Computational Complexity Theory
Slide Note
Embed
Share

Limits of diagonalization in proving P vs. NP, introduction to Oracle Turing Machines, important insights on deterministic and nondeterministic complexity, relativizing results, and the Baker-Gill-Solovay theorem.

  • Computational Complexity
  • Theory
  • Relativization
  • Oracle Turing Machines
  • Baker-Gill-Solovay

Uploaded on Feb 21, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Computational Complexity Theory Lecture 7: Relativization (contd.); Space complexity Indian Institute of Science

  2. Recap: Limits of diagonalization Like in the proof of P EXP, can we use diagonalization to show P NP ? The answer is No, if one insists on using only the two features of diagonalization.

  3. Recap: Oracle Turing Machines Like in the proof of P EXP, can we use diagonalization to show P NP ? The answer is No, if one insists on using only the two features of diagonalization. Definition: Let L {0,1}* be a language. An oracle TM ML is a TM with a special query tape and three special states qquery, qyes and qno such that whenever the machine enters the qquery state, it immediately transits to qyes or qno depending on whether the string in the query tape belongs to L. (ML has oracle access to L)

  4. Recap: Oracle Turing Machines Like in the proof of P EXP, can we use diagonalization to show P NP ? The answer is No, if one insists on using only the two features of diagonalization. Important (deterministic/nondeterministic) have the same two features used in diagonalization: For any fixed L {0,1}*, 1. There s an efficient universal TM with oracle access to L, 2. Every ML has infinitely many representations. note: Oracle TMs

  5. Recap: Relativizing results Like in the proof of P EXP, can we use diagonalization to show P NP ? The answer is No, if one insists on using only the two features of diagonalization. Observation: Let L {0,1}* be an arbitrarily fixed language. Owing to the Importantnote , the proof of P EXP can be easily adapted to prove PL EXPL by working with TMs with oracle access to L. We say that the P EXP result relativizes.

  6. Recap: Relativizing results Like in the proof of P EXP, can we use diagonalization to show P NP ? The answer is No, if one insists on using only the two features of diagonalization. Is is true that - either PL = NPL for every L {0,1}*, - or PL NPL for every L {0,1}* ? Theorem (Baker-Gill-Solovay): The answer is No. Any proof of P = NP or P NP must not relativize.

  7. Recap: Baker-Gill-Solovay theorem Theorem: There exist languages A and B such that PA = NPA but PB NPB. Proof: Let A = {(M, x,1m): M accepts x in 2m steps}. A is an EXP-complete language under poly-time Karp reduction. Then, PA = EXP. Also, NPA = EXP. Hence PA = NPA.

  8. Recap: Baker-Gill-Solovay theorem Theorem: There exist languages A and B such that PA = NPA but PB NPB. Proof: For any language B let LB = {1n : there s a string of length in B}. Observe, LB NPB for any B. (Guess the string, check if it has length n, and ask oracle B to verify membership.)

  9. Recap: Baker-Gill-Solovay theorem Theorem: There exist languages A and B such that PA = NPA but PB NPB. Proof: For any language B let LB = {1n : there s a string of length in B}. Observe, LB NPB for any B. We ll construct B (using diagonalization) in such a way that LB PB, implying PB NPB.

  10. Constructing B We ll construct B in stages, starting from Stage 1. Each stage determines the status of finitely many strings. In Stage i, we ll ensure that the oracle TM MiBdoesn t decide 1n correctly (for some n) within 2n/10 steps. Moreover, n will grow monotonically with stages.

  11. Constructing B We ll construct B in stages, starting from Stage 1. Each stage determines the status of finitely many strings. In Stage i, we ll ensure that the oracle TM MiBdoesn t decide 1n correctly (for some n) within 2n/10 steps. Moreover, n will grow monotonically with stages. The machine with oracle access to B that is represented by i whether or not a string belongs to B

  12. Constructing B We ll construct B in stages, starting from Stage 1. Each stage determines the status of finitely many strings. In Stage i, we ll ensure that the oracle TM MiBdoesn t decide 1n correctly (for some n) within 2n/10 steps. Moreover, n will grow monotonically with stages. Clearly, a B satisfying the above implies LB PB. Why?

  13. Constructing B We ll construct B in stages, starting from Stage 1. Each stage determines the status of finitely many strings. In Stage i, we ll ensure that the oracle TM MiBdoesn t decide 1n correctly (for some n) within 2n/10 steps. Moreover, n will grow monotonically with stages. Stage i: Choose n larger than the length of any string whose status has already been decided. Simulate MiB on input 1n for 2n/10 steps.

  14. Constructing B We ll construct B in stages, starting from Stage 1. Each stage determines the status of finitely many strings. In Stage i, we ll ensure that the oracle TM MiBdoesn t decide 1n correctly (for some n) within 2n/10 steps. Stage i: If MiB queries oracle B with a string whose status has already been decided, answer consistently. If MiB queries oracle B with a string whose status has not been decided yet, answer No .

  15. Constructing B We ll construct B in stages, starting from Stage 1. Each stage determines the status of finitely many strings. In Stage i, we ll ensure that the oracle TM MiBdoesn t decide 1n correctly (for some n) within 2n/10 steps. Stage i: If MiB outputs 1 within 2n/10 steps then don t put any string of length n in B. If MiB outputs 0 or doesn t halt, put a string of length n in B. (This is possible as the status of at most 2n/10 many length n strings have been decided during the simulation)

  16. Constructing B We ll construct B in stages, starting from Stage 1. Each stage determines the status of finitely many strings. In Stage i, we ll ensure that the oracle TM MiBdoesn t decide 1n correctly (for some n) within 2n/10 steps. Homework: In fact, we can assume that B EXP.

  17. Space Complexity

  18. Space bounded computation Here, we are interested to find out how much of work space is required to solve a problem. For convenience, think of TMs with a separate input tape and one or more work tapes. Work space is the number of cells in the work tapes of a TM M visited by M s heads during a computation.

  19. Space bounded computation Here, we are interested to find out how much of work space is required to solve a problem. For convenience, think of TMs with a separate input tape and one or more work tapes. Work space is the number of cells in the work tapes of a TM M visited by M s heads during a computation. Definition. Let S: N is in DSPACE(S(n)) if there s a TM M that decides L using O(S(n)) work space on inputs of length n. N be a function. A language L

  20. Space bounded computation Here, we are interested to find out how much of work space is required to solve a problem. For convenience, think of TMs with a separate input tape and one or more work tapes. Work space is the number of cells in the work tapes of a TM M visited by M s heads during a computation. Definition. Let S: N is in NSPACE(S(n)) if there s a NTM M that decides L using O(S(n)) work space on inputs of length n, regardless of M s nondeterministic choices. N be a function. A language L

  21. Space bounded computation Here, we are interested to find out how much of work space is required to solve a problem. For convenience, think of TMs with a separate input tape and one or more work tapes. Work space is the number of cells in the work tapes of a TM M visited by M s heads during a computation. We ll simply refer to workspace as space . For convenience, assume there s a single work tape.

  22. Space bounded computation Here, we are interested to find out how much of work space is required to solve a problem. For convenience, think of TMs with a separate input tape and one or more work tapes. Work space is the number of cells in the work tapes of a TM M visited by M s heads during a computation. Definition. Let S: N constructible if there s a TM that computes S(|x|) from x using O(S(|x|)) space. N be a function. S is space

  23. Relation between time and space Obs. DTIME(S(n)) DSPACE(S(n)) NSPACE(S(n)). Theorem. NSPACE(S(n)) DTIME(2O(S(n))), if S is space constructible. Proof. Uses the notion of configuration graph of a TM. We ll see this shortly.

  24. Relation between time and space Obs. DTIME(S(n)) DSPACE(S(n)) NSPACE(S(n)). Theorem. NSPACE(S(n)) DTIME(2O(S(n))), if S is space constructible. Definition. L = DSPACE(log n) NL = NSPACE(log n) PSPACE = DSPACE(nc) c > 0

  25. Relation between time and space Obs. DTIME(S(n)) DSPACE(S(n)) NSPACE(S(n)). Theorem. NSPACE(S(n)) DTIME(2O(S(n))), if S is space constructible. Definition. L = DSPACE(log n) NL = NSPACE(log n) PSPACE = DSPACE(nc) c > 0 Giving space at least log n gives a TM at least the power to remember the index of a cell.

  26. Relation between time and space Obs. DTIME(S(n)) DSPACE(S(n)) NSPACE(S(n)). Theorem. NSPACE(S(n)) DTIME(2O(S(n))), if S is space constructible. Theorem. L NL P NP PSPACE EXP Run through all certificate choices of the verifier and reuse space.

  27. Relation between time and space Obs. DTIME(S(n)) DSPACE(S(n)) NSPACE(S(n)). Theorem. NSPACE(S(n)) DTIME(2O(S(n))), if S is space constructible. EXP PSPACE NP co-NP P NL L

  28. Configuration graph Definition. A configuration of a TM M on input x, at any particular step of its execution, consists of (a) the nonblank symbols of its work tapes, (b) the current state, (c) the current head positions. It captures a snapshot of M at any particular moment of execution.

  29. Configuration graph Definition. A configuration of a TM M on input x, at any particular step of its execution, consists of (a) the nonblank symbols of its work tapes, (b) the current state, (c) the current head positions. It captures a snapshot of M at any particular moment of execution. Input head index Work tape head index b1 bS(n) State info A Configuration C Content of work tape

  30. Configuration graph Definition. A configuration of a TM M on input x, at any particular step of its execution, consists of (a) the nonblank symbols of its work tapes, (b) the current state, (c) the current head positions. It captures a snapshot of M at any particular moment of execution. Input head index Work tape head index b1 bS(n) State info Note: A configuration C can be represented using O(S(n)) bits if M uses S(n) log n space on n-bit inputs.

  31. Configuration graph Definition. A configurationgraph of a TM M on input x, denoted GM,x, is a directed graph whose nodes are all the possible configurations of M on input x. There s an edge from one configuration C1 to another C2, if C2 can be reached from C1 by an application of M s transition function(s).

  32. Configuration graph Definition. A configurationgraph of a TM M on input x, denoted GM,x, is a directed graph whose nodes are all the possible configurations of M on input x. There s an edge from one configuration C1 to another C2, if C2 can be reached from C1 by an application of M s transition function(s). Number of nodes in GM,x = 2O(S(n)), if M uses S(n) space on n-bit inputs

  33. Configuration graph Definition. A configurationgraph of a TM M on input x, denoted GM,x, is a directed graph whose nodes are all the possible configurations of M on input x. There s an edge from one configuration C1 to another C2, if C2 can be reached from C1 by an application of M s transition function(s). If M is a DTM then every node C in GM,x has at most one outgoing edge. If M is an NTM then every node C in GM,x has at most two outgoing edges.

  34. Configuration graph Definition. A configurationgraph of a TM M on input x, denoted GM,x, is a directed graph whose nodes are all the possible configurations of M on input x. There s an edge from one configuration C1 to another C2, if C2 can be reached from C1 by an application of M s transition function(s). C2 C2 1 1 C1 C1 0 C3 Conf. graph of a DTM Conf. graph of an NTM

  35. Configuration graph Definition. A configurationgraph of a TM M on input x, denoted GM,x, is a directed graph whose nodes are all the possible configurations of M on input x. There s an edge from one configuration C1 to another C2, if C2 can be reached from C1 by an application of M s transition function(s). By erasing the contents of the work tape at the end, bringing the head at the beginning, and having a qaccept state, we can assume that there s a unique Caccept configuration. Configuration Cstart is well defined.

  36. Configuration graph Definition. A configurationgraph of a TM M on input x, denoted GM,x, is a directed graph whose nodes are all the possible configurations of M on input x. There s an edge from one configuration C1 to another C2, if C2 can be reached from C1 by an application of M s transition function(s). M accepts x if and only if there s a path from Cstart to Caccept in GM,x.

  37. Relation between time and space Obs. DTIME(S(n)) DSPACE(S(n)) NSPACE(S(n)). Theorem. NSPACE(S(n)) DTIME(2O(S(n))), if S is space constructible. Proof. Let L NSPACE(S(n)) and M be an NTM deciding L using S(n) space on length n inputs. On input x, compute the configuration graph GM,x of M and check if there s a path from Cstart to Caccept . Running time is 2O(S(n)).

  38. PATH: A canonical problem in NL PATH = {(G,s,t) : G is a directed graph having a path from s to t}. Obs. PATH is in NL. EXP PSPACE NP co-NP P NL PATH L

  39. PATH: A canonical problem in NL PATH = {(G,s,t) : G is a directed graph having a path from s to t}. Obs. PATH is in NL. Proof. Count the no. of vertices in G, let it be n. Set aside two memory locations of log n bits each. Initialize a counter, say Count = n. Initialize to s Count = n log n log n

  40. PATH: A canonical problem in NL PATH = {(G,s,t) : G is a directed graph having a path from s to t}. Obs. PATH is in NL. Proof. Count the no. of vertices in G, let it be n. Set aside two memory locations of log n bits each. Initialize a counter, say Count = n. Initialize to s Guess a vertex v1 Count = n If there s a edge from s to v1, decrease count by 1. Else o/p 0 and stop.

  41. PATH: A canonical problem in NL PATH = {(G,s,t) : G is a directed graph having a path from s to t}. Obs. PATH is in NL. Proof. Count the no. of vertices in G, let it be n. Set aside two memory locations of log n bits each. Initialize a counter, say Count = n. Set to v1 Guess a vertex v2 Count = n-1 If there s a edge from v1 to v2, decrease count by 1. Else o/p 0 and stop.

  42. PATH: A canonical problem in NL PATH = {(G,s,t) : G is a directed graph having a path from s to t}. Obs. PATH is in NL. Proof. Count the no. of vertices in G, let it be n. Set aside two memory locations of log n bits each. Initialize a counter, say Count = n. Set to v2 Guess a vertex v3 Count = n-2 If there s a edge from v2 to v3, decrease count by 1. Else o/p 0 and stop. and so on.

  43. PATH: A canonical problem in NL PATH = {(G,s,t) : G is a directed graph having a path from s to t}. Obs. PATH is in NL. Proof. Count the no. of vertices in G, let it be n. Set aside two memory locations of log n bits each. Initialize a counter, say Count = n. Set to vn-1 Set to t Count = 1 If there s a edge from vn-1 to t, o/p 1 and stop. Else o/p 0 and stop.

  44. PATH: A canonical problem in NL PATH = {(G,s,t) : G is a directed graph having a path from s to t}. Obs. PATH is in NL. Proof. Count the no. of vertices in G, let it be n. Set aside two memory locations of log n bits each. Initialize a counter, say Count = n. Set to vn-1 Set to t Count = 1 If there s a edge from vn-1 to t, o/p 1 and stop. Else o/p 0 and stop. Space complexity = O(log n)

  45. UPATH: A problem in L UPATH = {(G,s,t) : G is an undirected graph having a path from s to t}. Theorem (Reingold). UPATH is in L. EXP PSPACE NP co-NP P NL UPATH L

  46. UPATH: A problem in L UPATH = {(G,s,t) : G is an undirected graph having a path from s to t}. Theorem (Reingold). UPATH is in L. EXP PSPACE Is PATH in L ? more on this later. NP co-NP P NL UPATH L

  47. PSPACE = NPSPACE

  48. Savitchs theorem Theorem. NSPACE(S(n)) DSPACE(S(n)2), where S(n) is space constructible. (So, PSPACE = NPSPACE) Proof. Let L NSPACE(S(n)), and M be an NTM requiring S(n) space to decide L. We ll now show that there s a TM N requiring O(S(n)2) space to decide L.

  49. Savitchs theorem Theorem. NSPACE(S(n)) DSPACE(S(n)2), where S(n) is space constructible. (So, PSPACE = NPSPACE) Proof. Let L NSPACE(S(n)), and M be an NTM requiring S(n) space to decide L. We ll now show that there s a TM N requiring O(S(n)2) space to decide L. On input x, N checks if there s a path from Cstart to Caccept in GM,x as follows: Let |x| = n.

  50. Savitchs theorem Theorem. NSPACE(S(n)) DSPACE(S(n)2), where S(n) is space constructible. (So, PSPACE = NPSPACE) Proof. N computes 2.S(n) + c, the no. of bits required to represent a configuration of M. It also finds out Cstart and Caccept. Then N checks if there s a path from Cstart to Caccept of length at most 22.S(n)+c in GM,x recursively using the following procedure. REACH(C1, C2, i) : returns 1 if there s a path from C1 to C2 of length at most 2i in GM,x; 0 otherwise.

More Related Content