# Optimize a fractional multivariate function

Consider the following optimization problem:

$$\max\limits_\mathbf{w} \frac{\frac{\sum_i w_i}{2} - \sum_i w_ip_{i}}{(\sum_i w_i(1 - p_{i})p_{i})^\frac{1}{2}}$$ s.t. $$\mathbf{w} = [w_1, w_2,..., w_M ]^T \in \{0,1\}^M, \mathbf{p} = [p_1, p_2,..., p_M ]^T, 0.5 \leq p_i \leq 1$$

I was initially trying to find out whether the objective function is convex or concave after removing the integer constraint and no luck.

So is the objective function convex without the integer constraint? If not, how can we optimize the objective?

• The $p_i$ are given fixed numbers? Mar 25, 2019 at 22:04
• Yes. The $p_i$ are given fixed numbers ranging from $0.5$ to $1$ Mar 26, 2019 at 6:12

The objective function is not convex nor concave. However, since you mentioned that $$p_i\geq 0.5$$, the numerator is non-positive and the denominator is non-negative.
Thus, the objective can be replaced by minus its square, namely, $$-\frac{(\tfrac{1}{2} \sum_i w_i - \sum_i w_i p_i)^2}{\sum_i w_i(1-p_i)p_i}$$
Moreover, in your case you might have a zero denominator. So I believe you need a constraint on $$\mathbf{w}$$ to ensure that it cannot happen.