Thanks to all those who have submitted entries recently! Winners from recent months include James Waldby (for a very fast solution to the continuous Morse code recognition problem) and David Hull (for a program to find the highest-valued "sliding" word). Please email me (dougb@uiuc.edu) if you would like copies of these entries or of my own solutions.
Last month I asked for a program in ANSI C that prints its own source. Though I neglected to mention this detail, the intent here was not to write a program that simply dumps the source code file. To be more precise, let's say that I should be able to delete the source before running the program and still get the desired effect. The winning entry will be the shortest program (in characters) received before March 15, with ties broken by entry time.
Now for a new problem, which is for the second consecutive month, sadly, unoriginal. I received it in email some time ago.
Suppose x and y are two two-digit integers. Imagine a conversation between two computer scientists, Ed and Sandy, about those two integers:
Ed: "I know what x+y is, but I don't know the values of x and y." Sandy: "And I know what x*y is, but I don't know the values of x and y." Ed: "Oh really? Then in that case, I know the values of x and y." Sandy: "Oh really? Then I, too, know the values of x and y."
Assuming that Ed and Sandy are both perfectly logical people, what might x and y be? Can you find all possible (x,y) pairs? The winner of a fantastic Department of Computer Science coffee mug will be he or she who identifies the most (x,y) pairs. Ties will again be broken by time of entry. Questions or entries? Email dougb@uiuc.edu.