  We present a numerical method for solving the Monge-Ampere equation based on
the characterization of the solution of the Dirichlet problem as the minimizer
of a convex functional of the gradient and under convexity and nonlinear
constraints. When the equation is discretized with a certain monotone scheme,
we prove that the unique minimizer of the discrete problem solves the finite
difference equation. For the numerical results we use both the standard finite
difference discretization and the monotone scheme. Results with standard tests
confirm that the numerical approximations converge to the Aleksandrov solution.
