8. (50 points) For any permutation $\left(x_{1}, x_{2}, \cdots, x_{n}\right)$ of $1,2, \cdots, n\left(n \in \mathbf{N}_{+}, n>2012\right)$, define:
$$
L=\sum_{i=1}^{n}\left|x_{i}-\sqrt{3} x_{i+1}\right| \text {, }
$$

where, $x_{n+1}=x_{1}$. Try to find $L_{\max } 、 L_{\min }$ and the number of all permutations $\left(x_{1}, x_{2}, \cdots, x_{n}\right)$ that achieve the maximum value.
8. Clearly, $L$ is the sum of $n$ numbers with positive signs and $n$ numbers with negative signs from $i$ and $\sqrt{3} i$ (where $i=1,2, \cdots, n$).

To maximize $L$, the larger $n$ numbers among the $2n$ numbers should take positive signs, and the smaller $n$ numbers should take negative signs.

Let $\sqrt{3} i$ (where $i=1,2, \cdots, a$) and $j$ (where $j=1,2, \cdots, b$) take negative signs, and the rest take positive signs. Then,
$$
\left\{\begin{array}{l}
a + b = n, \\
\sqrt{3} (a + 1) > b, \\
b + 1 > \sqrt{3} a
\end{array} \Rightarrow \left\{\begin{array}{l}
a = \left[\frac{n+1}{\sqrt{3}+1}\right], \\
b = n - a.
\end{array}\right.\right.
$$

Thus, $L_{\max} = \sqrt{3}\left[\frac{n(n+1)}{2} - a(a+1)\right] +$
$$
\left[\frac{n(n+1)}{2} - b(b+1)\right].
$$

Next, we find the number of sequences $\left(x_{1}, x_{2}, \cdots, x_{n}\right) = A$ that satisfy $L_{\max}$.
$$
\begin{array}{l}
\text{Let } I_{1} = \{1,2, \cdots, a\}, \\
I_{2} = \{a+1, a+2, \cdots, b\}, \\
I_{3} = \{b+1, b+2, \cdots, n\}.
\end{array}
$$

From the conditions of taking positive and negative signs, we have the following properties:
(1) The numbers in $I_{j}$ (where $j=1,3$) are not adjacent in $A$. Otherwise, if $x_{i}$ and $x_{i+1} \in I_{j}$, then by $\left|x_{i} - \sqrt{3} x_{i+1}\right|$, $x_{i}$ and $\sqrt{3} x_{i+1}$ would have different signs, which is a contradiction.
(2) The numbers in $I_{3}$ are not followed by a number in $I_{2}$ in $A$. Otherwise, if $x_{i} \in I_{3}$ and $x_{i+1} \in I_{2}$, then by $\left|x_{i} - \sqrt{3} x_{i+1}\right|$, $x_{i}$ and $\sqrt{3} x_{i+1}$ would have different signs, which is a contradiction.
(3) The numbers in $I_{3}$ are followed by a number in $I_{1}$ in $A$.
(4) The numbers in $I_{2}$ can be adjacent in $A$.
From (1) and (4), if we arrange the numbers in $A$ in a circle, each number in $I_{3}$ is adjacent to a number in $I_{1}$, forming $a$ pairs, which divide the circle into $a$ segments. The numbers in $I_{2}$ can be placed in these segments arbitrarily, and any such arrangement satisfies the conditions.

Therefore, the number of sequences $\left(x_{1}, x_{2}, \cdots, x_{n}\right)$ that satisfy $L_{\max}$ is $n(n-a-1)! \cdot a!$.
Finally, we use the adjustment method to find $L_{\min}$.
Take $\sqrt{3} i$ (where $i=1,2, \cdots, n$) with positive signs and $j$ (where $j=1,2, \cdots, n$) with negative signs.

If a certain $\sqrt{3} i_{0}$ changes to a negative sign, then a certain $j_{0}$ (where $j_{0} > \sqrt{3} i_{0}$) must change to a positive sign, because
$$
\left|j_{0} - \sqrt{3} i_{0}\right| = j_{0} - \sqrt{3} i_{0}.
$$

Thus, the sum of these $2n$ numbers increases.
Also, $|j - \sqrt{3}| = j - \sqrt{3}$ (for $j \neq 1$), so $\sqrt{3}$ must take a negative sign.
To minimize $L$, 2 should take a positive sign, and the rest should remain unchanged.
Thus, $L_{\min} = \sqrt{3}\left[\frac{n(n+1)}{2} - 2 \times 1\right] -$
$$
\begin{array}{c}
\left[\frac{n(n+1)}{2} - 2 \times 2\right] \\
= (\sqrt{3} - 1) \frac{n(n+1)}{2} + 4 - 2 \sqrt{3}.
\end{array}
$$
When $\left(x_{1}, x_{2}, \cdots, x_{n}\right) = (n, n-1, \cdots, 1)$, the minimum value is achieved.