Zum Inhalt springen

Tak (Funktion)

aus Wikipedia, der freien Enzyklopädie

Die Tak-Funktion, benannt nach Ikuo Takeuchi (竹内郁雄), ist eine rekursive Funktion, die folgendermaßen definiert ist:

<math>t(x,y,z):=\begin{cases}y & \text{falls }x\le y \\t\big( t(x-1,y,z), t(y-1,z,x), t(z-1,x,y)\big) &\text{andernfalls}\end{cases}</math>

Anders ausgedrückt:

<math>t(x,y,z)=\begin{cases} y & \text{falls }x\le y \\ \begin{cases} z & \text{falls } y\le z \\ x & \text{andernfalls} \end{cases} & \text{andernfalls} \end{cases}</math>

Sie wird oft als Benchmark für Programmiersprachen verwendet, die auf Rekursion optimiert sind.

Weblinks

  • {{#if: | {{{author}}} | Eric W. Weisstein }}: TAK Function. In: MathWorld (englisch). {{#if: TAKFunction | {{#ifeq: {{#property:P2812}} | TAKFunction | | {{#if: {{#property:P2812}} | {{#ifeq: 0 | 0 | }} | {{#ifeq: 0 | 0 | }} }} }} }}