Hammersley was born in Helensburgh in Dunbartonshire, and educated at Sedbergh School.
He started reading mathematics at Emmanuel College, Cambridge but was called up to join the Royal Artillery in 1941.
Published by the Cambridge Philosophical Society in a 1959 article entitled “The Shortest Path Through Many Points,” the theorem provides a practical solution to the “traveling salesman problem.”[4] He held a number of positions, both in and outside academia.
His book Monte Carlo Methods with David Handscomb was published in 1964.
He was an advocate of problem solving, and an opponent of abstraction in mathematics, taking part in the New Math debate.