
Related Articles
- Wait — correction: we need **all R’s before all L’s**, i.e., every R position < every L position.
- So: max(R) < min(L)
- Let \( m = \max(\text{R positions}) \), \( n = \min(\text{L positions}) \), require \( m < n \)
- So for each \( m = 2,3,4 \), and \( n = m+1, m+2, \dots, 5 \), we count:
- Number of ways to choose 2 distinct positions for R’s from those \( < m \)? No: we need R’s chosen from positions 1 to \( m-1 \), but no: since max R must be < m, so R’s ∈ {1,2,...,m−1}, and we choose 2 of them: number is \(\binom{m-1}{2}\) if \( m-1 \geq 2 \), else 0.
- Number of ways to choose 2 distinct positions for L’s from positions \( \geq n \), and \( n \leq 5 \), so from {n, n+1, ..., 5}, which has size \( 5 - n + 1 \), and we choose 2: \(\binom{6 - n}{2}\), provided \( 6 - n \geq 2 \), i.e., \( n \leq 4 \)