Function of two sets Let $U$ be the set of all nonempty subsets of $[0,1]$ that are a union of finitely many  closed intervals (where an "interval" that is a single point does not count as an interval). Does there exist a function $f:U\times U\rightarrow U$ such that for any $A,B\in U$:
(a) $f(A,B) = f(B,A)$
(b) $f(A,B)$ has length (i.e. Lebesgue measure) less than $0.0001$.
(c) $f(A,B)\cap A$ has positive length.
(d)  The length of $f(X,B)\cap A$ is maximized at $X=A$.
This is a variant of this question with more restrictive conditions, so my guess would be that the answer is no. I posted the question on math.SE half a year ago where some remarks were made but the question remains unsolved.
 A: Update: this is not quite a complete answer, since (d) might not hold when $A_{\epsilon/2}$ and $B_{\epsilon/2}$ are not disjoint.
Let $\epsilon < 0.0001$. For $X \in U$, let $X_t$ be the "least" subset of $X$ of length $\min(t, \lvert X \rvert)$. In other words, $X_t$ has length $t$ (or is all of $X$) and contains every element of $X$ that is less than the maximum of $X_t$. For example, $([0,1/4] \cup [1/2, 1])_{1/2} = [0, 1/4] \cup [1/2, 3/4]$.
Define $$f(A, B) := A_{\frac{\epsilon}{2}} \cup B_{\frac{\epsilon}{2}}.$$
(a): This follows from the definition of $f$.
(b): $$\lvert f(A, B) \rvert = \frac{\min(\epsilon, \lvert A \rvert) + \min(\epsilon, \lvert B \rvert)}{2} \leq \epsilon < 0.0001.$$
(c): $f(A, B) \cap A \supset A_{\frac{\epsilon}{2}}$ and therefore has positive length.
(d): The length of $f(X, B) \cap A = (X_{\frac{\epsilon}{2}} \cap A) \cup (B_{\frac{\epsilon}{2}} \cap A)$ is maximized at $X=A$ if $A_{\epsilon/2}$ and $B_{\epsilon/2}$ are disjoint).
A similarly defined $f$ also works if $X_t$ is replaced with another canonically associated subset of $X$ of length $\min(t, \lvert X \rvert)$ (e.g. the "greatest" such subset) or if $\epsilon/2$ is replaced by smaller positive values.
