We present a new formulation to automatically solve jigsaw puzzles considering only the information contained on the image. Our formulation maps the problem of solving a jigsaw puzzle to the maximization of a constrained quadratic function that can be solved by a numerical method. The proposed method is deterministic and it can handle arbitrary rectangular pieces. We tested the validity of the method to solve problems up to 3300 puzzle pieces, and we compared our results to the current state-of-the-art, obtaining superior accuracy. © 2012 IEEE.6370Demaine, E., Demaine, M., Jigsaw puzzles, edge matching, and polyomino packing: Connections and complexity (2007) Graphs and Combinatorics, 23, pp. 195-208Justino, E., Oliveira, L.S., Freitas, C.,...