Programming Brain Teaser #6: Fixed-point principle

9 May 2013 by Roman Kaspar - Category: Puzzles

As promised last time, let’s do something more serious today…

Let a be any expression. We will call x the fixed point of expression a if x names ax. (Reminder: lower-case letters in our programming language represent a combination of upper-case letters.)

The fixed-point principle says that for each expression a there exists its fixed point x. Furthermore there is a (quite simple) “manual” for constructing the fixed point x of any expression a.

So the question of the day is: can you find that “manual” proving fixed-point principle?
(E.g. a program x that names ABCx, for a = ABC.)



To see the correct solution, click 'Show' button... SelectShow

« - »