  The inverse problem for representation functions takes as input a triple
(X,f,L), where X is a countable semigroup, f : X --> N_0 \cup {\infty} a
function, L : a_1 x_1 + ... + a_h x_h an X-linear form and asks for a subset A
\subseteq X such that there are f(x) solutions (counted appropriately) to
L(x_1,...,x_h) = x for every x \in X, or a proof that no such subset exists.
  This paper represents the first systematic study of this problem for
arbitrary linear forms when X = Z, the setting which in many respects is the
most natural one. Having first settled on the "right" way to count
representations, we prove that every primitive form has a unique representation
basis, i.e.: a set A which represents the function f \equiv 1. We also prove
that a partition regular form (i.e.: one for which no non-empty subset of the
coefficients sums to zero) represents any function f for which {f^{-1}(0)} has
zero asymptotic density. These two results answer questions recently posed by
Nathanson.
  The inverse problem for partition irregular forms seems to be more
complicated. The simplest example of such a form is x_1 - x_2, and for this
form we provide some partial results. Several remaining open problems are
discussed.
