given a positive integer $n$.
the set $\{ 1,2,..,2n \}$ is partitioned into $a_1<a_2<...<a_n $ and $b_1>b_2>...>b_n$.
find the value of : $ \sum_{i=1}^{n}|a_i - b_i| $
1. **Define the problem and notation:**
   Given a positive integer \( n \), the set \( \{1, 2, \ldots, 2n\} \) is partitioned into two sequences \( a_1 < a_2 < \ldots < a_n \) and \( b_1 > b_2 > \ldots > b_n \). We need to find the value of \( \sum_{i=1}^{n} |a_i - b_i| \).

2. **Introduce sets \( A \) and \( B \):**
   Let \( S = \sum_{i=1}^{n} |a_i - b_i| \). Define sets \( A = \{i \mid a_i > b_i\} \) and \( B = \{i \mid a_i < b_i\} \). Clearly, \( A \cup B = \{1, 2, \ldots, n\} \) and \( A \cap B = \emptyset \).

3. **Case 1: \( A = \emptyset \):**
   If \( A = \emptyset \), then \( b_i > a_i \) for all \( 1 \le i \le n \). This implies \( a_i = i \) and \( b_i = 2n - i + 1 \). Therefore,
   \[
   S = \sum_{i=1}^{n} |a_i - b_i| = \sum_{i=1}^{n} (2n - i + 1 - i) = \sum_{i=1}^{n} (2n - 2i + 1).
   \]
   Simplifying,
   \[
   S = \sum_{i=1}^{n} (2n - 2i + 1) = n(2n + 1) - 2 \sum_{i=1}^{n} i = n(2n + 1) - 2 \cdot \frac{n(n+1)}{2} = n(2n + 1) - n(n + 1) = n^2.
   \]

4. **Case 2: \( B = \emptyset \):**
   If \( B = \emptyset \), then \( a_i > b_i \) for all \( 1 \le i \le n \). This implies \( a_i = n + i \) and \( b_i = n - i + 1 \). Therefore,
   \[
   S = \sum_{i=1}^{n} |a_i - b_i| = \sum_{i=1}^{n} ((n + i) - (n - i + 1)) = \sum_{i=1}^{n} (2i - 1).
   \]
   Simplifying,
   \[
   S = \sum_{i=1}^{n} (2i - 1) = 2 \sum_{i=1}^{n} i - \sum_{i=1}^{n} 1 = 2 \cdot \frac{n(n+1)}{2} - n = n(n + 1) - n = n^2.
   \]

5. **Case 3: \( A \neq \emptyset \) and \( B \neq \emptyset \):**
   Let \( p = \max(B) \). Then \( B \subset \{1, \ldots, p\} \). For \( 1 \le i \le p \), we have \( a_i \le a_p < b_p \le b_i \), so \( i \in B \). Thus, \( B = \{1, \ldots, p\} \) and \( A = \{p+1, \ldots, n\} \).

6. **Analyze the sequences:**
   From the above, we have \( a_n > \ldots > a_{p+1} > b_{p+1} > \ldots > b_n \) and \( b_1 > \ldots > b_p > a_p > \ldots > a_1 \).

7. **Cardinality and distinct elements:**
   The set \( \{a_1, \ldots, a_p, b_{p+1}, \ldots, b_n\} \) has \( n \) elements, all distinct. There exists \( x \in \{a_1, \ldots, a_p, b_{p+1}, \ldots, b_n\} \) such that \( x \ge n \).

8. **Subset analysis:**
   Suppose \( a_i \le n \) for some \( p+1 \le i \le n \). Then \( a_i \le x \), contradicting the earlier analysis. Thus, \( \{a_{p+1}, \ldots, a_n\} \subset \{n+1, \ldots, 2n\} \).

   Similarly, suppose \( b_i \le n \) for some \( 1 \le i \le p \). Then \( b_i \le x \), contradicting the earlier analysis. Thus, \( \{b_1, \ldots, b_p\} \subset \{n+1, \ldots, 2n\} \).

9. **Conclusion:**
   The sets \( \{b_1, \ldots, b_p, a_{p+1}, \ldots, a_n\} \) and \( \{n+1, \ldots, 2n\} \) are equal. Similarly, \( \{a_1, \ldots, a_p, b_{p+1}, \ldots, b_n\} = \{1, \ldots, n\} \).

10. **Final calculation:**
    \[
    S = \sum_{i=1}^{p} (b_i - a_i) + \sum_{i=p+1}^{n} (a_i - b_i) = \left( \sum_{i=1}^{p} b_i + \sum_{i=p+1}^{n} a_i \right) - \left( \sum_{i=1}^{p} a_i + \sum_{i=p+1}^{n} b_i \right).
    \]
    Since \( \sum_{i=1}^{n} (n + i) = \sum_{i=1}^{n} i + n^2 \),
    \[
    S = \sum_{i=1}^{n} (n + i) - \sum_{i=1}^{n} i = n^2.
    \]

The final answer is \( \boxed{n^2} \).