Discontinuous Galerkin methods for Hamilton-Jacobi equations and high-dimensional elliptic equations