Subset which maximizes $\frac{\int_E\min(p(x), q(x))}{\int_E\max(p(x), q(x))}$? Let $p(x), q(x)$ be two p.d.f.s of distributions on $\mathbb{R}$.
I am interested in finding the subset $E$ that maximizes the quantity
$$\frac{\int_{E}\min(p(x),q(x))\mathrm{d}x}{\int_{E}\max(p(x),q(x))\mathrm{d}x}.$$
In fact, I'm mostly interested if this quantity has been studied before --- I have some current progress in characterizing the set $E$ (one should add points to it when $p(x)$ and $q(x)$ are close multiplicatively, meaning $p(x)/q(x)$ or its inverse are small), and don't mind on working on this more myself, but it definitely seems like the kind of thing that might be well-known since the 60's.
The context this comes up in (a cryptographic one) is probably not particularly useful in finding pointers to this, as I expect (if it has shown up before) it would be in a fairly different field.
 A: You want to maximize
\begin{equation*}
    R(E):=\frac{\int_E\ m}{\int_E\ M}
\end{equation*}
over all admissible sets $E$, that is, over all Lebesgue-measurable sets $E$ such that $\int_E\ M>0$, where
\begin{equation*}
    m(x):=\min(p(x),q(x)),\quad M(x):=\max(p(x),q(x)).
\end{equation*}
For
\begin{equation*}
    r(x):=\frac{m(x)}{M(x)} 
\end{equation*}
and real $c$, let
\begin{equation*}
    E_c:=\{x\colon r(x)\ge c\}
\end{equation*}
and then
\begin{equation*}
    s:=\sup\Big\{c\colon E_c\text{ is admissible}\Big\}
    =\sup\Big\{c\colon \int_{E_c}\ M>0\Big\}.
\end{equation*}
Note that $s$ is the essential supremum of $r$ with respect to the measure $\mu$ given by $\mu(dx)=M(x)dx$. In particular, we have $s\in[0,1]$, since $0\le r\le1$. Also, $r\le s$ $\mu$-a.e., that is, almost everywhere with respect to the measure $\mu$. So, $m\le sM$ $\mu$-a.e., and hence $\int_E\ m\le s\int_E\ M$ for any Lebesgue-measurable set $E$, which implies
\begin{equation*}
    R(E)\le s
\end{equation*}
for all admissible sets $E$.
Take now any real $a<s$. Then the set $E_c$ is admissible and
$\int_{E_a}m=\int_{E_a}rM\ge a\int_{E_a}M$, whence $R(E_a)\ge a$, for any real $a<s$.
Thus,
\begin{equation*}
    \sup\{R(E)\colon E\text{ is admissible}\}=s. \tag{1}
\end{equation*}

If the set $I:=\{x\colon M(x)>0\}$ is a (possibly infinite) interval and the pdf's $p,q$ are continuous on $I$, then $p(z)=q(z)>0$ for some $z\in I$ (otherwise, we would have $p<q$ on $I$ or $p>q$ on $I$, which would contradict $p$ and $q$ being pdf's). So, in this case $s=1$.
In general (and usually), the supremum in (1) will not be attained. For instance, consider $p(x)=2x\,1(0<x<1)$ and $q(x)=2(1-x)\,1(0<x<1)$. Then the supremum in (1) is $s=1$ and is not  attained -- because then $r<1$ almost everywhere and hence $R(E)<1=s$ for all admissible $E$.
