I have a mixed integer programming problem, which I believe may be convex.
Namely, I have a matrix $R$, where rows are seats and columns are riders. The idea is optimally seat riders on the bus such that distance between riders is maximized; however, each rider has a priority score (elderly, pregnancy, disability). This prioritizes distance between passengers for some over others.
The rows of $R$ are constrained such that they sum to 1. This constraint enforces that only one rider is assigned to a given seat. I use the below formula when computing the priority score for a given rider in a given seat, $seat_i$. Because the row vector sums to one, this process effectively retrieves the priority score of the appropriate rider.
$\Sigma_{r}^{riders} R[seat_i, rider] * priority_{rider}$
Now, on to my actual question: When I'm compute the joint priority between any two riders, I use the above formula for $rider_i$ and $rider_j$ and multiply these terms together. My question is- is this product (of two summations of scaled variables) a convex function?
I ask because I intend on using a Quadratic Programming solver to approach this problem if so.
Suppose that $x$ and $y$ are nonnegative variables and $a$ is a positive constant, and consider the function $f(x,y)=a\cdot x\cdot y.$ Let $(\bar{x},\bar{y})=(0,1)$ and $(\hat{x},\hat{y})=(1,0).$ If $f()$ were convex, we would have $$f\left(\frac{1}{2} \bar{x} + \frac{1}{2} \hat{x}, \frac{1}{2} \bar{y} + \frac{1}{2} \hat{y}\right) \le \frac{1}{2} f(\bar{x}, \bar{y}) + \frac{1}{2} f(\hat{x}, \hat{y}),$$ which plainly does not hold. So the positively weighted product of two nonnegative variables is not convex.