Given a nonautonomous discrete system with an equilibrium at the origin and a hypercube D containing the origin, we state a linear programming problem, of which any feasible solution parameterizes a continuous and piecewise affine (CPA) Lyapunov function V : D → R for the system. The linear programming problem depends on a triangulation of the hypercube. We prove that if the equilibrium at the origin is exponentially stable, the hypercube is a subset of its basin of attraction, and the triangulation fulfills certain properties, then such a linear programming problem possesses a feasible solution. We suggest an algorithm that generates such linear programming problems for a system, using more and more refined triangulations of the hypercube. In each step the algorithm checks the feasibility of the linear programming problem. This results in an algorithm that is always able to compute a Lyapunov function for a discrete system with an exponentially stable equilibrium. The domain of the Lyapunov function is only limited by the size of the equilibrium s domain of attraction. The system is assumed to have a C 2 right-hand side, but is otherwise arbitrary. Especially, it is not assumed to be of any specific algebraic type like linear, piecewise affine, etc. Our approach is a non-trivial adaption of the CPA method to compute Lyapunov functions for continuous systems to discrete systems.