> I want to maximize $$\Phi_g(w):=\sum_{i\in I}\sum_{j\in I}\int\lambda({\rm d}x)\int\lambda({\rm d}y)\left(w_i(x)p(x)q_j(y)\wedge w_j(y)p(y)q_i(x)\right)\sigma_{ij}(x,y)|g(x)-g(y)|^2$$ over all choices of $w=\left(w_1,\ldots,w_{|I|}\right)$ subject to $$\sum_{i\in I}w_i=1\tag1.$$ I guess this is usually solved by the method of Lagrange multipliers, but the shape of the integrand seems to be problematic. What can we do?
>
> If this problem is too hard, are we at least able to find a choice of $w$ yielding a sharp lower bound?

As usual, $a\wedge b:=\min(a,b)$. And it might be useful to rewrite $\Phi_g(w)$ using $2(a\wedge b)=a+b-|a-b|$.

The objects are defined as follows:

 - $(E,\mathcal E,\lambda)$ is a measure space
 - $I$ is a finite nonempty set
 - $p,q_i:E\to[0,\infty)$ are $\mathcal E$-measurable with $$\int p\:{\rm d}\lambda=\int q_i\:{\rm d}\lambda=1\tag2$$ for $i\in I$
 - $g\in L^2(p\lambda)$
 - $w_i:E\to[0,1]$ is $\mathcal E$-measurable with $$\{q_i=0\}\subseteq\{w_ip=0\}\tag3$$ for $i\in I$ with $$\{p\ne0\}\subseteq\left\{\sum_{i\in I}w_i=1\right\}\tag4$$
 - $\sigma_{ij}:E^2\to[0,\infty)$ is $\mathcal E^{\otimes2}$-measurable for $i,j\in I$ with $$\sigma_{ij}(x,y)=\sigma_{ji}(y,x)\;\;\;\text{for all }x,y\in E\text{ and }i,j\in I\tag5$$ and $$\sum_{j\in I}\int\lambda({\rm d}y)q_j(y)\sigma_{ij}(x,y)=1\tag6$$

> I'm primarily interested in finding the choice of $w=\left(w_1,\ldots,w_{|I|}\right)$ maximizing $\Phi_g(w)$ and satisfying $(3)$ and $(4)$, but if it's easier to deal with feel free to assume $(1)$ instead of $(4)$.