Presentation is loading. Please wait.

Presentation is loading. Please wait.

Peter van Emde Boas: Games and Complexity Guangzhou 2009 Complexity, Speed-up and Compression Games and Complexity Peter van Emde Boas Guangzhou 2009 ©

Similar presentations


Presentation on theme: "Peter van Emde Boas: Games and Complexity Guangzhou 2009 Complexity, Speed-up and Compression Games and Complexity Peter van Emde Boas Guangzhou 2009 ©"— Presentation transcript:

1 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Complexity, Speed-up and Compression Games and Complexity Peter van Emde Boas Guangzhou 2009 © Games Workshop

2 Peter van Emde Boas: Games and Complexity Guangzhou 2009 When is More Better ? More time or space will allow you to compute more This is not always true –Constant factor speed-up –Non Constructible time/space bounds: Gap theorems. Compression theorems for constructible bounds

3 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Constant Factor Speed-up for Turing Machine A Turing Machine Alphabet is easily compressed by coding k symbols in one symbol of a larger alphabet:  k --->  ’  ’ =  3

4 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Constant Factor Speed-up This yields automatic constant factor speed-up in space: Space( S(n) ) = Space( S(n)/k ) Snags: Input is not compressed! This may require additional steps and another worktape. It shows space speed-up for single tape model only for  (n) bounds. (superlinear growth) And what about Time?

5 Peter van Emde Boas: Games and Complexity Guangzhou 2009 The k for 6 solution PREPARE COMPUTE & UPDATE Snags: you must compress the alphabet 6 times more dense than you expected. Input must be preprocessed so it works only nice for time t(n) =  (n) (even  (n 2 ) in single tape model)

6 Peter van Emde Boas: Games and Complexity Guangzhou 2009 The direct solution Finite Control Encode two blocks in finite control simulator Turing Machine. Externally scan the block adjacent to the block scanned internally Now one can allways simulate k steps for 1 step and still preserve the above invariant after every step.

7 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Move Left Finite Control Finite Control

8 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Move Right Finite Control Finite Control

9 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Time speed-up THEOREM: Time( t(n) ) = Time( t(n)/ k ) for fixed k, as long as t(n)/k > (1+  ).n Doesn’t work for single tape model; there the input compression already requires time  (n 2 ) So in order that Time( t(n) )  Time( G(t(n)) ) it is necessary that G(m) =  (m) This is however not sufficient ≠

10 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Borodin-Trakhtenbrot Gap Theorem For every G(m) > m one can invent a pathological timebound u(n) such that Time(u(n)) = Time(G(u(n))) u(m) := min{ k | no machine computation M i (x) with |x| = m and i  m has a runtime T i (x) with k  T i (x) < G(k) } This is well defined; there are at most m.c m runtimes which have to be excluded from the interval [ k, G(k) ) so sooner or later the sequence 0, G(0), G(G(0)),.... will provide us with an example.... It is also computable, since the condition on runtime is so

11 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Constructible Bounds t(n) is time constructible when some TM on input n (in binary) can initialize a binary counter with value t(n) in time < t(n) s(n) is space constructible when some TM on input x of length n can mark a block of s(n) tape cells without ever exceeding this block. Against constructible bounds effective diagonalization is possible

12 Peter van Emde Boas: Games and Complexity Guangzhou 2009 SPACE COMPRESSION Downward Diagonalization If S 1 (n) > log(n) is space constructible and S 2 (n) = o(S 1 (n)) then Space( S 2 (n) )  Space( S 1 (n) ) On input i # x : 1)mark S 1 (|i#x|) tape cells 2)simulate M i ( i#x ) within this block if simulation leaves the block accept if simulation cycles accept - counting OK since S 1 (n) > log(n) 3)if simulation terminates do the opposite: if accept reject and accept otherwise ≠

13 Peter van Emde Boas: Games and Complexity Guangzhou 2009 SPACE COMPRESSION Downward Diagonalization This program runs in space S 1 (n) by construction The result can’t be computed by any device in space S 2 (n). Assume M j does it then on input j#x for x sufficiently large, cases 1 and 2 won’t occur and therefore M j ( j#x ) accepts iff it rejects..... CONTRADICTION !

14 Peter van Emde Boas: Games and Complexity Guangzhou 2009 TIME COMPRESSION Downward Diagonalization A similar result for Time Compression is affected by the overhead required for maintaining the counter ticking down from T 1 (n) to 0. If we assume that this overhead is logarithmic the result becomes: If T 1 (n) > n is time constructible and T 2 (n) = o(T 1 (n)) then Time( T 2 (n) )  Time( T 1 (n).log(T 1 (n)) ) ≠

15 Peter van Emde Boas: Games and Complexity Guangzhou 2009 TIME COMPRESSION Downward Diagonalization Improvements: Add an extra tape. Storing the clock on it makes the overhead vanish..... At least two tapes: Divide clock in head and tail and move the head only when the tail underflows. This reduces overhead to loglog(n); the trick extends yielding log*(n) overhead (W. Paul) Use distributed super redundant clock; overhead vanishes (Fürer 1982)

16 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Head and Tail Construction k-bit clock tail head log(k) After k moves the head is at distance at most k Using the second tape the tail can be moved in time O(k)

17 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Compression in General The diagonalization argument is generic; the minimal overhead determining the size of the separation gaps is machine dependent. Extends to the world of nondeterministic computation; proof become rather complex. (Seiferas et al. for TM time measure) For the RAM world diagonalization results are similar; Constant factor speed-up is problematic.

18 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Constructibility ? Reasonable bounds turn out to be constructible: –polynomials, –simple exponentials, –polylog functions –closed under sum & product –not closed under difference!

19 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Constructibility ? Many Theorems are proven assuming constructibility of bounds Some theorems extend to general case, using trick of incremental resources –Savitch Theorem –Hopcroft, Paul, Valiant Theorem –resulting bounds are weak (terminating computations only)

20 Peter van Emde Boas: Games and Complexity Guangzhou 2009 Incremental resource trick First try to perform the task within resource K If this fails replace K by 2K and try again Repeat this until task is completed; at that time you will have allocated at most 2 * the amount of resources required for the task (unless K initially is to big...) This works if Task indeed can be completed. Otherwise you will add resources forever, and the process will diverge....


Download ppt "Peter van Emde Boas: Games and Complexity Guangzhou 2009 Complexity, Speed-up and Compression Games and Complexity Peter van Emde Boas Guangzhou 2009 ©"

Similar presentations


Ads by Google