TITLE: Sup of measure of intersection points
QUESTION [9 upvotes]: This is a problem I've thought up myself while travelling in a car, and I have no idea how to solve it.
Let $f: [0,1] \to [0,1]$ be bijection. Consider unit square $[0,1] \times [0,1]$, and label one edge $x$ and the opposite edge $f(x)$. Connect all points $x$ in the $x$ edge to their corresponding points $f(x)$ in the $f(x)$ edge with straight lines. For any function $f(x)$ as described before, let $A(f)$ be the set of points where two or more lines intersect.
The question is this. If $\mu$ is the Lebesgue measure, when taken for all bijections $f(x)$ for which $\mu(A(f))$ exists,  what is $\sup \mu(A(f))$?
Clearly, considering
$$f(x) = \begin{cases} 
      x + 1/2 & 0< x < 1/2 \\
      x - 1/2 & x \geq 1/2\\
      1 & x = 0
   \end{cases}
$$
The square is illustrated in the image below

from which we get that
$$ \mu(A(f)) = 1/4$$
and so 
$$\frac{1}{4}\leq \sup \mu(A(f))\leq 1$$
The illustration below shows what the square with the lines looks like for $f(x) = 1-x$. In this case, $A(f)$ is clearly $\{(1/2,1/2)\}$ and so $\mu(A(f)) = 0$

REPLY [3 votes]: Infinity can be tricky, and this question turned out to be not about shape but about cardinality. 
The base of the proposed example is a counter-intuitive fact that a square contains as many points as a segment (speaking rigorously, the cardinality $\frak c$ of the segment,  called continuum is the same as that of the square). So we have sufficiently many points in the segment $[0,1]$ to represent all points of square $(0,1)\times (0,1)$ as intersection points generated by a bijection $f$ of the segment, see Appendix for a standard straightforward proof. It is highly non-descriptive, so if we shall require that the map $f$ is measurable then the value of the supremum may change. In particular, the problem remains open when there are countably many disjoint open intervals  $X_i=(x’_i,x’’_i)$ and disjoint open intervals $Y_i=(y’_i,y’’_i)$ such that $f$ monotonically maps $X_i$ onto $Y_i$ and $\mu([0,1]\setminus \bigcup X_i)= \mu([0,1]\setminus \bigcup X_i)=0$.
The base result has a remarkable history, which I have reconstructed from Abraham (Adolf) Fraenkel’s works as follows.   
Initially, in the naive understanding of infinity, all differences between transfinite numbers were not seen. Georg Cantor, the founder of the set theory, also thought that the one-dimensional continuum is denumerable, that is $\frak c=\aleph_0$, where $\aleph_0$ denotes the cardinality of the set of natural numbers. Nevertheless, in his paper from 1874 he proved that $\frak c>\aleph_0$. Namely, for each sequence of real numbers, Cantor constructs, using nested segment principle, a number that does not belong to it. That is the segment and the natural numbers are not equivalent, despite that both are infinite sets. His first guess to seek even higher transfinite cardinals was progressing from the one-dimensional continuum to multi-dimensional continua. When his attempts to prove $\frak c\cdot \frak c>\frak c$ remained unsuccessful he conferred with some leading mathematicians who advised him that this inequality was self-evident and required no proof; otherwise there would be no distinction between functions of one and of more variables or between different dimensions. Based on this reason, one of Cantors friends in Berlin said him that his idea to construct a mapping of a one-dimensional continuum to a multidimensional continuum is is absurd by default. Nevertheless, at last in 1877 Cantor proposed such a mapping by means of decimal expansions (his first proof was suffered from the shortcoming; then the publication of a correct proof  in 1878 met with a delay caused by Kronecker and was finally made possible only with the help of Weierstrass). The result, refuting his initial guess $\frak c\cdot \frak c>\frak c$, was unexpected even for for Cantor himself, who wrote to Dedekind at 1877, July 21 : “je le vois, mais je ne le crois pas” (“I see it, but I do not believe it”). 
Appendix 
We have $A(f)=(0,1)\times (0,1)$ for the map $f$ determined as follows. Let $X$ be a dence set of $[0,1]$ such that $|X|=|[0,1]\setminus X|=\frak c$ (for instance, we can put $X=[0,1]\setminus C$, where $C$ is the Cantor set), and $\{z_\alpha:\alpha<\frak c\}$ be an enumeration of points of the open square $(0,1)\times (0,1)$. By transfinite induction for each $\alpha<\frak c$ we can define subsets $X_\alpha=\{x’_\beta, x’’_\beta:\beta<\alpha\}$ and $Y_\alpha=\{y’_\beta , y’’_\beta:\beta<\alpha\}$ of $X$ and distinct points $x'_\alpha, x’’_\alpha\in X\setminus X_\alpha$, $y'_\alpha, y’’_\alpha\in X\setminus Y_\alpha$ such that $z_\alpha$ is an intersection point of the segments $[(x’_\alpha,0), (y’_\alpha,1)]$ and $[(x’’_\alpha,0), (y’’_\alpha,1)]$. It remains to put $f(x’_\alpha)=y’_\alpha$,  $f(x’’_\alpha)=y’’_\alpha$ for each $\alpha<\frak c$ and $f|[0,1]\setminus X_\frak c$ any bijection between $[0,1]\setminus X_\frak c$ and $[0,1]\setminus Y_\frak c$.