I have two groups of data: $\{7, 9, 11\}$, $\{3, 8, 4\}$. I am performing Wilcoxon Rank-Sum on these data, based on the first group. Aggregated, we have $\{3, 4, 7, 8, 9, 11\}$. The test statistic is clearly $3 + 5 + 6 = 14$. I'm trying to figure out how to compute the exact two-sided $p$-value, but I don't understand my professor's explanations.
If I want a larger test statistic, the only way that can happen is if I have ranks $4$, $5$, and $6$. I get this. I also have to include the observed ranks $3$, $5$, and $6$. But what I don't understand is why ranks $1$, $2$, $3$ and $1$, $2$, $4$ are the only ones taken into account when calculating the other side of the $p$-value. Why not $1$, $2$, $5$ as well? This gives a rank less than $14$.