Im not sure how I can make each case have a different number of C's.

Im wondering if this works:

Say I have

**Case 1: CDXXXXXX**

Case 2: XDCDXXXX

Case 3: XXXDCDXX

Case 4: XXXXXDCD

Each of these cases have duplicates of another case because in each case where there is a C, another case has an X. Since an X can be A, B, or C, if X is C in that position then its a duplicate case. So, we should change X to be D in that position.

**Case 1: CDXXXXXX**

Case 2: DDCDXXXX

Case 3: DXXDCDXX

Case 4: DXXXXDCD

I changed each X in the first position to be D so it cannot overlap with Case 1

Now Case 1 must be unique

However case 2,3,4 can still be duplicates because in Case 2 third position there is a C, while in Case 3 and 4 there are X's which can also be C's. So we should change them to be D.

**Case 1: CDXXXXXX**

Case 2: DDCDXXXX

Case 3: DXDDCDXX

Case 4: DXDXDDCD

This leaves me with these 4 cases.

I can do the same with the other 4 cases where ill call them **Case A,B,C,D**

Case A: DCDXXXXX

Case B: XXDCDXXX

Case C: XXXXDCDX

Case D: XXXXXXDC

Changes to:

Case A: DCDXXXXX

Case B: XDDCDXXX

Case C: XDXDDCDX

Case D: XDXDXDDC

In summary , for each case if a C appeared then that means in another case the C can't appear again so it must be A or B is essentially what I did(?)

The final cases are:

**Case 1: CDXXXXXX**

Case 2: DDCDXXXX

Case 3: DXDDCDXX

Case 4: DXDXDDCD

Case A: DCDXXXXX

Case B: XDDCDXXX

Case C: XDXDDCDX

Case D: XDXDXDDC

The calculation is:

2 * (3^6) = 1458

(2^3) * (3^4) = 648

(2^4) * (3^3) = 432

(2^4) * (3^3) = 432

(2^2) * (3^5) = 972

(2^3) * (3^4) = 648

(2^4) * (3^3) = 432

(2^4) * (3^3) = 432

Summing this up, we get 5454

6561 - 5454 = 1107

Therefore there are 1107 valid cases... could you see if this seems right?