I'm trying to solve a programming challenge, and I have narrowed down all the challenge to a combination/permutation problem.
I ended up with 5 possible scenarios, and I need to find all possible combinations in such scenarios, but I'm not really sure if my results or my line of thought is correct. I'd like to have some feedback on this matter.
Scenario 1:
an 11 elements long list that must arrange 1 A, and 10 B's in every possible way
Scenario 2:
a 12 elements long list that need to arrange 4 A's and 8 B's in every possible way
Scenario 3:
a 13 elements long list that need to arrange 7 A's and 6 B's in every possible way
Scenario 4:
a 14 elements long list that need to arrange 10 A's and 4 B's in every possible way
Scenario 5:
a 15 elements long list that need to arrange 13 A's and 2 B's in every possible way
e.g. For the first scenario I have 11 possible ways to arrange the list.
1. A B B B B B B B B B B 2. B A B B B B B B B B B 3. B B A B B B B B B B B 4. B B B A B B B B B B B 5. B B B B A B B B B B B 6. B B B B B A B B B B B 7. B B B B B B A B B B B 8. B B B B B B B A B B B 9. B B B B B B B B A B B 10. B B B B B B B B B A B 11. B B B B B B B B B B A
For Scenario 2, I tried to do nCr(12,4) = 495
but I also thought a way to figure out the amount of combinations this way: since 4 slots must be A's and 8 slots must be B's 2^4 + 2^8 = 272
Chances are that both are wrong, but I've been working in this problem for about 4 hours straight and I can't think clearly.
Any help would be greatly appreciated!