• Keine Ergebnisse gefunden

(3∗f(n−1)) if n >3 Prove thatf is primitive recursive

N/A
N/A
Protected

Academic year: 2022

Aktie "(3∗f(n−1)) if n >3 Prove thatf is primitive recursive"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Universität Koblenz-Landau FB 4 Informatik

Prof. Dr. Viorica Sofronie-Stokkermans1 07.06.2021 M.Ed. Dennis Peuter2

Exercises for Advances in Theoretical Computer Science Exercise Sheet 8

Due at 15.06.2021, 10:00 s.t.

Remark:For the exercises where you have to define primitive recursive functions, you are allowed to use all functions that were proved to be primitive recursive in the lecture or in a previous exercise.

Exercise 8.1

Letf :N→Nbe defined as follows:

f(n) =









1 if n= 0

2 if n= 1

4 if n= 2

f(n−1) +f(n−2) +f(n−3) if n >2 Prove thatf is primitive recursive.

Exercise 8.2

Letf :N→Nbe defined as follows:

f(n) =













3 if n= 0

7 if n= 1

4 if n= 2

4 if n= 3

(2∗f(n−4))−f(n−2) + (4∗f(n−3)) + (3∗f(n−1)) if n >3 Prove thatf is primitive recursive.

Exercise 8.3

Letg:N→Nbe defined by:g(n) =f(n, n+ 1)−1, andf :N2→Nbe defined by:

f(n,0) = 0

f(n, k+ 1) = f(n, k) + (1−(k2−n))

a) Show that g is primitive recursive.

b) Computeg(5)and g(10).

c) Give a LOOP program which computes g.

d) Describe what mathematical function is computed by g.

(2)

e) Give a primitive recursive function which computes blog2(n)c. (Forn= 0, the value of the function should be0, not−∞.)

Hint: Modify the functionsg and f in a suitable way.

f) Prove that the function log : N2 → N defined by log(n, m) = blogn(m)c is primitive recursive.

Hint: Modify the functionsg and f in a suitable way.

Exercise 8.4

Show that there exists a functionf :N→Nwhich is not primitive recursive.

Exercise 8.5

Which functions are computed by:

I) f1(n, m) =µi<mi(n−i= 0)

II) f2(n1, n2, m) =µi<mi n1−(i+n2) = 0 III) f3(m) =µi<mi m−(i+i) = 0

IV) f4(m) =µi<mi (5−i)∗((m−1)−i) = 0

1

B 225 sofronie@uni-koblenz.de https://userpages.uni-koblenz.de/~sofronie/

2

B 223 dpeuter@uni-koblenz.de https://userpages.uni-koblenz.de/~dpeuter/

If you want to submit solutions, please do so until 15.06.2021, 10:00 s.t. via e-mail (with “Homework ACTCS” in the subject) todpeuter@uni-koblenz.de.

Referenzen

ÄHNLICHE DOKUMENTE

Im Folgenden wird eine Visualisierung mit regelmäßigen n-Ecken versucht die jeweils in n Sektoren unterteilt sind.. Die Elemente werden durch

■ Muß Seite im Verlauf einer Transaktion auf Platte zurückgeschrieben werden: nicht auf die Originalseite, sondern auf neue Seite. ■ statt einer Hilfsstruktur zwei

via the cardboard box in the shelf in room B 222 or via e-mail (with Homework ACTCS in the subject)

via the cardboard box in the shelf in room B 222 or via e-mail (with Homework ACTCS in the subject)

Remark: For the exercises where you have to dene primitive recursive functions, you are allowed to use all functions that were proved to be primitive recursice in the lecture or in

via the cardboard box in the shelf in room B 222 or via e-mail (with Homework ACTCS in the subject)

via e-mail (with “Homework ACTCS” in the subject)

Es stellt sich die Frage, ob die Anwesenheit von Wasser wesentliche Voraussetzung für die Bildung von Kalium metabismutat(V) und die Adoption des K Sb 0 3 -Typs