1. (1997 Shanghai High School Mathematics Competition) Let $S=\{1,2,3,4\}$, and the sequence $a_{1}, a_{2}, \cdots, a_{n}$ has the following property: for any non-empty subset $B$ of $S$, there are adjacent $|B|$ terms in the sequence that exactly form the set $B$. Find the minimum value of $n$.
1. Since a binary subset containing a fixed element of $S$ has 3 elements, any element of $S$ appears at least twice in the sequence. Therefore, the minimum value of $n$ is calculated to be 8. On the other hand, an 8-term sequence: $3,1,2,3,4,1,2,4$ satisfies the condition, so the minimum value of $n$ is 8.