Approximation to unsolvable system of equations I am working on a project and need to find the "closest" numerical values that satisfy the following equations:
\begin{equation}
  \left\{
    \begin{array}{}
      A \cdot C = \frac{1}{2} \\
      A \cdot D = \frac{5}{6} \\
      B \cdot C = \frac{1}{8} \\
      B \cdot D = \frac{1}{2}
    \end{array}
  \right.
\end{equation}
Where $A$ and $B$ are under the constraint that they are non-negative integers and that $C$ and $D$ must be greater than zero but less than or equal to $1$.
From what I have tried so far, it seems no analytical solution exists. For my purposes an approximate solution will suffice (matches the left-hand side of the equation to several decimal points). Having obtained my BS in engineering, my guilty pleasure is Excel's Solver add-in. Using this tool to the best of my ability, I have yet to obtain a satisfactory  approximate solution.
I am not asking anyone to "solve" this for me (though I wouldn't object), but would appreciate being pointed in the right direction. To summarize:


*

*I need to find values for $A$, $B$, $C$, and $D$ which fall under the
constraints mentioned above and provide the closest values to the
actual values on the left-hand side of the above equations.

*If the closest values are still unsatisfactory, is there someway of
proving that they are indeed the "best" set of values (assuming the
method used to find them does not inherently identify the "best"
set).

*If there is a matter of tradeoff in accuracy vs integer size, I would
prefer the smallest value integers possible that still provide
reasonably close solutions to the equations (several decimal points).

 A: Hint: If you stuff the variables into vectors, your problem becomes:
$$M = \left[\begin{array}{c}A\\B\end{array}\right]\left[\begin{array}{cc}C&D\end{array}\right] = \left[\begin{array}{rr} \frac{1}{2} & \frac 56\\\frac 1 8&\frac 1 2 \end{array}\right]$$
This means we want to find the best rank 1 match to the matrix. 

Thanks for @Ian s comment which clarified nicely that you can use for example the Singular Value Decomposition ( SVD ) to find the best match.
The SVD says $M = U\Sigma V^*$ where the values in the diagonal $\Sigma$ are the singular values. If we pick the column in U and the row in $V^*$ which correspond to the largest singular value, we can identify the $A,B,C$ and $D$ above.

Some Matlab/Octave code to do the SVD approximation:
  M = [1/2,5/6;1/8,1/2];
  [U,S,V]=svd(M);
  U(:,1)*S(1,1)*V(:,1)'   % rank 1 SVD appr. as index 1 contains largest s.v.

$$\left[\begin{array}{cc}
0.445505865263938&0.861513345600555\\
0.230380036476643&0.445505865263938
\end{array}\right]$$
abs(M-U(:,1)*S(1,1)*V(:,1)')  %and the absolute error

$$\left[\begin{array}{cc}
0.0544941347360618&0.028180012267222\\
0.105380036476643&0.0544941347360618
\end{array}\right]$$
We can see the error distributed so that each element has a rather different error. It differs $10.5/2.8 \approx 3.74$ times smallest compared to largest. As mentioned in comments, if we are not OK with this distribution of the error, we may want to try minimize the error according to some other norm. 
A: Another way you could try to approach this problem by using a least squares estimator.
Assume $$F(A,B,C,D)=(AC-1/2)^2+(AD-5/6)^2+(BC-1/5)^2+(BD-1/2)^2$$
Now calculate the gradient of $F$
$$\nabla F=\left[\dfrac{\partial F}{\partial A},\cdots,\dfrac{\partial F}{\partial D}\right]$$
Then set the gradient to zero. Solve the resulting nonlinear system using Newton-Raphson algorithm (you should also check the positiveness of the Hessian).
A: The OP's last bullet point led me to a different attack on this problem.  
First, note that if $(a,b,c,d)$ is a suitable approximate solution, then so is $(k a, k b, c/k, d/k)$ for any positive integer $k$.  The last bullet prefers smaller integers, so we will want $\mathrm{gcd}(a,b) = 1$.
Suppose we relax the equalities to memberships in intervals of a given radius:  \begin{align}
    a c &\in [1/2 - \varepsilon, 1/2 + \varepsilon] = 1/2 + \varepsilon[-1,1]\\
    a d &\in [5/6 - \varepsilon, 5/6 + \varepsilon] = 5/6 + \varepsilon[-1,1]\\
    b c &\in [1/8 - \varepsilon, 1/8 + \varepsilon] = 1/8 + \varepsilon[-1,1]\\
    b d &\in [1/2 - \varepsilon, 1/2 + \varepsilon] = 1/2 + \varepsilon[-1,1] \text{,}
\end{align} where the first equality uses usual interval notation and the second form uses usual interval arithmetic notation.
Then we can control the number of digits of agreement by setting $\varepsilon$ to suitable negative powers of $10$.  
This suggests a process:


*

*Pick a $(c,d) \in (0,1] \times (0,1]$.

*Find the smallest $\varepsilon$ so that there is still an integer point, $(a,b)$, satisfying the four membership relations.

*Find the largest region on the $c$-$d$ plane where this $(a,b)$ has minimal epsilon of all integer points.


This allows us to partition the square $(0,1] \times (0,1]$ into regions where a particular integer point is optimal and search for the point in that region with minimal $\varepsilon$.  In fact, once $a$ and $b$ are fixed, this is a search with linear constraints, so is pretty easy.
By computer algebra system (Mathematica 10.4.1), for $(c,d) = (1/6,1/2)$, the minimum $\varepsilon$ still admitting an integer point satisfying the membership relations is $\varepsilon = 1/6$ for $(a,b) = (2,1)$.  For this $(a,b)$, the largest region in the $c$-$d$ plane where each point has minimal $\varepsilon$ at this integer point is $(c,d) \in [1/5,1/4]\times[1/3,5/9]$.  In that region, the minimum value of $\varepsilon$ is $1/12$, attained at $(c,d) = (5/24, 5/12)$.  This is not so impressive (since $\varepsilon = 1/12$ means that we only have a trifle more than  one decimal agreement with the original equalities).  (There is another minimum in this region, at $(c,d) = (5/24,7/16)$ yielding the same extreme value of $\varepsilon = 1/12$.  However, there do not appear to be criteria for preferring points on the $c$-$d$ plane.)
(It's late/early here, so I'll continue hacking on this analytically some time in the next few days.  Note to self:  Use the $(ka, kb, c/k, d/k)$ relation to rewrite $c$ and $d$ ($\in [1,\infty)$) to give solutions $(ka, kb, kc, kd)$, then projectively set $b=1$ (or $a=1$, if there are also solutions with $b>a$).)
