• 沒有找到結果。

{s, f }, Σ = {a, b}, Γ = {b}, F = {f } and ∆ is given by the following table

N/A
N/A
Protected

Academic year: 2021

Share "{s, f }, Σ = {a, b}, Γ = {b}, F = {f } and ∆ is given by the following table"

Copied!
4
0
0

加載中.... (立即查看全文)

全文

(1)

浙江大学 2006-2007 学年 秋冬 季学期

研究生《计算理论》课程期末考试试卷

考试时间: 2007 年 1 月22日,所需时间:120 分钟,任课教师:

考生姓名: 学号: 专业:

题序 1 2 3 4 5 6 7 8 总分

得分 评卷人

Zhejiang University

Theory of Computation, Fall-Winter 2006 Final Exam

1. (30%) Determine whether the following statements are true or false. If it is true write a X otherwise a × in the bracket before the statement.

(a) ( ) A countable union of regular languages is necessarily regular.

(b) ( ) If a DFA M contains a self-loop on some state q, then M must accept an infinite language.

(c) ( ) Language {ucv | u, v ∈ {a, b} and |v| < |u| < 2|v|} is context-free.

(d) ( ) For a given context-free language L and a string x, the decision problem for whether x ∈ L is decidable.

(e) ( ) The complement of every recursive enumerable language is necessarily nonrecursive enumerable.

(f) ( ) If one can list the elements of a language in order, then the language must be recursive.

(g) ( ) Languages {“M” : Turing machine M accepts more than 2007 distinct inputs} is recursive enumerable.

(h) ( ) Let L be a language and there is a Turing machine M halts on x for every

x ∈ L, then L is decidable.

(i) ( ) If L is polynomial time reducible to a finite language, then L is in P.

(j) ( ) If A ≤p

B, B ≤

p

C and both A and C are N P-complete, then B is N P-complete.

2. On Regular Languages

(12%) Decide whether the following languages are regular or not and provide a formal proof for your answer.

(a) L = {w ∈ {a, b} : |na(w) − nb(w)| mod 2 6= 0}

(2)

Theory of Computation Final Exam (Page 2 of 4) Jan. 22, 2007 (b) L = {w ∈ {a, b} : |na(w) − nb(w)| 6= 0}

where na(w) and nb(w) give the number of a and b in w respectively.

3. On Context-free Languages

(15%) Consider the pushdown automaton M = {K, Σ, Γ, ∆, s, F } where K =

{s, f }, Σ = {a, b}, Γ = {b}, F = {f } and ∆ is given by the following table

(p, a, β), (q, γ) ((s, a, e), (f, e)) ((s, b, e), (s, b)) ((s, a, b), (s, b)) ((s, e, e), (f, e)) ((f, a, e), (f, e)) ((f, b, e), (s, b)) (a) Can PDA M accept string aaaaababa?

(b) Describe the language accepted by M;

(c) Give a Turing machine that decides the same language.

(3)

Theory of Computation Final Exam (Page 3 of 4) Jan. 22, 2007 4. On Primitive Recursive Functions

(11%) Show function

f (x, y) =

½

x + y,

if y is odd

x ∼

y2

,

if y is even is primitive recursive.

5. On Turing Machines

(10%) Show that the computable functions are closed under composition, using the definition of computation of the Turing machine. That is, if f and g are com- putable functions, show that the function ϕ given by ϕ(x) = f (g(x)) is a computable function.

(4)

Theory of Computation Final Exam (Page 4 of 4) Jan. 22, 2007 6. On Undecidability

(12%) Let K0 = {“M”“w” : M halts on input string w }, K1 = {“M” : M halts on input string “M” }. On the assumption that P 6= N P, try to sign languages K0 ,

K

1 and sets of languages recursive, P, N P and N P-Complete to the corresponding zone of the following figure:

Note: r.e. is the set of recursive enumerable languages and CO-r.e. ={L : comple- ment of L is r.e. }.

7. On P and N P Problems

(10%) The SET-PACKING problem is defined as follows: given a set S with n sets and a number k ≤ n, does S contains k disjoint sets?

(a) Prove that SET-PACKING problem is N P Problem.

(b) Prove that SET-PACKING problem is N P-complete.

For showing hardness, you can assume that the VERTEX-COVER problem is N P- complete.

參考文獻

相關文件

[This function is named after the electrical engineer Oliver Heaviside (1850–1925) and can be used to describe an electric current that is switched on at time t = 0.] Its graph

Then g is defined on [a, b], satifies (11), and is continuous on [a, b] by the Sequential Characterization of Limits.. Thus, f

• Suppose the input graph contains at least one tour of the cities with a total distance at most B. – Then there is a computation path for

• Give the chemical symbol, including superscript indicating mass number, for (a) the ion with 22 protons, 26 neutrons, and 19

You are given the wavelength and total energy of a light pulse and asked to find the number of photons it

Wang, Solving pseudomonotone variational inequalities and pseudocon- vex optimization problems using the projection neural network, IEEE Transactions on Neural Networks 17

Numerical experiments are done for a class of quasi-convex optimization problems where the function f (x) is a composition of a quadratic convex function from IR n to IR and

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =&gt;