2. Given that $n$ is a positive integer. Find the maximum number of disjoint element pairs in the set $\{1,2, \cdots, n\}$, such that for any two different element pairs $(a, b)$ and $(c, d)$, both $a+b$ and $c+d$ are distinct integers not exceeding $n$.
2. Let $\{1,2, \cdots, n\}$ contain $x$ pairs of elements that satisfy the condition.

Since these $x$ pairs of elements are pairwise disjoint, the sum $S$ of the $2 x$ numbers in these pairs is at least
$$
1+2+\cdots+2 x \text {. }
$$

On the other hand, since the sum of the two numbers in each pair does not exceed $n$ and is distinct, then
$$
S \leqslant n+(n-1)+\cdots+(n-x+1) .
$$

Therefore, $\frac{2 x(2 x+1)}{2} \leqslant n x-\frac{x(x-1)}{2}$, which simplifies to
$$
x \leqslant \frac{2 n-1}{5} \text {. }
$$

Thus, the maximum number of pairs that satisfy the condition is $\left[\frac{2 n-1}{5}\right]$ (where $[x]$ denotes the greatest integer not exceeding the real number $x$).

The following example shows that the maximum value $\left[\frac{2 n-1}{5}\right]$ can be achieved.

If $n=5 k+3(k \in \mathbf{N})$, then $\left[\frac{2 n-1}{5}\right]=2 k+1$. The selection of these $2 k+1$ pairs is shown in Table 1.

These $2 k+1$ pairs include all integers from $1 \sim 4 k+2$, and the sum of the two numbers in each pair is from $3 k+3 \sim 5 k+3$.

For $n=5 k+4,5 k+5(k \in \mathbf{N})$, $\left[\frac{2 n-1}{5}\right]=2 k+1$, and the $2 k+1$ pairs can still be selected as in the case of $n=5 k+3$.

If $n=5 k+2(k \in \mathbf{N})$, then $\left[\frac{2 n-1}{5}\right]=2 k$. Only the last pair with a sum of $5 k+3$ from the $2 k+1$ pairs in the case of $n=5 k+3$ needs to be removed.

If $n=5 k+1(k \in \mathbf{N})$, then $\left[\frac{2 n-1}{5}\right]=2 k$. The last pair with a sum of $5 k+3$ from the $2 k+1$ pairs in the case of $n=5 k+3$ should be removed, and each of the $2 k$ numbers in the first row of Table 1 should be reduced by 1.