Re: プログラムの読解力とC言語の理解度
I wrote:
> くだんのプログラムもこの入選作: 1988, Ian Phillipps
> http://www.tw.ioccc.org/1988/phillipps.c
> http://www.tw.ioccc.org/1988/phillipps.hint
この phillipps.hint(選評)には:
The program is smaller than even the 'compressed' form of its output,
and thus represents a new departure in text compression standards.
なんて書いてありますね。
で、この出力は渋谷さんも書かれているように、クリスマスキャロルの
Twelve Days of Christmas です:
> == 以下出力 ==
> On the first day of Christmas my true love gave to me
> a partridge in a pear tree.
...(以下略)...
この歌詞は大雑把に言えば:
A 1
A 2 1
A 3 2 1
...
A 11 10 9 8 7 6 5 4 3 2 1
A 12 11 10 9 8 7 6 5 4 3 2 1
(A = "On the n-th day of Christmas my true love gave to me")
という構造をしていて、少ない材料で長い歌詞が作れるという点で
効率がいいし、再帰的処理にも向いています。
それで思い出したんですが、CACM の 1984 年4月号に、Donald Knuth
が書いた Complexity of Songs というジョーク論文があって、
それがまさしくこれを取り上げています。
http://portal.acm.org/citation.cfm?id=358042&jmp=cit&coll=ACM&dl=ACM&CFID=20632371&CFTOKEN=84979294#CIT
# 上の URL がこわれていたら、http://portal.acm.org/ に行って
# Complexity of Songs, Donald Knuth で検索してみてください。
いくら Knuth 大先生とはいえ、よう CACM がこんなもん載せたなと思うけど、
4月号だから April Fool ということなのかな。
中身は真面目半分、ジョーク半分ですごく面白いですよ。
# 例えば参照文献には怪しげなのがいくつもあるし、
# National Institute of "W"ealth から補助を受けた研究だそうな。
(平賀@筑波大)
Fnews-brouse 1.9(20180406) -- by Mizuno, MWE <mwe@ccsf.jp>
GnuPG Key ID = ECC8A735
GnuPG Key fingerprint = 9BE6 B9E9 55A5 A499 CD51 946E 9BDC 7870 ECC8 A735