• 沒有找到結果。

| i, j, k ≥ 0, i ≥ j + k} is context-free.

N/A
N/A
Protected

Academic year: 2021

Share "| i, j, k ≥ 0, i ≥ j + k} is context-free."

Copied!
4
0
0

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

全文

(1)

浙江大学 2005-2006 学年 秋冬 学期期末考试

《计算理论》课程试卷

考试时间:120 分钟 开课学院: 计算机学院 专业:

任课教师: 姓名: 学号:

题序 1 2 3 4 5 6 7 总分

得分 评阅人

Zhejiang University

Theory of Computation, Fall-Winter 2005 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) ( ) Language {am(bc)n : m, n ∈ N} is not regular.

(b) ( ) Language {ai

b

j

c

k

| i, j, k ≥ 0, i ≥ j + k} is context-free.

(c) ( ) Let F = {f : f be a primitive recursive function from N to N}, then 2F (Power set of F ) is uncountable.

(d) ( ) Let L1

, L

2

, · · · , L

i

, · · · be all regular languages, so is ∪

i=1

L

i.

(e) ( ) Suppose language L is context-free and L0 is a regular, then L

L

0∗ is context-free.

(f) ( ) Every computable function is primitive recursive.

(g) ( ) The complement of every recursive enumerable language is recursive enu- merable.

(h) ( ) a

b

∩ c

d

= ∅.

(i) ( ) Every regular language is recursively enumerable.

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

x ∈ L, then L is decidable.

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

(a) L1 = {an

b

m : m ≡ n mod 2}

(2)

Theory of Computation Final Exam(Page 2 of 4) Jan. 11, 2006 (b) L2 = {w ∈ {a, b} : w 6= wR

}

3. (18%)

(a) Give a Context-Free Grammar that generates the language

L

3 = {xy | x, y ∈ {a, b}

, |x| = |y| and x and y

R differ in one position }.

For example, abbbbaba, abbbbbbb ∈ L3, but aababb 6∈ L3.

(b) Design a PDA M = (K, Σ, Γ, ∆, s, F ) accepting the language L3. Solution: (a)

(b) The PDA M = (K, Σ, Γ, ∆, s, F ) is defined below:

K =

Σ = {a, b}

Γ =

s = F =

(q, σ, β) (p, γ)

(3)

Theory of Computation Final Exam(Page 3 of 4) Jan. 11, 2006 4. (16%) Let the following Turing machine M computes f (x, y), the alphabet is

{0, 1, ; }. The head of M begins from the most left blank; t is the symbol of blank;

x and y are presented by binary strings respectively and separated with ;.

(a) Describe the key configurations when M started from the configuration .t10111; 111.

(b) Try to give the function f (x, y) that M can compute.

(4)

Theory of Computation Final Exam(Page 4 of 4) Jan. 11, 2006 5. (12%) Let P (x, y) be primitive recursive predicate. Prove the following predicate

∃y

≤u

P (x, y), ∀u ∈ N

is also primitive recursive.

6. (10%) Show that the following language

H = {“M” | M is a Turing Machine and halts on empty string}

is recursively enumerable. An informal description suffices.

參考文獻

相關文件

An n×n square is called an m–binary latin square if each row and column of it filled with exactly m “1”s and (n–m) “0”s. We are going to study the following question: Find

substance) is matter that has distinct properties and a composition that does not vary from sample

- Informants: Principal, Vice-principals, curriculum leaders, English teachers, content subject teachers, students, parents.. - 12 cases could be categorised into 3 types, based

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

A subgroup N which is open in the norm topology by Theorem 3.1.3 is a group of norms N L/K L ∗ of a finite abelian extension L/K.. Then N is open in the norm topology if and only if

Define instead the imaginary.. potential, magnetic field, lattice…) Dirac-BdG Hamiltonian:. with small, and matrix

Let us suppose that the source information is in the form of strings of length k, over the input alphabet I of size r and that the r-ary block code C consist of codewords of

Microphone and 600 ohm line conduits shall be mechanically and electrically connected to receptacle boxes and electrically grounded to the audio system ground point.. Lines in