Hints for the Challenge:

Below, you can find another hint for the Challenge.

You should only get here after reading, digesting, and applying the .

Hint

The approach so far relied on programs of a special form. They consist of a bunch of statements executed one after the other. They 'reuse' nothing: no loops, no calls of user-defined functions, no variables. Consequently, they always produce output that is strictly less in size than the size of the program itself.

Consider, for instance, the program fragment writeln('abc');. The output consists of abc only, and the characters writeln(' and '); are all overhead that does not appear in the output.

Take a look at the example programs that output Hello World! twice ():

and if you are not afraid of user-defined functions ():

Using this mechanism, a program can produce output of which the size equals or even exceeds the size of the program itself.

If you pursue the form of the first example above, then the program will no longer start with a write function call. It would be more something like:

which outputs ():

Note that we have put the entire program on one line to avoid (for the moment) the complication of printing multiple lines from a single string.

You need to play a bit with the string 'SSS' and the statements write('aaa'); and write('bbb'); (for instance, you also need to output quotes somewhere). Can you proceed from here?

Try your program in the machine, and see if you can extend it to a complete solution.

Apply the Hint

It is your turn ...

Need Another Hint?

If you tried this hint, or do not see how it helps, then you are ready for the .


Valid HTML 4.01 Transitional

Copyright ©2009, Tom Verhoeff, T.Verhoeff@TUE.NL