Versionsvergleich
Aus ProgrammingWiki
Vergleich: 2011-06-21T11:00:50+00:00 → 2011-06-21T11:14:53+00:00
= <math>\mu</math>-rekursive zahlentheoretische Funktionen = | |
== Aufgabenstellung == | |
Ermitteln Sie für die im Folgenden gegebenen Funktionen <math>h_i = \mu f:\mathbb{N}_0 \mapsto \mathbb{N}_0</math> gleichwertige explizite Vorschriften. | |
# <math>h_1=\mu f(x)= | |
\begin{cases} | |
\text{das kleinste }y \in \mathbb{N}_0 \text{, mit }x mod 2 - y = 0 & \text{, wenn}\\ | |
& \text{(1) so ein y existiert und}\\ | |
& \text{(2) }x mod 2 - i = 0 \text{ f\"ur alle }i \leq y \text{ definiert ist;}\\ | |
undefiniert & \text{, sonst} | |
\end{cases}</math> | |
# <math>h_2=\mu f(x)= | |
\begin{cases} | |
\text{das kleinste }y \in \mathbb{N}_0 \text{, mit }x^2 \dot{-} y = 0 & \text{, wenn}\\ | |
& \text{(1) so ein y existiert und}\\ | |
& \text{(2) }x^2 \dot{-} i = 0 \text{ f\"ur alle }i \leq y \text{ definiert ist;}\\ | |
undefiniert & \text{, sonst} | |
\end{cases}</math> | |
# <math>h_3=\mu f(x)= | |
\begin{cases} | |
\text{das kleinste }y \in \mathbb{N}_0 \text{, mit }y^2 \dot{-} x = 0 & \text{, wenn}\\ | |
& \text{(1) so ein y existiert und}\\ | |
& \text{(2) }i^2 \dot{-} x = 0 \text{ f\"ur alle }i \leq y \text{ definiert ist;}\\ | |
undefiniert & \text{, sonst} | |
\end{cases}</math> | |
== Lösung == | |
# <math>h_1=\mu f(x)= | |
\begin{cases} | |
0, & \text{wenn } x mod 2 = 0 \text{ (gerade)}\\ | |
1, & \text{wenn } x mod 2 = 1 \text{ (ungerade)} | |
\end{cases}</math> | |
# <math>h_2=\mu f(x)= x^2</math> | |
| − | # <math>h_3=\mu f= |
| − | \begin{cases} |
| − | 1, & \text{wenn }x=1\\ |
| − | n.d., & sonst |
| − | \end{cases}</math> |
| + | # <math>h_3=\mu f=0</math> |
== Aufgabenstellung == | |
Ermitteln Sie für die im Folgenden gegebenen Funktionen gleichwertige Vorschriften nach dem Definitionsschema für <math>\mu</math>-rekursive Funktionen. | |
# <math>p(x,y)= | |
\begin{cases} | |
1 & \text{, wenn y eine Primzahl gr\"o\ss er als x ist.}\\ | |
0 & \text{, sonst} | |
\end{cases}</math> | |
# <math>g(m,n)= | |
\begin{cases} | |
\frac{n}{m} & \text{, wenn }m \neq 0 \text{ und m teilt n}\\ | |
n.d. & \text{, sonst} | |
\end{cases}</math> | |
== Lösung == | |
1. gegeben: <math>prim(y)=\begin{cases} | |
0, & \text{wenn y Primzahl}\\ | |
1, & \text{sonst} | |
\end{cases}</math> | |
| − | <math>x<y=\begin{cases} |
| + | <math>x<y(x, y)=\begin{cases} |
1, & \text{ wenn } x < y\\ | |
0, & sonst | |
\end{cases}</math> | |
<math>p(x, y)= | |
\begin{cases} | |
| − | \text{das kleinste }n \in \mathbb{N}_0 \text{, mit }(prim(y) + signum(x - y)+1) ^ n = 0 & \text{, wenn}\\ |
| + | \text{das kleinste }n \in \mathbb{N}_0 \text{, mit }prim(y) * x<y(x, y)+ n = 0 & \text{, wenn}\\ |
& \text{(1) so ein y existiert und}\\ | |
| − | & \text{(2) }(prim(y) + signum(x - y)+1) ^ i = 0 \text{ f\"ur alle }i \leq n \text{ definiert ist;}\\ |
| + | & \text{(2) }prim(y) * x<y(x, y)+ i = 0 \text{ f\"ur alle }i \leq n \text{ definiert ist;}\\ |
undefiniert & \text{, sonst} | |
\end{cases}</math> | |
2. <math>g(m, n)= | |
\begin{cases} | |
| − | \text{das kleinste }y \in \mathbb{N}_0 \text{, mit }m - y * n = 0 & \text{, wenn}\\ |
| + | \text{das kleinste }k \in \mathbb{N}_0 \text{, mit }|k*m-n|^{signum(n)} = 0 & \text{, wenn}\\ |
& \text{(1) so ein y existiert und}\\ | |
| − | & \text{(2) }m - i * n = 0 \text{ f\"ur alle }i \leq y \text{ definiert ist;}\\ |
| + | & \text{(2) }|i*m-n|^{signum(n)} = 0 \text{ f\"ur alle }i \leq y \text{ definiert ist;}\\ |
undefiniert & \text{, sonst} | |
\end{cases}</math> |