### Numbers on a circle - Minimum sum of consecutive differences

Source: Asked to me by Anuj Jain (MFE Grad Student at Baruch College in New York, EE IITB 2010 Alumnus) Problem: Place the numbers 1, 2, ... 9 around a circle in the positions x_1, x_2, ..., x_9 so that the sum of difference between consecutive terms defined by Sum over | x_ { i+1 } - x_ { i } | for i = 1, 2, ..., 9 is minimized (Note: x_10 is x_1 ). Also count the number of such arrangements where the "sum of difference between consecutive terms" is minimum. Update (December 13, 2011): Solution : Partial Solution posted by Chiraag Juvekar (IITB EE Fifth year undergraduate, To be McKinsey Business Analyst) in comments! Complete solution posted by Rudradev Basak (IITD CSE Senior Undergraduate) and Gaurav Sinha (chera, IITK 1996 Graduate, Indian Revenue Service) in comments! Update (June 22, 2014): Very generic solution posted by Aashay Harlalka (IITB EE 2014, Two Roads Quantitative Analyst) in comments!