Given the matrices $X$ and $Y$ in $[0,1]^{n\times m}$, for $n > m > 3$, so that $X1_m=1_m$ and $Y1_m=1_m$, where $1_m$ denotes a $m$-length column vector of ones, find a matrix $Q$ in $R^{m\times m}$ so that $C(X,Y)=Q^TX^TYQ$ satisfies the following tree conditions:
$i$) $C(X,X)$ is diagonal with diagonal elements given by the the sum of rows of $X$
$ii$) The sum of the columns of $C(X,Y)$ equals the sum of rows of $X$
$iii$) The sum of the rows of $C(X,Y)$ equals the sum of rows of $Y$
What can be said about the uniqueness of the matrix $Q$?