16
Write a program that outputs all 64 layers of this representation of Graham's number from Wikipedia:
Your output must exactly match this ASCII version (in which ^
represents Knuth's up-arrows and combinations of slashes and underscores represent the large horizontal curly brackets):
3^^...............................................................................................................................^3
\_______________________________________________________________ _______________________________________________________________/
\/
3^^.............................................................................................................................^3
\______________________________________________________________ ______________________________________________________________/
\/
3^^...........................................................................................................................^3
\_____________________________________________________________ _____________________________________________________________/
\/
3^^.........................................................................................................................^3
\____________________________________________________________ ____________________________________________________________/
\/
3^^.......................................................................................................................^3
\___________________________________________________________ ___________________________________________________________/
\/
3^^.....................................................................................................................^3
\__________________________________________________________ __________________________________________________________/
\/
3^^...................................................................................................................^3
\_________________________________________________________ _________________________________________________________/
\/
3^^.................................................................................................................^3
\________________________________________________________ ________________________________________________________/
\/
3^^...............................................................................................................^3
\_______________________________________________________ _______________________________________________________/
\/
3^^.............................................................................................................^3
\______________________________________________________ ______________________________________________________/
\/
3^^...........................................................................................................^3
\_____________________________________________________ _____________________________________________________/
\/
3^^.........................................................................................................^3
\____________________________________________________ ____________________________________________________/
\/
3^^.......................................................................................................^3
\___________________________________________________ ___________________________________________________/
\/
3^^.....................................................................................................^3
\__________________________________________________ __________________________________________________/
\/
3^^...................................................................................................^3
\_________________________________________________ _________________________________________________/
\/
3^^.................................................................................................^3
\________________________________________________ ________________________________________________/
\/
3^^...............................................................................................^3
\_______________________________________________ _______________________________________________/
\/
3^^.............................................................................................^3
\______________________________________________ ______________________________________________/
\/
3^^...........................................................................................^3
\_____________________________________________ _____________________________________________/
\/
3^^.........................................................................................^3
\____________________________________________ ____________________________________________/
\/
3^^.......................................................................................^3
\___________________________________________ ___________________________________________/
\/
3^^.....................................................................................^3
\__________________________________________ __________________________________________/
\/
3^^...................................................................................^3
\_________________________________________ _________________________________________/
\/
3^^.................................................................................^3
\________________________________________ ________________________________________/
\/
3^^...............................................................................^3
\_______________________________________ _______________________________________/
\/
3^^.............................................................................^3
\______________________________________ ______________________________________/
\/
3^^...........................................................................^3
\_____________________________________ _____________________________________/
\/
3^^.........................................................................^3
\____________________________________ ____________________________________/
\/
3^^.......................................................................^3
\___________________________________ ___________________________________/
\/
3^^.....................................................................^3
\__________________________________ __________________________________/
\/
3^^...................................................................^3
\_________________________________ _________________________________/
\/
3^^.................................................................^3
\________________________________ ________________________________/
\/
3^^...............................................................^3
\_______________________________ _______________________________/
\/
3^^.............................................................^3
\______________________________ ______________________________/
\/
3^^...........................................................^3
\_____________________________ _____________________________/
\/
3^^.........................................................^3
\____________________________ ____________________________/
\/
3^^.......................................................^3
\___________________________ ___________________________/
\/
3^^.....................................................^3
\__________________________ __________________________/
\/
3^^...................................................^3
\_________________________ _________________________/
\/
3^^.................................................^3
\________________________ ________________________/
\/
3^^...............................................^3
\_______________________ _______________________/
\/
3^^.............................................^3
\______________________ ______________________/
\/
3^^...........................................^3
\_____________________ _____________________/
\/
3^^.........................................^3
\____________________ ____________________/
\/
3^^.......................................^3
\___________________ ___________________/
\/
3^^.....................................^3
\__________________ __________________/
\/
3^^...................................^3
\_________________ _________________/
\/
3^^.................................^3
\________________ ________________/
\/
3^^...............................^3
\_______________ _______________/
\/
3^^.............................^3
\______________ ______________/
\/
3^^...........................^3
\_____________ _____________/
\/
3^^.........................^3
\____________ ____________/
\/
3^^.......................^3
\___________ ___________/
\/
3^^.....................^3
\__________ __________/
\/
3^^...................^3
\_________ _________/
\/
3^^.................^3
\________ ________/
\/
3^^...............^3
\_______ _______/
\/
3^^.............^3
\______ ______/
\/
3^^...........^3
\_____ _____/
\/
3^^.........^3
\____ ____/
\/
3^^.......^3
\___ ___/
\/
3^^.....^3
\__ __/
\/
3^^...^3
\_ _/
\/
3^^^^3
Notice that there are 64 layers, that there are no trailing spaces, and that two ^
occur before the dots and only one occurs after.
The MD5 hash of your output should precisely be c84d0e20eac2a7f891ab42a8eb77759f
, or 1ad3b10d06e38693436c14958b2c47a8
if there is a trailing newline (which is ok).
The shortest code in bytes wins. Output to stdout. There is no input.
3Why are they dots and not more up-arrows? I'm pretty sure the purpose of the ellipses in the picture was just to show the missing arrows. – raptortech97 – 2014-08-08T15:12:16.430
4@raptortech97 Because there's a LOT of missing arrows. Graham's number is bloody massive. I'm hnonestly curious to see what languages can actually handle it. – fuandon – 2014-08-08T15:15:31.433
4The ellipses represent numbers of arrows that aren't even representable without using up-arrow notation – Eric Tressler – 2014-08-08T15:16:45.543
Ah... yeah I just read the Wikipedia page and I get it now. – raptortech97 – 2014-08-08T15:17:36.363
2@fuandon You won't get any language to actually compute the number, even if you allowed for a universe sized computer, it's just plain too big. I suppose you could calculate an arbitrarily large amount the rightmost digits, but that just isn't the same. – Tally – 2014-08-08T15:58:23.633
Would this be considered [tag:ascii-art]? – NinjaBearMonkey – 2014-08-08T16:31:37.060
10It might be worth giving out the MD5 hashes for quick verification:
1ad3b10d06e38693436c14958b2c47a8
as given by grc, orc84d0e20eac2a7f891ab42a8eb77759f
if the final newline character can be omitted. – comperendinous – 2014-08-08T18:18:13.463I believe Graham's number requires more electrons than exists in the universe to represent in binary therefore languages like Tcl and Ruby can do it in theory because the specifications of the language doesn't limit the size of integers but practically you'd run out of RAM. – slebetman – 2014-08-09T00:31:09.310
Of course, the much more interesting task of actually computing Graham's number (assuming super-naturally memory resources etc.) has been covered elsewhere already.
– ceased to turn counterclockwis – 2014-08-09T10:46:06.9631I am a bit disappointed with the expected output. Would be a nicer challenge, if the program was expected to output the actual number. As @slebetman pointed out, there are languages, which could do it. (Implementation limitations prevent the program from actually running to completion, but the program can still be written, and sizes can be compared.) – kasperd – 2014-08-09T23:55:59.427
@kasperd There is already a challenge like that.
– Calvin's Hobbies – 2014-08-10T00:33:07.493