6. Choose two different non-empty subsets $A$ and $B$ of the set $S=\{1,2, \ldots, 10\}$. The probability that the smallest number in $B$ is greater than the largest number in $A$ is $\qquad$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
6. $\frac{4097}{1045506}$

Explanation: When $A$ has $i$ elements, if at this point $B$ has $k$ elements, then we only need to consider selecting $i+k$ numbers from 10 numbers, assigning the smallest $i$ to $A$, and the rest to $B$. There are $C_{10}^{i+1}+C_{10}^{i+2}+\ldots+C_{10}^{10}$ possible combinations. Therefore, $P=\frac{\sum_{i+1}^{9}\left(C_{10}^{i+1}+C_{10}^{i+2}+\ldots+C_{10}^{10}\right)}{\left(2^{10}-1\right)\left(2^{10}-2\right)}=\frac{4 \times 2^{10}+1}{\left(2^{10}-1\right)\left(2^{10}-2\right)}=\frac{4097}{1045506}$