浙江大学 2007-2008 学年 秋冬 季学期
研究生《计算理论》课程期末考试试卷
开课学院: 计算机学院 考试形式:闭卷,允许带 入场
考试时间: 2007 年 1 月15日,所需时间:120 分钟,任课教师:
考生姓名: 学号: 专业:
题序 1 2 3 4 5 6 7 总分
得分 评卷人
Zhejiang University
Theory of Computation, Fall-Winter 2007 Final Exam
1. (16%) Suppose there are four languages A, B, C and D. Each of these languages may or may not be recursively enumerable. However, we know the following about them:
i. There is a reduction from A to B ii. There is a reduction from B to C iii. There is a reduction from D to C
Below are eight statements indicate whether each is:
• CERTAIN to be true: regardless of what problemsA, B, C and D are
• MAYBE true: depending on what A, B, C and D are
• NEVER true: regardless of what A, B, C and D are
(a) ( ) A is recursively enumerable but not recursive, and C is recursive.
(b) ( ) A is not recursive and D is not recursively enumerable.
(c) ( ) The complement of A is not recursively enumerable, but the comple- ment of B is recursively enumerable.
(d) ( ) The complement of B is not recursive, but the complement of C is recursive.
(e) ( ) If A is recursive, then the complement of B is recursive.
(f) ( ) If C is recursive, then the complement of D is recursive.
(g) ( ) If C is recursively enumerable, then the union of B and D is recursively enumerable.
(h) ( ) If C is recursively enumerable, then the intersection of B and D is recursively enumerable.
Theory of Computation Final Exam (Page 2 of 4) Jan. 15, 2008 2. (14%) Suppose there are four languages A, B, C and D. Each of these languages may or may not be in the class N P. However, we know the following about them:
i. There is a polynomial-time reduction from A to B ii. There is a polynomial-time reduction from B to C iii. There is a polynomial-time reduction from D to C Below are seven statements Indicate whether each is:
• CERTAIN to be true, regardless of what problems A, B, C and D are and regardless of the resolution of unknown relationships among complexity classes of “which is P = N P” is one example.
• MAYBE true, depending on what A, B, C and D are and/or depending on the resolution of unknown relationships such as P = N P?
• NEVER true, regardless of what A, B, C and D are and regardless of the resolution of unknown relationships such as P = N P?
(a) ( ) If A is N P-complete then C is N P-complete.
(b) ( ) A is N P-complete and C is in P.
(c) ( ) B is N P-complete and D is in P.
(d) ( ) If A is N P-complete and B is in N P then B is N P-complete.
(e) ( ) If C is N P-complete then D is in N P.
(f) ( ) C is in P and the complement of D is not in P.
(g) ( ) B is not in P and A is not in N P.
3. (12%) Consider the binary operator ◦ on languages as follows: given two languages L1 and L2 over Σ, L1◦ L2 consists of words of the form uv such that u ∈ L1, v ∈ L2 and |u| = |v|.
(a) Prove that if L1 and L2 are regular languages, then L1◦ L2 is context-free.
(b) Give a counter-example to disprove that if L1 is a regular language and L2 is a context-free language, then L1◦ L2 is context-free.
Theory of Computation Final Exam (Page 3 of 4) Jan. 15, 2008 4. (20%)
(a) Give a context-free grammar for the language
L3 = {ambmca2nb2n| m, n ∈ N}.
(b) Design a PDA M = (K, Σ, Γ, ∆, s, F ) accepting the language L3.
5. (10%) Show that the following language
{“M1”“M2” | M1, M2 are Turing machines and both M1 and M2 halt on blank tape}
is recursively enumerable. An informal description suffices.
Theory of Computation Final Exam (Page 4 of 4) Jan. 15, 2008 6. (16%)Let the following Turing machine M compute function f (x, y), where x and y are represented by binary strings respectively and separated with the symbol “;”, i.e. the initial configuration in form of .tx; y .
(a) Describe the key configurations when M started from the configuration .t10111; 10.
(b) Try to give the function f (x, y) computed by Turing Machine M.
7. (12%) The non-tautology, NT problem is defined as follows: given a Boolean expression E, does there exist a truth-assignment for the variables of E that makes E false.
(a) Prove NT is in N P.
(b) Describe a polynomial-time reduction from SAT to NT and show that NT prob- lem is N P-complete.