Introduction to the Theory of Computation: Final Exam, Exams of Theory of Computation

A final exam for the course Introduction to the Theory of Computation. The exam consists of five questions that cover topics such as regular expressions, DFAs, context-free languages, and the Turing-Church Thesis. Each question requires students to provide detailed answers and motivation. The exam is closed-book and has a duration of 3h30. The exam was taken on January 15, 2016.

Typology: Exams

2015/2016

Uploaded on 05/11/2023

rakshan
rakshan 🇺🇸

4.6

(18)

239 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to the
Theory of Computation
Final exam
15 January 2016
Closed-book. Duration: 3h30.
Please answer each question on a separate sheet with your name and
section. Motivate all your answers and give sufficient details.
1. a) Is the set of all closed intervals of Rwith rational bounds denu-
merable?
b) Is the set of all regular expressions over a finite alphabet Σ denu-
merable? What happens when Σ is infinite (but denumerable)?
2. a) Give a DFA that accepts the language
L1
t
w
|
w
P t
a, b
u
, Na
p
w
q
2 mod 4
u
where Nσ
p
w
q
is the number of letters σcontained in the word w.
b) Give a DFA that accepts the language
L2
t
w
|
w
P t
a, b
u
, aa
R
F act
p
w
qu
c) Give a regular grammar that generates L1
Y
L2.
3. a) Is the language
t
ambncmax
p
m,n
q
|
m, n
P
N
u
regular?
b) Is the language of all well-parenthesized expressions regular?
Example:
ppqpqq
.
4. a) State and prove the pumping lemma for context-free languages.
b) Is the language L
t
aibjckdl
|
i
l
¥
j
k
u
context-free?
5. a) State the Turing-Church Thesis. What type of justification can
be given for this thesis?
b) Are two tape Turing Machines more expressive than the standard
definition of a Turing Machine? Explain.
1
pf2

Partial preview of the text

Download Introduction to the Theory of Computation: Final Exam and more Exams Theory of Computation in PDF only on Docsity!

Introduction to the

Theory of Computation

Final exam

15 January 2016

Closed-book. Duration: 3h30. Please answer each question on a separate sheet with your name and section. Motivate all your answers and give sufficient details.

  1. a) Is the set of all closed intervals of R with rational bounds denu- merable?

b) Is the set of all regular expressions over a finite alphabet Σ denu- merable? What happens when Σ is infinite (but denumerable)?

  1. a) Give a DFA that accepts the language

L 1  tw | w P ta, bu, Napwq  2 mod 4u

where Nσpwq is the number of letters σ contained in the word w. b) Give a DFA that accepts the language

L 2  tw | w P ta, bu, aa R F actpwqu

c) Give a regular grammar that generates L 1 Y L 2.

  1. a) Is the language tambncmaxpm,nq^ | m, n P Nu regular?

b) Is the language of all well-parenthesized expressions regular? Example: ppqpqq.

  1. a) State and prove the pumping lemma for context-free languages.

b) Is the language L  taibj^ ckdl^ | i l ¥ j ku context-free?

  1. a) State the Turing-Church Thesis. What type of justification can be given for this thesis?

b) Are two tape Turing Machines more expressive than the standard definition of a Turing Machine? Explain.

  1. a) Do there exist computable functions that are not primitive recur- sive?

b) Show that IntegerSqrtpnq  t

nu is primitive recursive.

c) Is IntegerSqrt μ-recursive? Why are μ-recursive functions of in- terest in computability theory?

  1. a) Let M be a Turing Machine. Show that the problem that consists in determining whether M stops on all words of even length is undecidable. Hint: Use the empty-word halting-problem.

b) Why are the languages accepted by a Turing Machine also called “recursively enumerable”? Prove your statement.

  1. a) Show that HC 9 TS.

b) Define the complexity classes P , N P and N P C. What inclusion relations between these classes are known, plausible? Give an example of a problem belonging to each of these classes.