Find the number of unordered pairs $\{ A,B \}$ of subsets of an n-element set $X$ that satisfies the following:
(a) $A \not= B$
(b) $A \cup B = X$
To find the number of unordered pairs $\{A, B\}$ of subsets of an $n$-element set $X$ that satisfy the conditions:
(a) $A \neq B$
(b) $A \cup B = X$

we can use a recursive approach. Let's denote $a_n$ as the number of such pairs for an $n$-element set $X$.

1. **Base Case:**
   For $n = 1$, the set $X$ has only one element, say $\{1\}$. The possible pairs $\{A, B\}$ that satisfy the conditions are:
   - $\{ \{1\}, \emptyset \}$
   - $\{ \emptyset, \{1\} \}$

   Since these pairs are unordered, they count as one pair. Thus, $a_1 = 1$.

2. **Recursive Step:**
   Consider an $n$-element set $X$. We can generate the pairs for an $n$-element set from the pairs of an $(n-1)$-element set by considering the $n$-th element and deciding whether to add it to $A$, $B$, or both.

   - If we add the $n$-th element to $A$, we get a pair $\{A \cup \{n\}, B\}$.
   - If we add the $n$-th element to $B$, we get a pair $\{A, B \cup \{n\}\}$.
   - If we add the $n$-th element to both $A$ and $B$, we get a pair $\{A \cup \{n\}, B \cup \{n\}\}$.

   Each of these choices corresponds to a valid pair for the $n$-element set, except for the case where $A = X$ and $B = \emptyset$ (or vice versa), which is not allowed by condition (a).

   Therefore, the recurrence relation is:
   \[
   a_n = 3a_{n-1} + 1
   \]

3. **Solving the Recurrence:**
   We solve the recurrence relation $a_n = 3a_{n-1} + 1$ with the initial condition $a_1 = 1$.

   Let's find the first few terms to identify a pattern:
   \[
   a_1 = 1
   \]
   \[
   a_2 = 3a_1 + 1 = 3 \cdot 1 + 1 = 4
   \]
   \[
   a_3 = 3a_2 + 1 = 3 \cdot 4 + 1 = 13
   \]
   \[
   a_4 = 3a_3 + 1 = 3 \cdot 13 + 1 = 40
   \]

   We observe that the sequence follows a geometric series with an additional term. To find a general formula, we use the method of solving linear recurrence relations.

   The homogeneous part of the recurrence relation is:
   \[
   a_n^{(h)} = 3a_{n-1}^{(h)}
   \]
   The particular solution can be guessed as a constant, say $C$. Substituting into the recurrence relation:
   \[
   C = 3C + 1 \implies C = -\frac{1}{2}
   \]

   Therefore, the general solution is:
   \[
   a_n = A \cdot 3^n - \frac{1}{2}
   \]

   Using the initial condition $a_1 = 1$:
   \[
   1 = A \cdot 3^1 - \frac{1}{2} \implies 1 = 3A - \frac{1}{2} \implies 3A = \frac{3}{2} \implies A = \frac{1}{2}
   \]

   Thus, the general solution is:
   \[
   a_n = \frac{1}{2} \cdot 3^n - \frac{1}{2} = \frac{3^n - 1}{2}
   \]

The final answer is $\boxed{\frac{3^n - 1}{2}}$