CS5230 Question 1. (12 marks) (a) NTIME(5n 2) is a proper subset

CS5230
Question 1. (12 marks)
(a) N T IM E(5n2 ) is a proper subset of DSP ACE(2(n
5 +6)
).
Answer: True
Justification:
5 +6)
N T IM E(5n2 ) ⊆ N SP ACE(5n2 ) ⊆ DSP ACE(25n4 ) ⊂ DSP ACE(2(n
), where
N T IM E(5n2 ) ⊆ N SP ACE(5n2 ) by definition
N SP ACE(5n2 ) ⊆ DSP ACE(25n4 ) by Savitch’s theorem
5
DSP ACE(25n4 ) ⊂ DSP ACE(2(n +6) ) by space hierarchy theorem as limn→∞
5
and both 2(n +6) and 25n4 are fully space constructible.
25n4
5
2(n +6)
= 0,
(b)
For every recursive f (n) ≥ n5 + 7, DSP ACE(f (n)) is a proper subset of DT IM E(2f (n)∗f (n) ).
Answer: False
Justification: By gap theorem, there exists a recursive increasing function g(n) ≥ n + 1 such
5
5
that DT IM E(g(n)) = DT IM E(g(n) ∗ (n5 + 7)(2g(n)∗(n +7)∗g(n)∗(n +7) ).
Let f (n) = g(n) ∗ (n5 + 7).
Thus, DT IM E(g(n)) ⊆ DT IM E(f (n)) ⊆ DSP ACE(f (n)) ⊆
DT IM E(2f (n)∗f (n) ) ⊆ DT IM E(f (n)2f (n)∗f (n) ) = DT IM E(g(n)).
Thus, the statement of part (b) does not hold for above f (n).
S
c>0
DT IM E(cf (n) ) ⊆
CS5230
Student No.
(c) DSP ACE(100 log log log log(n + 500)) is a proper subset of DSP ACE(2 log log log(n + 500)).
Answer: False.
Justification:
DSP ACE(0) ⊆ DSP ACE(100 log log log log(n+500)) ⊆ DSP ACE(2 log log log(n+500)) ⊆
DSP ACE(log log log(n + 500)) = DSP ACE(0),
where the last equality was done in class, as, for all c > 0, for large enough n, log log log(n +
500) is smaller than c log log n.
2
CS5230
Student No.
Question 2. (8 marks)
Show that DT IM E(3 + nblog(n + 1)c) is a proper subset of DT IM E(3 + n(dlog(n + 1)e)2 ).
Proof: Clearly, DT IM E(3 + nblog(n + 1)c) ⊆ DT IM E(3 + n(dlog(n + 1)e)2 ).
Suppose by way of contradiction that DT IM E(3+n(dlog(n+1)e)2 ) ⊆ DT IM E(3+nblog(n+
1)c).
Then, (using linear speedup theorem)
DT IM E(n(dlog(n + 1)e)2 ) ⊆ DT IM E(nblog(n + 1)c)
(1)
In the following, for ease of notation we ignore additive and multiplicative constants in formula, which is ok due to the linear speed up theorem.
Using f1 (n) = 2n in (1) by translation lemma we get
DT IM E(2n (dlog(2n + 1)e)2 ) ⊆ DT IM E(2n blog(2n + 1)c) or
DT IM E(2n n2 ) ⊆ DT IM E(2n n).
(2)
Using f2 (n) = 2n n in (1) by translation lemma we get
DT IM E(2n n(log(2n n + 1))2 ) ⊆ DT IM E(2n n log(2n n + 1)).
Thus, DT IM E(2n n3 ) ⊆ DT IM E(2n n2 ), by linear speed up theorem.
(3)
From (2) and (3), we have
DT IM E(2n n3 ) ⊆ DT IM E(2n n),
which contradicts time hierarchy theorem as limn→∞
2n n(n+log n)
2n n3
= 0.
Here note that 2n n3 , 2n n, 2n n, 2n n2 , nblog(n+1)c, n(dlog(n+1))2 e are fully time constructible.
3
Question 3. (10 marks) Consider the following problem.
INSTANCE: A set V of variables and a collection C of clauses over V , where each
clause has exactly three positive literals.
(That is, we are not allowed to use negation of variables. Thus, each clause is of the
form “(a or b or c)”, where a, b, c are variables in V and a 6= b, a 6= c, b 6= c.)
QUESTION: Is there a truth assignment to the variables such that each clause has
at least one true variable and at least one false variable?
Show that the above problem is NP-complete.
Proof: The above problem is in NP, as one can guess a truth assignment to the variables,
and then check that each clause has at least one true and one false literal. This can clearly be
done in polynomial time.
To see NP-hardness, reduce NAESAT to the above problem (call it POSSAT) as follows.
For an instance (V, C) of NAESAT, form an instance (V 0 , C 0 ) of POSSAT as follows.
Suppose V = {x1 , x2 , . . . , xn }, and C has m clauses.
Then, let V 0 = {ui , vi : 1 ≤ i ≤ n} ∪ {ai , bi , ci : 1 ≤ i ≤ m}.
Suppose the clauses in C are cj = (`j,1 , `j,2 , `j,3 ), for 1 ≤ j ≤ m.
Let c0j = (`0j,1 , `0j,2 , `0j,3 ), where `0j,k = ui , if `j,k = xi and `0j,k = vi , if `j,k = ¬xi .
Let C 0 = {(ui , vi , ai ), (ui , vi , bi ), (ui , vi , ci ), (ai , bi , ci ) : 1 ≤ i ≤ n} ∪ {c0i : 1 ≤ i ≤ m}.
Intuitively, ui being true indicates that xi is true and vi being true indicates that xi is false.
Now suppose (V, C) ∈ N AESAT . Then, assign ui to be true iff xi is true, and vi to be true
iff xi is false. This makes sure that in each c0j , at least one of the variables is true and at least
one is false iff in the clause cj at least one of the literals is true and at least one of the literals is
false. Furthermore, by setting ai to be true and bi and ci to be false we see that all the cluases
of the form (ui , vi , ai ), (ui , vi , bi ), (ui , vi , ci ), (ai , bi , ci ), have at least one true variable and at least
one false variable.
Now suppose (V 0 , C 0 ) ∈ P OSSAT . Then, note that, for 1 ≤ i ≤ n, exactly one of ui , vi is
true and other false (otherwise, ai , bi , ci take the same truth value, which does not satisfy the
requirement of (ai , bi , ci ) having at least one true and at least one false variable). Now, setting
xi to be true iff ui is true (and thus vi is false) shows that (V, C) ∈ N AESAT . To see this note
0
0
that in c0j at least one variable (say lj,k
) is true and at least one variable (say lj,k
0 ) is false. Then
literal lj,k is true and lj,k0 is false in cj . Thus, (V, C) ∈ N AESAT .
4