Nonempty collection of letters formed by four A's and eight B's

3.1k Views Asked by At

Question: How many nonempty collections of letters can be formed from four As and eight Bs?

We can make collections of letters with a maximum of 12 letter since $4+8=12$.

We can split the problem into cases of collections of letters containing $1$ letter to $12$ letters.

For 1 letter: either an A or a B: 2 collections

For 2 letters: AA,BB,AB: 3 collections

For 3 letters: (2A,1B),(1A,2B),(3A),(3B): 4 collections

For 4 letters: This is where I get stuck

My attempt at 4 letters: (4A,0B),(3A,1B),(2A,2B),(1A,3B),(0A,4B): 5 collections

If anyone can help me with 4 letters up to 12 letters.

Completed Answer:

For 5 letters: (5B,0A),(4B,1A),(3B,2A),(2B,3A),(1B,4A): 5 ways

For 6 letters: (6B,0A),(5B,3A),(4B,2A),(3B,3A),(2B,4A): 5 ways

For 7 letters: (7,0),(6,1),(5,2),(4,3),(3,4): 5 ways

For 8 letters: (8,0),(7,1),(6,2),(5,3),(4,4): 5 ways

For 9 letters: (8,1),(7,2),(6,3),(5,4): 4 ways

For 10 letters: (8,2),(7,3),(6,4): 3 ways

For 11 letters: (8,3),(7,4): 2 ways

For 12 letters: (8,4): 1 way

Adding these up,

$$2+3+4+5\times{5}+4+3+2+1 = 44 \text{collections of letters} $$

3

There are 3 best solutions below

1
On

Using Combinatorics, if all A's and B's were different:

You can choose either 0 A in C(4,0), 1 A in C(4,1), 2 A's in C(4,2), 3 A's in C(4,3) and 4 A's in C(4,4) ways. So, total no. of ways of choosing A's is C(4,0)+C(4,1)+C(4,2)+C(4,3)+C(4,4)=$2^4$ ways.
Similarly you can choose 0 or 1 or 2 or 3...till 8 B's in C(8,0),C(8,1)+...C(8,8)=$2^8$ ways.
So, total no of collections possible are $2^4$*$2^8$.

Now, we have also included a possibility of choosing 0 A's and 0 B's which must be eliminated as it will give you an empty collection. After subtracting this particular case, we finally get $2^4$*$2^8$-1 collections.

But this is not the case. All A's and all B's are alike respectively.
So, your individual counting method seems correct. But you could have got answer directly by:

Selecting a no. of A's from 0 through 4 and no. of B's from 0 through 8 so that you have 5 and 9 choices for A and b respectively giving a total of 9*5=45 choices. Subtract 1 for 0 A and 0 B case. This gives 45-1=44 collections.

1
On

For A, there are 5 possibilities, which are 0, 1, 2, 3, 4. For B, there are 9 possibilities, which are 0, 1, 2, 3, 4, 5, 6, 7, 8.

Since there is no order requirement within the set, each set containing 'a' of A and 'b' of B can be represented as (a, b) where 0 ≤ a ≤ 5 and 0 ≤ b ≤ 9.

So, there are a total of 5 * 9 - 1 =44 possibilities because both 'a' and 'b' cannot be 0 simultaneously.

0
On

I don't know how this old question popped up on the top, but I see that you all have missed one elegant solution. Denote the number of $A$'s as $a$ and the number of $B$'s by $b$. So, a solution would look like $(a,b)$. We only have the restrictions $a\le 4$, $b \le 8$ and both $a$ and $b$ cannot be zero together. Let's forget the last condition for now.
$a$ can take $5$ values : $0,1,2,3,4$ and similarly $b$ can take $9$ values : $0,1,2,3,4,5,6,7,8$ since they can be zer also. These $2$ values are independent of each other, so, to get the number of ordered pairs $(a,b)$, we will simply multiply $5\times 9 = 45$. Since $(0,0)$ has also been counted, the final answer is $44$.

This method is better than individually counting the cases.