Activity 1 [2 minutes] How would you do this faster?:
(Wait; then Click)
Also...What complexity is this?
Activity 2 [2 minutes] Is PALINDROME in ?:
(Wait; then Click)
Also...What complexity is this?
Example:
SEL = {<M, A> | M sorts integer array A using SELECTION-SORT }
Activity 3 [2 minutes] Is in ?:
(Wait; then Click)
First: Build an algorithm that solves this in ... (this would mean YES!)
THEN, you may ask if might belong to a lower complexity class ... (don't try...yet)
This is an example
Activity 4 [2 minutes] How would you Prove this?:
(Wait; then Click)
You must build a Decider that solves it in (Polynomial time)
Use Breadth-First-Search!
On input
Mark all nodes rechable from the current node (starting at s and moving to the next in a running queue)
Continue to expand until we reach or another node
if we reach : ACCEPT
REJECT
What is the complexity!!!???
Complexity analysis:
Worst case: traversing every edge.
How many edges? ...
Another approach:
At most phases are executed.
Each phase takes polynomial time to explore marked nodes and their outgoing edges.
(Imagine nodes in a straight line VS nodes all connected to each other)
Activity 5 [2 minutes] How would you Prove this?:
(Wait; then Click)
AutoTM_t = { |M| is a TM that accepts in ≤ t(|M|) steps }
Claim 1: AutoTM_t is decidable
Proof of Claim 1:
On input , simulate M on for t(|M|) simulated steps ADWID.
Claim 2: AutoTM_t can’t be decided by any basic TM in ≤ t(n) steps
Proof of claim 2: (everyone’s favorite contradiction argument)
Assume AutoTM_t is decided in time ≤ t(n) by some TM
This implies that the complement is also decided by some other TM (just swap the accepting and rejecting states of )
Thus, for every Turing machine M:
∈ iff accepts in time ≤ t(|M|)
And by taking the complement of the definition of AutoTM_t:
∈ iff does not accept in time ≤ t(|M|).
What happens if we plug in for M in both statements:
∈ iff accepts in time ≤ t(||) ∈ AutoTM_tc iff does not accept in time ≤ t(|M|).