Let $x_1,x_2,\ldots,x_n $ be real numbers, where $n\ge 2$ is a given integer, and let $\lfloor{x_1}\rfloor,\lfloor{x_2}\rfloor,\ldots,\lfloor{x_n}\rfloor $ be a permutation of $1,2,\ldots,n$. Find the maximum and minimum of $\sum\limits_{i=1}^{n-1}\lfloor{x_{i+1}-x_i}\rfloor$ (here $\lfloor x\rfloor $ is the largest integer not greater than $x$).
Problem
Source: China Zhongshan ,12 Aug 2014
Tags: floor function, ceiling function, inequalities proposed, inequalities