Example 1 (Ticket Selling Problem) 2,012 tourists are queuing to buy admission tickets, each ticket costing 5 yuan, among them, 1006 people each hold a 5 yuan note, and the other 1006 people each hold a 10 yuan note. At the beginning, there is no change in the ticket vending machine. Determine the number of queuing methods that ensure no ticket selling difficulties occur.
Solve: Replace 2012 with a general positive integer $2n$.
If a person holds a 5-yuan note, assign the value “+1” (i.e., the ticket machine can receive a 5-yuan note); if a person holds a 10-yuan note, assign the value “-1” (i.e., the ticket machine needs to give out a 5-yuan note as change).

Thus, a queue of $2n$ people corresponds to a permutation of $2n$ numbers (containing $n$ 1s and $n$ -1s) $x_{1}, x_{2}, \cdots, x_{2n}$. Let
$S_{k}=x_{1}+x_{2}+\cdots+x_{k} (k=1,2, \cdots, 2n)$.
Then $S_{2n}=0$.
Therefore, a queue arrangement does not cause a ticketing issue if and only if for each $k$, $S_{k} \geqslant 0$.

As shown in Figure 1, in the Cartesian coordinate system $xOy$, mark the points $A_{k}\left(k, S_{k}\right) (k=1,2, \cdots, 2n)$. Connect $O A_{1}, A_{1} A_{2}$, $\cdots, A_{2n-1} A_{2n}$, to form a broken line $O A_{1} A_{2} \cdots A_{2n-1} A_{2n}$. A line segment of length $\sqrt{2}$ and slope 1 is denoted as $L^{+}$; a line segment of length

Thus, the broken line $O A_{2n}$ consists of $n$ segments $L^{+}$ and $n$ segments $L^{-}$ arranged in a certain order.

The number of arrangements of $n$ segments $L^{+}$ and $n$ segments $L^{-}$ is $\mathrm{C}_{2n}^{n}$ (choosing $n$ positions out of $2n$ to place $L^{+}$, the remaining positions are for $L^{-}$, which has $\mathrm{C}_{2n}^{n}$ ways), so there are $\mathrm{C}_{2n}^{n}$ such broken lines. Each queue arrangement that causes a ticketing issue corresponds to a broken line that touches the line $y=-1$.

To calculate the number of broken lines that touch the line $y=-1$, for each such broken line, starting from the first contact point, flip the subsequent part of the broken line with the line $y=-1$ as the axis of symmetry, resulting in a broken line from the origin $O$ to the point $A^{\prime}(2n, -2)$. All such broken lines consist of $n-1$ segments $L^{+}$ and $n+1$ segments $L^{-}$ arranged in a certain order, totaling $\mathrm{C}_{2n}^{n-1}$ lines.
Therefore, the number of queue arrangements that do not cause a ticketing issue is
$$
\mathrm{C}_{2n}^{n}-\mathrm{C}_{2n}^{n-1}=\frac{1}{n} \mathrm{C}_{2n}^{n-1} \text{ (ways). }
$$