q368. 3. 阿克曼函數
Tags : 函式
Accepted rate : 17人/17人 ( 100% ) [非即時]
評分方式:
Tolerant

最近更新 : 2025-04-11 16:55

Content

  德國數學家 Wilhelm Ackermann 在 1928 年的一篇論文 "Zum Hilbertschen Aufbau der reellen Zahlen"中,提出了一個三變數遞迴函數:

$$
\phi(m, n, p)=
\begin{cases}
n+p, &\text{if }m=0\\
n, &\text{if }m=1\\
1, &\text{if }m=2\ \wedge\ p=0\\
0, &\text{if }m\ge3\ \wedge\ p=0\\
\phi(m-1, n, \phi(m, n, p-1)), &\text{otherwise}
\end{cases}
$$

這個函數是用來研究可計算函數與形式系統的自洽性,是數理邏輯領域的一部分,並且當時被用來研究原始遞迴函數的極限。
  匈牙利數學家 Rózsa Péter 在 1935 年的成果使得阿克曼函數成為研究「可計算性」的重要範例,特別是在比較「原始遞迴函數」與「一般遞迴函數」的時候,阿克曼函數成為經典案例。
  1947 年,美國數學家 Raphael M.Robinson 將 Péter 的研究進一步推廣,成為我們現在熟知的形式:

$$
\text A(m, n)=
\begin{cases}
n+1, &\text{if }m=0\\
\text A(m-1, 1), &\text{if }m>0\ \wedge\ n=0\\
\text A(m-1, \text A(m, n-1)), &\text{if }m>0\ \wedge\ n>0\\
\end{cases}
$$

這個版本目前被廣泛應用於計算理論和計算機科學。

Input

  輸入包含兩個正整數 $m, n$($0\le m\le 3$, $0\le n\le 11$)。

Output

  請輸出 $\text A(m, n)$ 於一行。

Sample Input #1
1 2
Sample Output #1
4
Sample Input #2
3 11
Sample Output #2
16381
測資資訊:
記憶體限制: 512 MB
公開 測資點#0 (5%): 1.0s , <1K
公開 測資點#1 (5%): 1.0s , <1K
公開 測資點#2 (5%): 1.0s , <1K
公開 測資點#3 (5%): 1.0s , <1K
公開 測資點#4 (5%): 1.0s , <1K
公開 測資點#5 (5%): 1.0s , <1K
公開 測資點#6 (5%): 1.0s , <1K
公開 測資點#7 (5%): 1.0s , <1K
公開 測資點#8 (5%): 1.0s , <1K
公開 測資點#9 (5%): 1.0s , <1K
公開 測資點#10 (5%): 1.0s , <1K
公開 測資點#11 (5%): 1.0s , <1K
公開 測資點#12 (5%): 1.0s , <1K
公開 測資點#13 (5%): 1.0s , <1K
公開 測資點#14 (5%): 1.0s , <1K
公開 測資點#15 (5%): 1.0s , <1K
公開 測資點#16 (5%): 1.0s , <1K
公開 測資點#17 (5%): 1.0s , <1K
公開 測資點#18 (5%): 1.0s , <1K
公開 測資點#19 (5%): 1.0s , <1K
Hint :

本題共有 $1$ 個子題,每個子題有多筆測資。
第一子題: 無其它限制,全部解出可得 $100$ 分。

Tags:
函式
出處:
113學年度新北新莊高中校內資訊學科能力競賽 [管理者: liaoweichen1 ... (M_SQRT) ]

Status Forum 排行

ID User Problem Subject Hit Post Date
沒有發現任何「解題報告」