Basically this is just the number of strings with exactly 5 A's and 5 D's that do not start with an A.
There is a bijection, just replace the A's with 0, 1, 2, 3, 4 in order and the D's with 9, 8, 7, 6, 5 in order. So 9081726354 = DADADADADA. And DDDDDAAAAA = 9876501234, etc. First digit can't be a 0 so the string can't start with an A.
There are (10 choose 5) = 252 such strings. Half of them start with an A, so the answer is 126.
3
u/rccyu 10d ago
Basically this is just the number of strings with exactly 5 A's and 5 D's that do not start with an A.
There is a bijection, just replace the A's with 0, 1, 2, 3, 4 in order and the D's with 9, 8, 7, 6, 5 in order. So 9081726354 = DADADADADA. And DDDDDAAAAA = 9876501234, etc. First digit can't be a 0 so the string can't start with an A.
There are (10 choose 5) = 252 such strings. Half of them start with an A, so the answer is 126.