• Keine Ergebnisse gefunden

Exercise 6.1 Prove that the following functions are primitive recursive: 1

N/A
N/A
Protected

Academic year: 2022

Aktie "Exercise 6.1 Prove that the following functions are primitive recursive: 1"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Universität Koblenz-Landau FB 4 Informatik

Prof. Dr. Viorica Sofronie-Stokkermans1 28.11.2019

M.Ed. Dennis Peuter2

Exercises for Advances in Theoretical Computer Science Exercise Sheet 6

Due at 02.12.2019, 10:00 s.t.

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 recursive in the lecture or in a previous exercise.

Exercise 6.1

Prove that the following functions are primitive recursive:

1. cks :Nk →N, wheres∈N, dened for every n∈Nk by:cks(n) =s. 2. fac:N→N, dened for every n∈Nby:fac(n) =n!.

3. exp:N×N→N, dened for every (n, m)∈N×Nby:exp(n, m) =nm. 4. eq:N×N→N, dened for every (n, m)∈N×Nby: eq(n, m) =

(1 if n=m 0 otherwise.

Exercise 6.2

Consider the following primitive recursive functions:

I) f1 = +◦(− ◦(π21, c25),∗ ◦(π22, π22)) II) f2 =PR[(+1)◦0,∗ ◦((+1)◦π12, π22)]

III) f3 =PR[c11,∗ ◦(π13, π33)]◦((−1)◦π12, π22)

a) Which is the arity of f1, off2 and off3? (i.e. how many arguments does each of these functions have?)

b) What do these functions compute if all arguments are equal to 2?

c) What do these functions compute in general?

Exercise 6.3

Express in the formh(n) = 0 withh primitive recursive the following conditions:

I) nis between 5and 12, or nis unequal to 2m: n≥5 andn≤12, or n6= 2m .

II) nis greater than 20 and is a perfect square:

n >20 and∃k≤n:k∗k=n.

(2)

Exercise 6.4

Prove that the following functions are primitive recursive:

I) max:N2 →Ndened bymax(x, y) =

(x if x≥y y otherwise. II) min:N2 →Ndened bymin(x, y) =

(x if x < y y otherwise. III) even:N→Ndened by even(x) =

(1 if ∃k≤x: 2∗k=x

0 otherwise .

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 02.12.2019, 10:00 s.t. via the cardboard box in the shelf in room B 222 or via e-mail (with Homework ACTCS in the subject) to dpeuter@uni-koblenz.de.

Referenzen

ÄHNLICHE DOKUMENTE

☛ As long as you are a minor (less than 18 years old) and have an Aufenthaltserlaubnis acording to the new residence right regulations (§ 25a Aufenthaltsgesetz), your parents and

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

The resulting selection theorem, in which neither the decidability of atomic formulae, nor the use of intuitionistic deductive systems, need to be assumed, is a genuine

Meyer and Ritchie have previously given a description of primitive recursive functions by loop-programs In this paper a class of logic programs is described which computes the

a certain graph, is shown, and he wants to understand what it means — this corre- sponds to reception, though it involves the understanding of a non-linguistic sign;

Die Projekte treten auf unterschiedliche Weise in direkte Interaktion mit dem Besucher und betonen die Bedeutung von Kommunikation und Dialog im Museum.. Kunst und deren

In diesem gemeinsamen Projekt, das 2010 ursprünglich auf Einladung für eine Ausstellung der in Istanbul ansässigen Kunstinstitution ARTER entstand, machen Banu Cenneto?lu und