An exercise in transfinite magic

In my hometown there is a university called SUSU. And in this university regular math contests (link in Russian) are held, organized by A. Yu. Evnin. The following problem appeared in one of these contests:

Problem 1. A function f: \mathbb {R} \to \mathbb {R} has the following property: every straight line on the plane \mathbb {R}^2 intersects the graph of f and the parabola y = x^2 at the same number of points. Prove that f(x) = x^2 for every x \in \mathbb {R}.

The solution is quite straightforward, I am not going to write it down. It is probably enough to say that it heavily exploits the convexity of y = x^2.

This post is not about problem 1. It is about the next thing that comes to mind:

Problem 2. Two functions f, g: \mathbb {R} \to \mathbb {R} have graphs F and G such that for every straight line l \subset \mathbb {R}^2: |l \cap F| = |l \cap G| < \infty. Does it follow that f and g are the same function?

If you think about this one for a minute, I’m sure you’ll find it much more challenging than problem 1. This whole post is about solving problem 2. If you want to give it a try yourself, this is the last point in the text where you can still do this without knowing the answer.

Read the rest of this entry »