TITLE: If $f[A]$ and $A$ intersect for (most) $A \subset \mathbb{R}$, then how far is $f$ from the identity?
QUESTION [14 upvotes]: $\textbf{Definition}$: We say $f:\mathbb{R} \to \mathbb{R}$ is intersecting if for every nonempty $A \subset \mathbb{R}$, $f[A] \cap A \neq \varnothing$.

There is only one intersecting function: the identity. The reason for this is that $f[\{x\}] \cap \{x\} \neq \varnothing$ forces $f(x)=x$.
If we impose restrictions on the subsets $A$ we consider (say, for instance, we rule out singletons), must $f$ still be the identity? Let's try this. We can first introduce some definitions.

$\textbf{Definition:}$ For any cardinal $\ell$, we say $f:\mathbb{R} \to \mathbb{R}$ is $\ell$-intersecting if for every nonempty $A \subset \mathbb{R}$ with $|A| \geq \ell$, $f[A] \cap A \neq \varnothing$.
$\textbf{Definition:}$ For any $f:\mathbb{R} \to \mathbb{R}$, its deviation is the cardinality of the set
$\{x \in \mathbb{R} : f(x) \neq x\}$.

I'm going to write down some results for the $2$-intersecting case. Suppose $f$ has the property that for every $A \subset \mathbb{R}$ with $|A| \geq 2$ that $f[A] \cap A \neq \varnothing$. There indeed exists a non-identity example here, one with deviation $3$, in fact. Let $f(x) = x$ for $x \in \mathbb{R} \setminus \{1,2,3\}$ and let $f(1)=2, f(2)=3, f(3)=1$. Is there a $2$-intersecting $f$ with deviation $\geq 4$? No. The argument for this is combinatorial. Suppose an $f$ with this property existed, and let $A=\{x_1, x_2, x_3, x_4\}$ be a set of four elements with $f(x_i) \neq x_i$ for each $x_i \in A$. We first note that $f$ restricted to $A$ defines a function $f_{A}:A \to A$. To justify this claim, we can argue by contradiction. Suppose for some $x_i \in A$ that $f(x_i) = y \notin A$. Let $x_j, x_k$ be distinct elements in $A$, also both distinct from $x_i$. Then since $f[\{x_i, x_j\}] \cap \{x_i, x_j\} \neq \varnothing$, and  $f[\{x_i, x_k\}] \cap \{x_i, x_k\} \neq \varnothing$, it's easy to see this implies $f(x_k) = f(x_j) = x_i$ , which implies $f[\{x_k, x_j\}] \cap \{x_k, x_j\} = \varnothing$, contradiction. We also note the restricted function $f_{A}$ is injective. To see this, suppose, say, $f(x_i) = x_{m}$ and $f(x_j) = x_{m}$, and each of $i,j, m$ are distinct. Then $f[\{x_i, x_j\}] \cap \{x_i, x_j\} = \varnothing$, contradiction. Since $A$ is finite, this implies it's bijective too. Hence $f_{A}$ corresponds to a permutation in $S_4$ without fixed points. It cannot have two cycles, since if $x_j, x_i$ are in distinct two-cycles, then $f[\{x_i, x_j\}] \cap \{x_i, x_j\} = \varnothing$. Hence it's cyclic. But if it's cyclic, then $f[\{x_{i_2}, x_{i_4}\}] \cap \{x_{i_2}, x_{i_4}\} = \varnothing$, where $x_{i_2}, x_{i_4}$ are respectively the second and fourth elements of the cycle. This establishes the contradiction.
What eludes me is the general case. The combinatorics seem to get harder if $\ell \geq 3$.

$\textbf{Problem 1:}$ The finite case. Let $\ell$ be a finite cardinal (i.e., a positive integer). Then is it true that any $\ell$-intersecting map $f:\mathbb{R} \to \mathbb{R}$ has finite deviation? If this is true (which I suspect), is there a closed form for the largest possible deviation in terms of $\ell$?
$\textbf{Problem 2:}$ The infinite case. What is the maximum deviation of an $\aleph_{0}$-intersecting map $f:\mathbb{R} \to \mathbb{R}$? What is the maximum deviation of a $\mathfrak{c}$-intersecting map $f:\mathbb{R} \to \mathbb{R}$? In particular, are there such functions with infinite deviation?

You will notice that we don't really use any of the analytic or algebraic structure of $\mathbb{R}$ here, so really these notions can be generalized to functions $f:X \to Y$ for arbitrary sets $X,Y$. We could, however, ask different kinds of questions similar to the ones described above which make use of the structure of $\mathbb{R}$. Instead of considering subsets $A$ with sufficiently large cardinality, we could alternatively consider subsets $A$ which are (nondegenerate) intervals, as has been suggested in the comments, or possibly subsets which are nonempty open sets. In a broad sense, we're interested in finding "highly non-identity" functions $f$ satisfying $f[A] \cap A \neq \varnothing$ for $A$ in some 'large' collection of subsets of $\mathbb{R}$. If you have the solution to a different problem, but one which is similar in the broad sense described above, you're free to share it.

REPLY [3 votes]: In antkam's answer, it's conjectured that an $\ell$-intersecting function has deviation at most $3(\ell-1)$. I will prove that in this answer. It's tight, by considering a permutation with $\ell-1$ $3$-cycles.

Suppose that $f$ is $\ell$-intersecting. Consider the directed graph $G$ with vertex set $V = \{ x : f(x) \ne x\}$ (the non-fixed points of $f$) and an edge from $x$ to $f(x)$ whenever $x\in V$ and $f(x) \in V$.
The weak components of $G$ are either 

trees oriented toward a root $r$ such that $f(r) \notin V$, or 
unicyclic components: a directed cycle, with possibly a tree rooted at each of the cycle's vertices. 

A set $A$ such that $f[A] \cap A = \varnothing$ is exactly a subset of $V$ which is an independent set in $G$: we can pick at most one endpoint of each edge. This ignores edge orientations, so from now on, we will not care about those.
All trees are bipartite, so for every component that's a tree, we can $2$-color it, and add the larger of the two color classes to $A$. The same works for a unicyclic component with an even cycle. In such cases, a $k$-vertex component contributes at least $\frac k2$ vertices to $A$.
In other unicyclic components, we can delete one vertex from the cycle and be left with a bipartite graph, which we can treat as above. In such cases, a $k$-vertex component contributes at least $\frac{k-1}{2}$ vertices to $A$. When $k$ is even, this guarantees $\frac k2$ vertices, same as before. When $k$ is odd, because $k > 1$ for any component with a cycle, we have $k\ge3$ and therefore $\frac{k-1}{2} \ge \frac k3$.
So in all cases, a $k$-vertex component can contribute at least $\frac k3$ vertices to an independent set $A$; therefore we can find an independent set of total size at least $\frac{|V|}{3}$. However, because $f$ is $\ell$-intersecting, we cannot find an independent set of size $\ell$. Therefore $\frac{|V|}{3} \le \ell-1$, or $|V| \le 3(\ell-1)$. Since $|V|$ is exactly the deviation of $f$, we are done.