クヌースの矢印表記

クヌースの矢印表記(クヌースのやじるしひょうき、: Knuth's up-arrow notation)とは、1976年ドナルド・クヌース巨大数を表現するために発明した表記法である[1][2]。これは、乗算加算の反復であり、冪乗が乗算の反復であるのと同様の考え方に基づくもので、冪乗の反復(テトレーション)を表す演算の表記法である。例えば宇宙論で使われた最大の数は、クヌースの矢印表記で表すとおよそ 10 ↑↑ 5 {\displaystyle 10\uparrow \uparrow 5} [注釈 1]である。このように、クヌースの矢印表記は現実世界の事物で例えるにはあまりにも大きすぎるような巨大数を簡単に表現できる表記法の一つである。

クヌースの矢印表記を指す用語として、日本ではタワー表記という呼称も用いられる[3][4]。一方英語では、テトレーションを指数で表記した時の、まるで塔のように高く積みあがる様子を指した「Power tower[5]」という語はあるが、タワー表記に相当する用語は見受けられない。

クヌースの矢印表記のさらに拡張となる表記法には、コンウェイのチェーン表記などがある。

導入

加算→乗算→冪乗

乗算は、加算の反復によって定義できる。

a × b = a + a + + a b  copies of  a {\displaystyle a\times b=\underbrace {a+a+\dots +a} _{b{\text{ copies of }}a}}

冪乗は、乗算の反復によって定義できる。

a b = a × a × × a b  copies of  a {\displaystyle a^{b}=\underbrace {a\times a\times \dots \times a} _{b{\text{ copies of }}a}}

なお、一部の初期のコンピュータでは、上向き矢印を冪乗演算子に使った[6]ので、それを使うと

a b = a × a × × a b   c o p i e s   o f   a = a b {\displaystyle a\uparrow b=\underbrace {a\times a\times \dots \times a} _{b\mathrm {\ copies\ of\ } a}=a^{b}}

例として、グーゴルプレックス 10 10 100 {\displaystyle 10^{10^{100}}} は、10↑10↑100 と書ける。

テトレーション

ここでクヌースは、二重矢印をテトレーション(指数計算の反復)を表す演算子として定義した[2]

a ↑↑ b = a a a b  copies of  a = a a . . . a b  copies of  a {\displaystyle a\uparrow \uparrow b=\underbrace {a\uparrow a\uparrow \cdots \uparrow a} _{b{\text{ copies of }}a}=\underbrace {a^{a^{{}^{.\,^{.\,^{.\,^{a}}}}}}} _{b{\text{ copies of }}a}}

これを用いると、

2 ↑↑ 2 = 2 2 = 4 2 ↑↑ 3 = 2 2 2 = 2 4 = 16 2 ↑↑ 4 = 2 2 2 2 = 2 2 4 = 2 16 = 65536 2 ↑↑ 5 = 2 2 2 2 2 = 2 2 16 = 2 65536 2.003 × 10 19728 {\displaystyle {\begin{aligned}2\uparrow \uparrow 2&=2^{2}=4\,\\2\uparrow \uparrow 3&=2^{2^{2}}=2^{4}=16\,\\2\uparrow \uparrow 4&=2^{2^{2^{2}}}=2^{2^{4}}=2^{16}=65536\,\\2\uparrow \uparrow 5&=2^{2^{2^{2^{2}}}}=2^{2^{16}}=2^{65536}\approx 2.003\times 10^{19728}\end{aligned}}}
3 ↑↑ 2 = 3 3 = 27 {\displaystyle 3\uparrow \uparrow 2=3^{3}=27}
3 ↑↑ 3 = 3 3 3 = 3 27 = 7625597484987 {\displaystyle 3\uparrow \uparrow 3=3^{3^{3}}=3^{27}=7625597484987}
3 ↑↑ 4 = 3 3 3 3 = 3 3 27 = 3 7625597484987 1.258 × 10 3638334640024 {\displaystyle 3\uparrow \uparrow 4=3^{3^{3^{3}}}=3^{3^{27}}=3^{7625597484987}\approx 1.258\times 10^{3638334640024}}
10 ↑↑ 3 = 10 10 10 = 10 10000000000 {\displaystyle 10\uparrow \uparrow 3=10^{10^{10}}=10^{10000000000}} (10の100億乗)
10 ↑↑ 4 = 10 10 10 10 = 10 10 10000000000 {\displaystyle 10\uparrow \uparrow 4=10^{10^{10^{10}}}=10^{10^{10000000000}}}

などと書ける。

それ以上

さらにクヌースは、三重以上の矢印演算子を定義した。三重矢印は二重矢印による演算を反復する演算子であり、ペンテーションを表す。

a ↑↑↑ b = a ↑↑ a ↑↑ ↑↑ a b  copies of  a {\displaystyle a\uparrow \uparrow \uparrow b=\underbrace {a\uparrow \uparrow a\uparrow \uparrow \cdots \uparrow \uparrow a} _{b{\text{ copies of }}a}}

同様に、四重矢印演算子も定義できる。これはヘキセーションを表す。

a ↑↑↑↑ b = a ↑↑↑ a ↑↑↑ ↑↑↑ a b   c o p i e s   o f   a {\displaystyle a\uparrow \uparrow \uparrow \uparrow b=\underbrace {a\uparrow \uparrow \uparrow a\uparrow \uparrow \uparrow \dots \uparrow \uparrow \uparrow a} _{b\mathrm {\ copies\ of\ } a}}

これを一般的に述べると、n 重の矢印演算子は、(n -1) 重の矢印演算子の反復として表すことができる[2]

a ↑↑ n  pieces of the arrow b = a ↑↑ ( n 1 )  pieces of the arrow a ↑↑ ( n 1 )  pieces of the arrow a ↑↑ ( n 1 )  pieces of the arrow a b  copies of  a {\displaystyle a\underbrace {\uparrow \uparrow \cdots \cdots \cdots \uparrow } _{n{\text{ pieces of the arrow}}}b=\underbrace {a\underbrace {\uparrow \uparrow \cdots \cdots \cdots \cdots \uparrow } _{(n-1){\text{ pieces of the arrow}}}a\underbrace {\uparrow \uparrow \cdots \cdots \cdots \cdots \uparrow } _{(n-1){\text{ pieces of the arrow}}}\cdots a\underbrace {\uparrow \uparrow \cdots \cdots \cdots \cdots \uparrow } _{(n-1){\text{ pieces of the arrow}}}a} _{b{\text{ copies of }}a}}

具体例を挙げると、14↑↑↑↑4 は 14↑↑↑14↑↑↑14↑↑↑14 である。

なお、矢印を使った指数の記法 a b = a b {\displaystyle a\uparrow b=a^{b}} も、クヌースの矢印記号の特殊例(一重矢印)として再解釈される。

定義

n 重の矢印演算子を n {\displaystyle \uparrow ^{n}} と略記することにする。このとき、クヌースの矢印表記は、次のように定義される。

a n b = { 1 , if  b = 0 a b , if  n = 1 a n 1 ( a n ( b 1 ) ) , otherwise  a , b Z , n N {\displaystyle a\uparrow ^{n}b={\begin{cases}1,&{\mbox{if }}b=0\\a^{b},&{\mbox{if }}n=1\\a\uparrow ^{n-1}\left(a\uparrow ^{n}\left(b-1\right)\right),&{\text{otherwise }}\forall a,b\in \mathbb {Z} ,\forall n\in \mathbb {N} \end{cases}}}

ただし、b ≥ 0である。なおa0 = 1なので、最初の2式の優先順位はどちらでもよい。

結合規則

クヌースの矢印(通常の指数計算である ab も含む)は右結合である。つまり、 a b c {\displaystyle a\uparrow b\uparrow c} と書かれたときこれは a ( b c ) {\displaystyle a\uparrow \left(b\uparrow c\right)} を表し、 ( a b ) c {\displaystyle \left(a\uparrow b\right)\uparrow c} ではない。

具体例を挙げると、

3 2 3 {\displaystyle 3\uparrow 2\uparrow 3}

3 ( 2 3 ) = 3 8 = 3 8 = 6561 {\displaystyle 3\uparrow \left(2\uparrow 3\right)=3\uparrow 8=3^{8}=6561}

だが、

( 3 2 ) 3 = 9 3 = 9 3 = 3 ( 2 × 3 ) = 3 6 = 3 6 = 729 {\displaystyle {\begin{aligned}\left(3\uparrow 2\right)\uparrow 3=&9\uparrow 3=9^{3}\\=&3\uparrow \left(2\times 3\right)=3\uparrow 6=3^{6}\\=&729\end{aligned}}}

ではない。

他の記法との関係

既に述べた通り、1重のクヌースの矢印は冪乗を表す。また、2重のクヌースの矢印はテトレーションを表す。

a b = a b {\displaystyle a\uparrow b=a^{b}}
a ↑↑ b = b a {\displaystyle a\uparrow \uparrow b={}^{b}a}

また、 n {\displaystyle \uparrow ^{n}} を用いてアッカーマン関数の一般解を表すことができる。

Ack ( n , b ) = { 2 n 2 ( b + 3 ) } 3 if  n 3 {\displaystyle \operatorname {Ack} \left(n,b\right)=\left\{2\uparrow ^{n-2}\left(b+3\right)\right\}-3\quad {\mbox{if }}n\geq 3}

ハイパー演算子は、積・和・後者関数も表せる以外は、 n {\displaystyle \uparrow ^{n}} を使ったクヌースの記法と等価である。

hyper ( a , n , b ) = a n 2 b if  n 3 {\displaystyle \operatorname {hyper} \left(a,n,b\right)=a\uparrow ^{n-2}b\quad {\mbox{if }}n\geq 3}

コンウェイのチェーン表記は、3連では n {\displaystyle \uparrow ^{n}} を使ったクヌースの矢印表記と等価だが、さらに長く続けることで、クヌースの矢印表記では簡潔に表せない、あるいは現実的に表せない大きな数、たとえばグラハム数の範囲などを表すことができる。

a b n = a n b {\displaystyle a\to b\to n=a\uparrow ^{n}b}

配列表記も3変数ではクヌースの矢印表記と等価だが、この配列表記をさらに長く続けた場合は、コンウェイのチェーン表記よりもはるかに効率的に数が爆発する。具体的には、4変数の配列表記でコンウェイのチェーン表記レベル、5変数でその拡張表記レベルとなり、6変数以上となるとそのレベルを超える。

{ a , b , n } = a n b {\displaystyle \{a,b,n\}=a\uparrow ^{n}b}

また、多角形表記も巨大数のレベルとしてはクヌースの矢印表記レベルの巨大数を作ることができ、ハイパーE表記も拡張表記でない段階ではクヌースの矢印表記と同程度の増加速度である。

フォントの都合による代替表記

コンピュータ上でのテキストとして表記する場合、フォントによっては↑のような記号が無い場合もあるため、a^^bのようにサーカムフレックスを並べる表記を行う場合がある。クヌース自身も、これを代替的あるいは簡便な記法として認めている。

指数表記 ab のかわりに a^b と書くのも、これと同じである。

脚注

[脚注の使い方]

注釈

  1. ^ 複数の宇宙の全質量を1個のブラックホールに圧縮しそれが蒸発した後に、ポアンカレの回帰定理に従い再びブラックホールができる時間。値を冪指数で表現すると 10 10 10 10 10 1.1 10 10 10 3883775501690 {\displaystyle {10}^{{10}^{{10}^{{10}^{{10}^{1.1}}}}}\approx {10}^{{10}^{{10}^{3883775501690}}}} であり、桁数が非常に大きいため、時間の単位をプランク時間のいずれにしても無視できる範囲で近似する。

出典

  1. ^ フィッシュ『巨大数論 第2版』インプレス R&D、東京、2017年。ISBN 9784802093194。http://gyafun.jp/ln/ 
  2. ^ a b c Knuth, D. E. (1976-12-17). “Mathematics and Computer Science: Coping with Finiteness” (英語). Science 194 (4271): 1235–1242. doi:10.1126/science.194.4271.1235. ISSN 0036-8075. https://www.sciencemag.org/lookup/doi/10.1126/science.194.4271.1235. 
  3. ^ S.O. (2017年2月2日). “大きすぎて全世界のインクを使っても書けない「巨大数」の世界”. QuizKnock inc.. 2021年3月28日閲覧。
  4. ^ “ギネスブックに載った世界一大きな数がヤバすぎる!”. 学生団体POMB. 2021年3月28日閲覧。
  5. ^ Galidakis, Ioannis and Weisstein, Eric W. “Power Tower”. Wolfram MathWorld. 2021年3月28日閲覧。
  6. ^ B. Randell and L.J. Russell, ALGOL 60 Implementation: The Translation and Use of ALGOL 60 Programs on a Computer. Academic Press, 1964. The design of the Whetstone Compiler, p.23 pp.25-26 p.49 p.52 p.61 pp.152-155 p.159 p.171 pp.273-274 p.280 p.287 pp.304-305 p.328 p.347

関連項目

数の例
表現法
表記
演算子
順序数階層
関連項目
  • 名前(英語版)
  • 歴史(英語版)
  • カテゴリ カテゴリ