  Using physical layer network coding, compute-and-forward is a promising
relaying scheme that effectively exploits the interference between users and
thus achieves high rates. In this paper, we consider the problem of finding the
optimal integer-valued coefficient vector for a relay in the
compute-and-forward scheme to maximize the computation rate at that relay.
Although this problem turns out to be a shortest vector problem, which is
suspected to be NP-hard, we show that it can be relaxed to a series of
equality-constrained quadratic programmings. The solutions of the relaxed
problems serve as real-valued approximations of the optimal coefficient vector,
and are quantized to a set of integer-valued vectors, from which a coefficient
vector is selected. The key to the efficiency of our method is that the
closed-form expressions of the real-valued approximations can be derived with
the Lagrange multiplier method. Numerical results demonstrate that compared
with the existing methods, our method offers comparable rates at an
impressively low complexity.
