How many elements are in equivalence class of string $aabc$ if it’s in relation with other strings of length $4$ who have the same set of characters

combinatoricsproof-verification

Let $S$ be the set of all strings of length $4$ composed from $5$ characters $a,b,c,d,e$. Any two strings in $S$ are considered to be equivalent if they share the same set of characters. For example: $aabc$, $abbc$ and $baac$ are equivalent. How many strings in total are possible and how many strings are in the equivalence class of $aabc$?

There're a total of $5^4$ strings.

In general, $3^4$ strings are possible with $3$ unique characters. Then we need to subtract the strings that are made up of only $1$ character: there're $3$ such strings. Also we need to subtract all strings that are made up of only $2$ characters: there're $2^4$ such strings. But there're $3$ strings made up of a single character in $2^4$ strings and we already subtracted those from $3^4$ so we need to add them back.

Therefore there're $3^4-3-{3\choose 2}2^4+3=33$.

Not sure if I got this right.


The answer to the second part of the exercise (how many elements in the class of $aabc$) is $3\cdot 4\cdot 3=36$ (which I don't understand).

Best Answer

Let $S$ be the set of all strings of length $4$ composed from $5$ characters $a,b,c,d,e$. Any two strings in $S$ are considered to be equivalent if they share the same set of characters. For example: $aabc$, $abbc$ and $baac$ are equivalent. How many strings in total are possible and how many strings are in the equivalence class of $aabc$?

There are $\Box^\Box$ ways to make 4 independent selections from 5 characters. (Select with replacement).

To count ways to select a,b, and c, to make a string of length four, there is $\binom\Box\Box$ ways to choose which 1 from those 3 letters must be selected twice, and there are $\binom\Box\Box$ ways to arrange a singleton and pair.