Assume I have a vector $a$ (with $a_i \in [-1, 1]\ \ \forall i$ )and a vector $x$ in $\mathbb R^n$. Let $q$ be a vector $\in \mathbb R^n$ such that every component $q_i$ is in the form $\frac ls$, with $s$ a fixed integer and $l$ an integer between $-s$ and $s$: $q_i \in \left\{\frac ls, l \in \mathbb Z, -s \le l \le s\right\}$.
I want to choose the vector $q$ such that it is as close to $a$ as possible, with "close" meaning that minimizes the difference between the scalar product with $x$, i.e. it minimizes the quantity
$$\Delta = |q \cdot x - a\cdot x|$$
How can I find such a vector $q$? I assume an exact solution is probably to complex, but I am also interested in approximations. For example, one of the things I am interested in is make sure that the percentage error is smaller than a certain value $\delta$, i.e.
$$\frac{\Delta}{a \cdot x} \le \delta$$
This of course may or may not be possible depending on $s$, but it would be nice to have a rough indication on how big $s$ needs to be to be able to satisfy that bound and to find any solution (not necessarily the best one) that results in a percentage error smaller than $\delta$.
A paper that goes into this direction is "Probabilistic construction of deterministic algorithms approximating packing integer programs" Raghavan 1987. I was wondering about other development aimed at solving the question; references to paper or partial results are also much appreciated.
Thanks!
The given optimization problem can be written in the form
$$\begin{array}{ll} \text{minimize} & | \mathrm a^{\top} \mathrm z - b |\\ \text{subject to} & -s 1_n \leq \mathrm z \leq s 1_n\\ & \mathrm z \in \mathbb Z^n\end{array}$$
which can be rewritten as a mixed-integer program (MIP) in $t \in \mathbb R$ and $\mathrm z \in \mathbb Z^n$
$$\begin{array}{ll} \text{minimize} & t\\ \text{subject to} & -t \leq \mathrm a^{\top} \mathrm z - b \leq t\\ & -s 1_n \leq \mathrm z \leq s 1_n\\ & t \in \mathbb R, \mathrm z \in \mathbb Z^n\end{array}$$