Explanation
To find the number of elements in set $B$, we consider pairs $(\frac{m}{n})$ where $m, n \in A$ with $m < n$ and $gcd(m, n) = 1$.
Here's the breakdown for each possible $m$:
For $m = 1$:
Possible values for $n$ are $2, 3, 4, 5, 6, 7, 8, 9, 10$.
Total pairs: $9$.
For $m = 2$:
Possible values for $n$ are $3, 5, 7, 9$ (since these have $gcd(2, n) = 1$).
Total pairs: $4$.
For $m = 3$:
Possible values for $n$ are $4, 5, 7, 8, 10$.
Total pairs: $5$.
For $m = 4$:
Possible values for $n$ are $5, 7, 9$.
Total pairs: $3$.
For $m = 5$:
Possible values for $n$ are $6, 7, 8, 9$.
Total pairs: $4$.
For $m = 6$:
Possible value for $n$ is $7$.
Total pairs: $1$.
For $m = 7$:
Possible values for $n$ are $8, 9, 10$.
Total pairs: $3$.
For $m = 8$:
Possible value for $n$ is $9$.
Total pairs: $1$.
For $m = 9$:
Possible value for $n$ is $10$.
Total pairs: $1$.
Adding all these up, the total number of elements in set $B$ is:
$9 + 4 + 5 + 3 + 4 + 1 + 3 + 1 + 1 = 31$