Access over 20 million homework documents through the notebank

Get on-demand Q&A homework help from verified tutors

Read 1000s of rich book guides covering popular titles

Anonymous

I need https document questions answered. Lecture 14 is the study notes...................

COMP4141
Assignment 8
2020 Term 1
Due: Tuesday, 28th April, 17:00
Submission is through WebCMS/give and should be a single pdf file, maximum size 4Mb. Prose should
be typed, not handwritten. Use of LATEX is encouraged, but not required.
Discussion of assignment material with one other person is permitted, but the work submitted must be
your own in line with the University’s plagiarism policy.
Problem 1
An alternating finite automaton (AFA) is a tuple A = ( Q, Σ, l, δ, q0 , F ) where
(10 marks)
• Q is a finite set of states
• Σ is a finite input alphabet
• l : Q → {∃, ∀} is a labelling of the states
• δ ⊆ Q × Σ × Q is the transition relation
• q0 ∈ Q is the start state
• F ⊆ Q is the set of final states.
A word w is accepted from a state q if and only if:
• w = e and q ∈ F; or
• w = aw0 and
– if l (q) = ∃ then there exists q0 such that (q, a, q0 ) ∈ δ and w0 is accepted from q0 ; or
– if l (q) = ∀ then for all q0 such that (q, a, q0 ) ∈ δ we have w0 is accepted from q0 .
The language accepted by an AFA is defined to be the set of words accepted from q0 .
Show that the class of languages accepted by AFAs are precisely the regular languages.
Problem 2
Define ARE to be the class of languages accepted by Alternating Turing Machines.
(10 marks)
Prove or disprove: ARE = RE.
(10 marks)
Problem 3
(a) Show that if SAT ∈ BPP then SAT ∈ RP. Hint: Try to build a truth assignment using the fact that ϕ( x ) is
satisfiable if and only if ϕ(true) or ϕ(false) is satisfiable.
(6 marks)
(b) Show that if NP ⊆ BPP then RP = NP. Hint: Use (a)
1
(4 marks)
COMP4141 Theory of Computation
Lecture 14: The Polynomial Time Hierarchy
Paul Hunter
CSE, UNSW
Revision: 2015/05/13
(Credits: R. Van der Meyden, K. Engelhardt, M Sipser, C
Papadimitriou, R. van Glabbeek, P Hofner)
Outline
Relativization
Alternation
Polynomial Time Hierarchy
Outline
Relativization
Alternation
Polynomial Time Hierarchy
Relativization
Recall Lecture 8:
Definition
An oracle for a language B is an external device that can
determine whether a given word w is a member of B. An oracle
(for B) Turing Machine, M B , is a Turing machine that has the
additional capacity of querying an oracle for B.
If an oracle TM M B decides A then we say that A is decidable
relative to B.
Language A is Turing reducible to language B (or A T B) if A is
decidable relative to B.
P vs m vs T
A L B
)
A P B
)
A m B
)
A T B
As for the other two notions of reduction we have
Theorem
If A T B and B is decidable, then A is decidable.
Corollary
If A T B and A is undecidable, then B is undecidable.
but whereas m also transferred r.e. this is not the case for T .
Example
Recall that ATM is r.e. but ATM isn’t. But ATM T ATM and
ATM T ATM by simply reversing the oracles’ answers.
Oracle complexity classes
Definition
AB
S
For complexity classes A, B let
= L2B AL be the class of
languages decided by an A-computation using an oracle in B.
NB
We assume each call to an oracle takes O(1) time.
Example
PO is the class of languages decided by a polynomial-time oracle
TM using oracle O. (Similarly for NPO .)
NP ✓ PSAT and coNP ✓ PSAT .
Example
A formula of propositional logic is minimal if there does not exist
a shorter formula such that , is valid (true for all
assignments).
It is not known whether MIN-F 2 NP where
MIN-F = { h i |
is a minimal Boolean formula }
but MIN-F 2 NPSAT as witnessed by the oracle NTM
M SAT = “On input h i
1
Non-deterministically guess a smaller formula
2
Ask the oracle whether h¬( , )i 2 SAT and
if it accepts, reject; otherwise accept.”
.
This problem is not known to be in NP, nor in co-NP.
Relativization and Diagonalization
Any theorem proved about TMs by using only methods based on
I string representations of TMs
II simulation of one TM by another without much overhead in
time/space
lifts to oracle machines.
Examples
Undecidability of ATM :
{hM, xi : M is an oracle TM for B that accepts x} cannot be
decided by an oracle TM for B
Time/Space hierarchy theorems
?
P = NP and Diagonalization
?
That the resolution of P = NP can not be such a theorem follows
from:
Theorem (Baker, Gill, Solovay 1975)
Oracles A and B exist whereby PA = NPA and PB 6= NPB .
Proof of 9A PA = NPA
A could be QBF:
NPQBF ✓ NPSPACE
= PSPACE
✓ PQBF
✓ NPQBF
by QBF 2 PSPACE
by Savitch’s theorem
QBF is PSPACE-complete
by P ✓ NP
Proof of 9B PB 6= NPB
Iteratively construct a B (and its complement B 0 ) such that in the
end UB 2 NPB \ PB where
UB = { 1n | ⌃n \ B 6= ; } .
That UB 2 NPB is easy:
“On input 1n guess x 2 ⌃n and accept i↵ the oracle confirms
x 2 B.”
Proof of 9B PB 6= NPB cont.
Initially, B = B 0 = ;. For stage i of the construction, let Mi? be
the i’th polynomial-time oracle TM running in w.l.o.g. in time ni .
Let m exceed the length of all strings in B [ B 0 so far, and also
m i < 2m .
We’ll ensure that UB and MiB disagree on 1m .
1
2
Simulate Mi? on 1m by answering queries x to the oracle with
“yes” if x 2 B, “no” if x 2 B 0 , otherwise we also answer “no”
and add x to B 0 .
If Mi? accepts 1m then we put all strings of length m into B 0 ;
otherwise, we add the first string of length m neither in B nor
in B 0 to B. Such a string exists because Mi? can have queried
at most mi < 2m strings of length m and none were queried
ever before.
It follows that no MiB will decide UB and thus UB 2
/ PB .
Outline
Relativization
Alternation
Polynomial Time Hierarchy
Motivation
Recall
nondeterministic TM’s, accept if some branch of the
computation tree accepts (used for NP)
co-nondeterministic TM’s, accept if all branches of the
computation tree accepts (used for coNP)
Alternating Turing machines combine the two acceptance modes
into one type of machine ......
ATMs
Definition
An alternating Turing Machine (ATM)
M = (Q, `, ⌃, , , q0 , qaccept , qreject )
consists of:
Q, a finite set of states
` : Q ! {8, 9}, a labelling of states as universal or existential
⌃, the input symbol alphabet, t 2
/⌃
◆ ⌃, the tape symbol alphabet, t 2
:Q⇥
! 2Q⇥
⇥{l,r} ,
the transition function
q0 2 Q, the start state
qaccept 2 Q, the accept state
qreject 2 Q, the reject state
L(ATM)
An ATM M runs on a word w as if it were an NTM, creating a
tree TM (w ) of TM configurations (or a directed graph if we
identify nodes with identical configurations).
Definition (ATM acceptance)
Mark nodes of TM (w ), proceeding from leaves to the root, as
follows:
1
every (accepting) configuration xqaccept y is marked,
2
c is marked if `(c) = 9 and c has some marked successor in
TM (w ), and
3
c is marked if `(c) = 8 and c all successors in TM (w ) are
marked .
If the root of TM (w ) (the initial configuration) is marked at the
end of this process, then M accepts w .
Definitions of time and space complexity need not be changed.
Definition
Let t : N ! N.
The alternating time complexity class, ATIME(t(n)) is the
collection of all languages that are decidable by an O(t(n)) time
ATM.
The alternating space complexity class, ASPACE(t(n)) is the
collection of all languages that are decidable by an O(t(n)) space
ATM.
[
AP =
ATIME(nk )
k2N
[
APSPACE =
ASPACE(nk )
k2N
AL = ASPACE(log n)
Example
Recall that it is not know whether
MIN-F = { h i |
is a minimal Boolean formula }
is in NP or P. All we know so far is that MIN-F 2 NPSAT .
“On input h i:
1
Universally select a shorter formula
2
Existentially select an interpretation ⇡ of
3
Evaluate
4
Accept if the results di↵er and reject otherwise.”
and
.
on ⇡
proves that MIN-F 2 AP.
Time, Space, and Alternation
Theorem
(a)
(b)
1. ATIME(t(n)) ✓ SPACE(t(n)) ✓ ATIME(t(n)2 ) if t(n)
2. ASPACE(t(n)) = TIME(2O(t(n)) ) if t(n) log n.
Corollary
AL = P, AP = PSPACE, and APSPACE = EXPTIME.
n.
Proof Ideas
1.(a) ATIME(t(n)) ✓ SPACE(t(n)):
simulate the ATM, do DFS to do the marking.
This gives SPACE(t(n)2 ), one t(n) for the recursion depth and
one t(n) for the configuration size.
Reduce the latter to constant size by merely recording the choices
made at each non-deterministic step, and recomputing the
configuration from the start when backtracking.
Proof Ideas
1.(b) SPACE(t(n)) ✓ ATIME(t 2 (n)):
As in Savitch’s theorem, the ATM uses binary search to determine
whether the simulated TM could reach the accepting configuration
in 2dt(n) steps.
Rather than iterating over all possible midpoint configurations cm ,
the ATM can use one big existential guess of t(n) steps to
construct cm , (and then universally branch into two recursive calls).
Proof Ideas
2.(“✓”) ASPACE(t(n)) ✓ TIME(2O(t(n)) ):
similar to the proof of PSPACE ✓ EXPTIME, on input w ,
construct the directed acyclic computation graph containing the
configurations of the simulated ATM; first mark the accepting
nodes and then accept the word according to the definition of
ATM acceptance.
Proof Ideas cont.
2.(“◆”) ASPACE(t(n)) ◆ TIME(2O(t(n)) ):
Simulate a deterministic 2f (n) machine M by an O(f (n)) space
ATM S, where f (n) = O(t(n)). W.l.o.g. M accepts after erasing
all tape content and moving all the way to the left.
On input w , M goes through a sequence of configurations. We
can’t even store a single one of those in S because it could be too
long!
Let’s encode the sequence of configurations as a 2f (|w |) ⇥ 2f (|w |)
grid where a cell contains either a tape symbol or a tape symbol
and a state if that’s where the head of M is.
S then uses a recursive procedure R(i, j, d) where i, j are pointers
of size df (|w |)e in binary to a cell and d is a cell contents, to
check the bottom left grid cell i = 2f (|w |) , j = 1 has contents
d = (qaccept , t).
Proof Ideas cont.
R = “on input hi, j, di
1
2
if i = 1 then accept if d is consistent with the j’th cell of the
initial configuration q0 w in this representation; else reject.
9-guess the contents a, b, c of the parent cells [i 1, j 1],
[i 1, j], [i 1, j + 1]
1
2
if the parent cells with contents a, b, c shouldn’t have the child
cell [i, j] with contents d, reject
8-recurse into R(i 1, j 1, a), R(i 1, j, b),
R(i 1, j + 1, c).”
Even though the recursion depth is 2f (|w |) , the ATM can do with
O(f (w )) space because it need not store any of the arguments of
previous recursive calls: R only ever returns accept or reject.
Alternative Proof of PSPACE ✓ AP
We show QBF 2 AP by giving a polynomial time ATM.
M = “on input Q1 x1 . . . Qk xk (x1 , . . . , xk ) where the Qi 2 {9, 8}
1 for 1 i k
1
2
Qi -guess a value vi 2 {false, true} for xi
evaluate (v1 , . . . , vk ) and accept if it’s true; reject
otherwise.”
Outline
Relativization
Alternation
Polynomial Time Hierarchy
Polynomial Time Hierarchy #1
Definitions
A ⌃i -ATM is an ATM whose runs begin at an 9 state, and
alternate, i.e., switch the {9, 8}-type of state, at most i 1 times.
⌃i TIME(f (n)) is the class of languages ⌃i -ATMs can decide in
O(f (n)) time.
S
⌃i P = k ⌃i TIME(nk ).
Similarly, define ⇧i -ATMs, ⇧i TIME(f (n)), and ⇧i P by starting
with 8 instead of 9.
S
S
PH = i ⌃i P = i ⇧i P is called the polynomial time hierachy.
NB
NP = ⌃1 P and coNP = ⇧1 P.
Polynomial Time Hierarchy #2
Alternatively, we could have defined
Definitions
0 P = ⌃0 P = ⇧0 P = P; and for i
i+1 P
0
= P ⌃i P
⌃i+1 P = NP⌃i P
⇧i+1 P = coNP⌃i P
PSPACE
..
.
⌃3 P
P
3P
= P ⌃2 P
⌃2 P = NPNP
2P
⇧3 P
⇧2 P = coNPNP
= PNP = PcoNP
⌃1 P = NP
⇧1 P = coNP
P
The Polynomial Time Hierarchy
Examples
MIN-F 2 ⇧2 P
Games with a fixed number of moves
Open questions
Does PH = PSPACE?
Is the polynomial time hierarchy strict?
The Polynomial Time Hierarchy
Examples
MIN-F 2 ⇧2 P
Games with a fixed number of moves
Open questions
Does PH = PSPACE?
Is the polynomial time hierarchy strict?
...

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors