Coupled intervals in the discrete calculus of variations: necessity and sufficiency