- $\vec{a}\cdot\vec{b} \approx c$
- $\vec{\alpha} \cdot \vec{\beta} = c$
- $\vec{\alpha}$ is close to $\vec{a}$ and $\vec{\beta}$ is close to $\vec{b}$
Given $\vec{a}$, $\vec{b}$ and c, how to find $\vec{\alpha}$, $\vec{\beta}$ quickly?
If necessary, I can assume distance between $\vec{\alpha}$ and $\vec{a}$ is usually much smaller than distance between $\vec{b}$ and $\vec{\beta}$.
Each vector has about 10 - 15 elements but I have to do this for about 10^4 vectors.
If probability should sum to 1 is the constraint, I can normalize the probabilty after each (or several) optimization step to control the numerical error. But I can't do the same thing for this constraint.
Lagrange multipliers and Linearization of the constraints give:
$ \vec{b} \cdot \vec{\alpha} + \vec{a} \cdot \vec{\beta} = \vec{\alpha} \cdot \vec{\beta} + \vec{a} \cdot \vec{b}$
$\vec {\alpha} + \lambda \vec{\beta} = \vec{a} $
$\vec {\beta} + \lambda \vec{\alpha} = \vec{b} $
This is still not a linear system because of the $\lambda \vec{\alpha}$ terms.
How to do this faster?