Presentation is loading. Please wait.

Presentation is loading. Please wait.

HIERARCHY THEOREMS Hu Rui Prof. Takahashi laboratory

Similar presentations


Presentation on theme: "HIERARCHY THEOREMS Hu Rui Prof. Takahashi laboratory"— Presentation transcript:

1 HIERARCHY THEOREMS Hu Rui Prof. Takahashi laboratory

2 HIERARCHY THEOREMS TM should be able to decide more languages in time n3 than it in time n2? Giving a TM more time or space will increase the class of problems that it can solve? The Hierarchy Theorems proves that the classes with larger bounds contain more languages 最后一点补充 ”under certain conditions”

3 HIERARCHY THEOREMS Space Hierarchy Time Hierarchy
Exponential Space Completeness

4 Space Hierarchy Definition 9.1
A function , where f(n) is at least , is called space constructible if the function that maps the string 1n to the binary representation of f(n) is computable in time In other words, when TM M started on input 1n, if it halts with the binary representation of f(n) on its tape within space, f is space constructible Fractional functions such as and are rounded down to the next lower integer for the purposes of time and space constructibility.

5 Space Hierarchy Definition 9.1
A function , where f(n) is at least , is called space constructible if the function that maps the string 1n to the binary representation of f(n) is computable in time To prove a function is space constructible: ( n2 for example) Obviously, n2 match the condition “at least O(log n)” Take its input 1n , obtain n in binary by counting the number of 1s Output n2 by multiplying n by itself The total space used is O(n), of course is O(n2 ) All commonly occurring functions that are at least are time constructible, including the functions

6 Space Hierarchy THEOREM 9.3 Space Hierarchy Theorem PROOF IDEA:
For any space constructible function , a language A exists that is decidable in space but not in space. PROOF IDEA: Language A should has two properties. The first is that A is decidable in space. The second is that A isn’t decidable in space. Design a TM D decides A. TM D runs in space. Thereby, it ensures the first property. Meanwhile, TM D must guarantees that A is different from any language that is decidable in space. Thereby, it ensures the second property O(f(n)) o(f(n))

7 Space Hierarchy Design TM D: TM M is a TM that decides a language in .
TM D takes the description of TM M as its input D runs M on the same input <M> within the space bound f(n) If M halts within space bound f(n), D accepts iff M rejects If M doesn’t halt, D rejects

8 Space Hierarchy THREE Important Details
When M runs in space, it may use more than f(n) space for a small n, D might not have enough space to run M. Hence D will miss its one opportunity to avoid M’s language. Solution: Change input <M> to the form <M>10*. D will always have enough space to run M to completion on input <M>10k for some large value of k. 解释当n小的时候

9 Space Hierarchy THREE Important Details
M may get into an infinite loop. Solution: Any machine that runs in space uses only time at most. If this count ever exceeds , then D rejects.

10 Space Hierarchy THREE Important Details
The simulated TM M has an arbitrary tape alphabet but D has a fixed tape alphabet. How dose D present alphabet of M? Solution: Represent each cell of M’s tape with several cells on D’s tape. So, if M runs in g(n) space, then D uses dg(n) space to simulate M for some constant d that depends on M. 在黑板上写出用少数个符号表示多个符号的例子。

11 Space Hierarchy PROOF The following space TM D decides a language A that is not decidable in space. D= On input : Let n be the length of Compute f(n) using space constructability, and mark off this much tape. If later stages ever attempt to use more, reject If is not of the form <M>10* for some TM M, reject Simulate M on while counting the number of steps used in the simulation. If the count ever exceeds , reject If M accepts, D rejects. If M rejects, D accepts

12 Space Hierarchy PROOF The following space TM D decides a language A that is not decidable in space. D= “On input : Let n be the length of Compute f(n) using space constructability, and mark off this much tape. If later stages ever attempt to use more, reject If is not of the form <M>10* for some TM M, reject Simulate M on while counting the number of steps used in the simulation. If the count ever exceeds , reject If M accepts, reject. If M rejects, accept A is the language that D decides. So, A is decidable in space Proof by contradiction: Assume to the contrary that some TM M decides A in space g(n), g(n)= D can simulate M, using space dg(n) for some constant d. For g(n)= , some constant n0 exists, where dg(n)<f(n) for all n>n0. D will have enough space to simulate M. D will do the opposite of M on the same input. So M doesn’t decide A, which contradicts the assumption in i

13 Space hierarchy theorem is proved !
Conclusion: A is not decidable in space Space hierarchy theorem is proved ! THEOREM Space Hierarchy Theorem For any space constructible function , a language A exists that is decidable in space but not in space.

14 Space Hierarchy COROLLARY 9.4 PROOF: ∵ ∴ for any , we must have
For any two functions , where is and is space constructible, PROOF: ∴ for any , we must have ∵ is space constructible. From SPACE HIERARCHY THEOREM ∴ Such language A exits. A is decidable in space ,but not in space even more impossible to be decidable in 解释一下集合符号相等 定义一下结论的意思 推理一下第一个所以符号

15 Space Hierarchy EXAMPLE
For any rational number c>0, nc is space constructible. For two rational number c1, c2, if 0≤ c1< c2 , So according to the COROLLARY 9.4, Furthermore For two real number ε1< ε2, there must be two rational numbers between them, like: ε1< c1< c2< ε2 So it is easy to find that: (Corollary 9.5)

16 This corollary demonstrates a fine hierarchy within the class PSPACE !
Space Hierarchy COROLLARY 9.5 For any two real numbers 0 ≤ ε1< ε2 This corollary demonstrates a fine hierarchy within the class PSPACE ! 解释一下为什么有一个好的层级,因为可以断定的说在多项式空间内,空间越大,能判定的语言就越多了 For example, we can make sure that O(n1.77) can decide at least one more language than O(n1.76)

17 Space Hierarchy COROLLARY 9.6
Space hierarchy theorem also can be used to separate two space complexity classes. COROLLARY 9.6 解释一下为什么有一个好的层级,因为可以断定的说在多项式空间内,空间越大,能判定的语言就越多了

18 Space Hierarchy COROLLARY 9.6 Review PROOF:
Savitch’s theorem shows that Space hierarchy theorem shows that : So we have: Corollary 9.6 is proved ! Review COROLLARY 9.6 Savitch’s theorem (in Chapter 8.1) For any function , where f(n)≥n,

19 Space Hierarchy COROLLARY 9.7 PROOF
Each of the classes SPACE(nk) is contained within the class SPACE(nlog n) SPACE(nlog n) is strictly contained within the class SPACE(2n) Therefore, PSPACE is separated from

20 HIERARCHY THEOREMS Space Hierarchy Time Hierarchy
Exponential Space Completeness

21 Time Hierarchy Definition 9.8
A function , where t(n) is at least , is called time constructible if the function that maps the string 1n to the binary representation of t(n) is computable in time In other words, if some time TM M started on input 1n, it always halts with the binary representation of t(n) on its tape, t is time constructible All common functions that are at least are time constructible, including the functions

22 Time Hierarchy THEOREM 9.10 Time hierarchy theorem O(t(n)) PROOF IDEA:
For any time constructible function , a language A exists that is decidable in time but not in time. PROOF IDEA: The proof is similar to the proof of Space Hierarchy Theorem (Theorem 9.3). We construct a TM D that decides a language A in time O(t(n)), whereby A cannot be decided in o(t(n)/log t(n)) time. Here, D takes an input ω of the form <M>10* and simulates M on input ω, making sure not to use more than t(n) time. If M halts within that much time, D give the opposite output. O(t(n)) o(t(n)) o(t(n)/log t(n))

23 Why there is a factor log t(n)?
Time Hierarchy For technical reasons, Time hierarchy theorem is slightly weaker than Space hierarchy theorem Why there is a factor log t(n)? The important difference in the proof concerns the cost of simulating M. For space complexity, the simulation introduced a constant factor overhead. For time complexity, the simulation introduces a logarithmic factor overhead. The larger overhead for time is the reason for the appearance of the 1/log t(n) factor

24 Time Hierarchy COROLLARY 9.11 PROOF: ∵ ∴ for any , we must have
For any two functions , where is and is space constructible, PROOF: ∴ for any , we must have ∵ is time constructible. From TIME HIERARCHY THEOREM ∴ Such language A exits. A is decidable in space ,but not in time even more impossible to be decidable in

25 This corollary demonstrates a fine hierarchy within the class P !
Time Hierarchy COROLLARY 9.12 For any two real numbers 1 ≤ ε1< ε2 This corollary demonstrates a fine hierarchy within the class P ! 解释一下为什么有一个好的层级,因为可以断定的说在多项式时间内,时间越多,能判定的语言就越多了

26 Time Hierarchy COROLLARY 9.13

27 HIERARCHY THEOREMS Space Hierarchy Time Hierarchy
Exponential Space Completeness

28 Exponential Space Completeness
Space Hierarchy and Time Hierarchy Theorems can be used to demonstrate a specific language is actually intractable. Steps: The Hierarchy Theorems tells that a TM can decide more languages in EXPSPACE than it can in PSPACE Show a particular language is complete for EXPSPACE Hence, it can’t be decided in polynomial time or even in polynomial space (Otherwise, PSPACE=EXPSPACE)

29 Exponential Space Completeness
Regular Expression Regular Expressions are built up from the atomic expression Φ, ε,and members of the alphabet ∑, by using the regular operations union, concatenation, and star, denoted ∪, ο, *, respectively. sigma

30 Exponential Space Completeness
Example Assume the alphabet ∑={0,1} 0*10*={ω| ω has exactly a single 1} ∑*1 ∑*={ω| ω has exactly at least a 1} ∑*001 ∑*={ω| ω contains the string 001 as a substring} (Usually, concatenation symbol ο is omitted) ∑ sigma

31 Exponential Space Completeness
Exponentiation Operation Note: “↑” is the symbol of exponentiation operation. Definition If R is a regular expression and k is a nonnegative integer, writing R↑k is equivalent to the concatenation of R with itself k times. Write Rk as shorthand for R ↑ k:

32 Exponential Space Completeness
Problem Definition ={<Q,R>| Q and R are equivalent regular expressions with exponentiation} To show that is intractable, it just needs to demonstrate that is complete for the class EXPSPACE. Any EXPSPACE-complete problem cannot be in PSPACE, much less in P. Otherwise EXPSPACE would equal PSPACE, contradicting Corollary 9.7

33 Exponential Space Completeness
DEFINITION 9.14 A language B is EXPSPACE-complete if B ∈ EXPSPACE Every A in EXPSPACE is polynomial time reducible to B

34 Exponential Space Completeness
THEOREM 9.15 is EXPSPACE-complete. PROOF IDEA Sketch an EXPSPACE algorithm to test whether two expressions in are equivalent Use repetition to eliminate exponentiation Convert the resulting expressions to NFAs. Use an NFA equivalence testing procedure (Example 8.4) Show a language A in EXPSPACE is polynomial time reducible to Utilize the technique of reductions via computation histories (Section 5.1) 解释一下NFA

35 Summary SPACE HIERARCHY COROLLARY9.5
For any two real numbers 0 ≤ ε1< ε2, Hierarchy within the class PSPACE COROLLARY9.6 Hierarchy between two space complexity classes COROLLARY9.7 Problems are decidable in principle but not in practice

36 Summary TIME HIERARCHY COROLLARY 9.12
Hierarchy within the class P COROLLARY 9.12 For any two real numbers 1 ≤ ε1< ε2 COROLLARY 9.13 Problems are decidable in principle but not in practice

37 Summary EXPONENTIAL SPACE COMPLETENESS THEOREM 9.15
is EXPSPACE-complete. Demonstrate a specific language is actually intractable.

38 THANK YOU !


Download ppt "HIERARCHY THEOREMS Hu Rui Prof. Takahashi laboratory"

Similar presentations


Ads by Google