Can the following program be shortened? ... def h(n,m): E=n, while (E!=())*m>0:n=h(n+1,m-1);E=E[:-1]+(E[-1]>0)*(E[-1]-1,)*n return n h(9,9)
Note: Although it halts eventually in principle, this program can't be expected to terminate on any machine in the universe, as it computes a number larger than Graham's number -- assuming Python is extended (if necessary?) to access unbounded storage. Besides using one-letter names and no unneeded whitespace, can something more be done to shorten it? ("Obfuscating" the code would be okay.) Also, I'm not really sure how best to measure a program's length, but this one is now 98 bytes long (or 102 bytes, depending on how newlines are handled). Is there a better measure of program-length? Thanks for any feedback. -- http://mail.python.org/mailman/listinfo/python-list