real analysis

A Quasiperiodic Counterexample

The problem Consider a function f:[0,1]R that is continuous with f(0)=f(1). It is possible to prove that for each nN, there exist xn,yn[0,1] such that |xnyn|=1/n and f(xn)=f(yn). This means the set of points at which the function is not one-to-one is at least countably infinite. Providing the proof is part of Exercise 4.

A Function Golf Challenge

“Code golf” is the practice of trying to solve a specific problem or implement a specific algorithm in the smallest possible number of characters of a given programming language. A related concept is exploring what can be accomplished with a tweet-length program (for example see here), though “tweet-length” can be a moving target. In the spirit of code golf, I propose the following “function golf” challenge. What is the simplest function (defined on the real numbers) that is continuous everywhere except on a given subset of the reals?