This is an answer to question 2. Write $R=Q'Q$, where $Q=[q_1,\dots,q_n]$, a square matrix with columns $q_1,\dots,q_n$. Let $v_i$ and $r_i$ denote the coordinates of the vectors $v$ and $r$. Then the problem can be rewritten as follows: maximize $\|Qv\|=\|\sum_i v_iq_i\|$ given $\|q_i\|^2=r_i$ for all $i$. Clearly, $\|Qv\|\le\sum_i |v_i|\,\|q_i\|=\sum_i|v_i|\,\sqrt{r_i}$. On the other hand, $\|Qv\|=\sum_i\|v_i\|\,\sqrt{r_i}$ and $\|q_i\|^2=r_i$ for all $i$ if $q_i=(\text{sgn}\,v_i)\sqrt{r_i}u$ for all $i$, where $u$ is any unit vector, and $\text{sgn}\,v$ is defined as $1$ if $v\ge0$ and as $-1$ if $v<0$. So, \begin{align} \sup\{v'Rv\colon R>0, \text{diag}(R)= r\} &=\sup\{\|Qv\|\colon Q=[q_1,\dots,q_n], \|q_i\|^2=r_i\ \forall i\}^2 \\ &=\Big(\sum_i|v_i|\,\sqrt{r_i}\Big)^2. \end{align}
Iosif Pinelis
- 127.8k
- 8
- 107
- 229