Let's say I have a set of $N$ members (not ordered) $x_i$, and suppose $N$ is even. To each point are associated $k$ characteristics $x_{ij}$, $j=1,...,k$. There is another additional characteristic $x_{i0}$ which is boolean, and there are $N/2$ members that are $0$ and $N/2$ that are $1$. I want to maximize a certain functional, that is
$$H[f(x)]=\sum_{i=1}^{N/2} g[x_i,f(x_i)] + \sum_{i=\frac{N}{2}+1}^{N}h[x_i,f(x_i)]$$
For certain functions $g$ and $h$.We can assume that $g$ and $h$ aren't arbitrary functions of the specific member but just of its characteristics, that is
$$g(x_i,f(x_i)=y_i)=g(x_{i1},...,x_{ik},y_{i1},...,y_{ik})$$
Further, $f(x_i)=y_i$ has to be of the opposite class (if $x_{i0}=0$ then $y_{i0}=1$) and has to be one to one between the two classes. I don't know much about $g$ and $h$, but I do know that for certain characteristics ($x_{i1}$ say) both $g$ and $h$ are strictly monotone increasing when all other variables are held constant.
What can I say in general about this problem? How do I impose the constraints? Theoretical observations, references and numerical schemes are all very helpful.