Docsity

Equivalent Standard -Computability and Complexity - Exams, Exams of Advanced Algorithms

Toggle sidebar
bg1
YOUR NAME:
Instructions:
This exam is closed-book, open-notes. Please turn off electronic devices: cell phones,
laptops, PDAs, etc.
You have a total of 70 minutes. There are 4 questions worth a total of 100 points. The
questions vary in difficulty, so if you get stuck on any question, it might help to leave
it for a while and try another one.
Answer each question in the space provided below the question. If you need more
space, you can use the reverse side of that page.
Problem 1
Problem 2
Problem 3
Problem 4
Total
CS 172: Computability and Complexity, Fall 2006 S.A. Seshia
Midterm 2
November 15. 2
006
Do not turn this page until the instructor tells you to do so!
pf3
pf4
pf5

Partial preview of the text

Download Equivalent Standard -Computability and Complexity - Exams and more Exams Advanced Algorithms in PDF only on Docsity!

YOUR NAME:

Instructions:

This exam is closed-book, open-notes. Please turn off electronic devices: cell phones, laptops, PDAs, etc.

You have a total of 70 minutes. There are 4 questions worth a total of 100 points. The questions vary in difficulty, so if you get stuck on any question, it might help to leave it for a while and try another one.

Answer each question in the space provided below the question. If you need more space, you can use the reverse side of that page.

Problem 1

Problem 2

Problem 3

Problem 4

Total

CS 172: Computability and Complexity, Fall 2006 S.A. Seshia

Midterm 2

November 15. 2 006

Do not turn this page until the instructor tells you to do so!

Problem 1: [True or False, with justification] (30 points)

For each of the following questions, state TRUE or FALSE. If TRUE, give a short proof. If FALSE, give a counterexample.

(a) The sentence ∀ x , y [( x x y > 0)  ( x + y ≥ 2 )] is in Th( N ,+, x) but not in Th( N ,+). (Recall that N denotes the set of natural numbers: {0,1,2,3,…}.)

_

(b) For every language L , it is true that L ≤ m L.

(c) The following language L is decidable:

L = {< M > | M is TM and, for all inputs w, M halts on w within 42 steps}

Problem 3: (20 points)

Recall the one way Turing machine (OTM) from Homework 5. An OTM is a single- tape, deterministic Turing machine that has a “stay put” move S in place of the regular “move left” L. In other words, the transition function is of the form

δ : Q x Γ  Q x Γ x { R, S }

Answer the three questions (a), (b), (c) below (remember to turn this page

over!). You may use without proof results from previous homeworks and theorems

covered in class and in Sipser’s book.

(a) Let the language class C = { L| L is a language recognized by a OTM}. Among the language classes you have studied in this class (regular, context-free, decidable, Turing-recognizable, etc.), which one is C equal to? Briefly justify your answer (no need to give a complete proof).

(b) Prove that the following language is undecidable:

L 2 = {< M > | M is a TM and L ( M ) ∈ C}

(c) Prove that the following language is decidable: L 1 = {< M > | M is an OTM and L ( M ) = Ø}