Sum of weighted cosine functions (2)

234 Views Asked by At

I had written a question but I did not formulate the problem correctly (sorry). The last question is in this link. I am writing the problem again and I would appreciate any help.

Assume $\theta_{ij}$ and $b_{ij}>0$ are known values. I want to calculate $\phi_i$ values so that the following function is maximized: $$f= \sum_{i=1}^n \sum_{j= i+1}^{n+1} b_{ij}\cos\bigg((\phi_i - \phi_j) + \theta_{ij}\bigg).$$

For example assuming $n=2$, I have following expression for $f$:

$$f = b_{12}\cos\bigg((\phi_{1} -\phi_{2})+\theta_{12}\bigg) + b_{13}\cos\bigg((\phi_{1} -\phi_{3})+\theta_{13}\bigg) + b_{23}\cos\bigg((\phi_{2} -\phi_{3})+\theta_{23}\bigg)$$

For this example I tried to set $\phi_{i} - \phi_j = -\theta_{ij}$ and write the equations in matrix form $Ax=B$. I get the following set of equations to solve $$ \begin{bmatrix} 1& -1& 0\\ 1& 0& -1\\ 0& 1& -1 \end{bmatrix} \begin{bmatrix} \phi_1 \\ \phi_2 \\ \phi_3 \end{bmatrix} = \begin{bmatrix} -\theta_{12} \\ -\theta_{13} \\ -\theta_{23} \end{bmatrix} $$ however, clearly it cannot be solved because the rank of coefficient matrix $A$ is $2$.

Could you please advice me on a way to maximize the $f$?

Thanks in advance!

1

There are 1 best solutions below

0
On

As $A$ doesn't have full rank, either there are infinitely many possible solutions or the system is inconsistent and there are no solutions. Just let $\phi_3=a$. Your solutions look like $$ \phi_1=a-\theta_{13},\quad \phi_2=a-\theta_{23},\quad \phi_3=a $$ Now we must have $$(a-\theta_{13})-(a-\theta_{23})=-\theta_{12}\implies \theta_{12}+\theta_{23} =\theta_{13}$$ If the above holds then there are one solution for each $a$ you choose so there are infinitely many solutions otherwise there is no solution and the above method can't be used to maximize $f$. In other words as soon as you choose $\phi_1-\phi_2$ and $\phi_2-\phi_3$, $\;\phi_1-\phi_3=(\phi_1-\phi_2)+(\phi_2-\phi_3)$ gets chosen.

You can maximize $f(\phi_1,\phi_2,\cdots,\phi_n)$ numerically using gradient ascent.