The number of words (finite sequences) up to isomorphism

100 Views Asked by At

Let we have an alphabet $A = \{a_1, a_2, \ldots, a_n\}$ with $n$ elements. Any two words $W_1$ and $W_2$ with length $n$ in this alphabet we call isomorphic if there exists a permutation $P$ of alphabetic symbols such that $W_1 = P(W_2)$. Can it be proved that isomorphism defined in this way is an equivalence relation? If answer to previous question is "yes" let $Q$ be the quotient set of $A^n$ (set of all words with length $n$) of this relation. How to express the number of elements of $Q$ for any $n$?

2

There are 2 best solutions below

2
On BEST ANSWER

As Oria said, the relation is an equivalence relation, but the number of elements in the quotient $Q$ is the number of partitions of the set $\{1,2,3,\dots,n\}$, that is called Bell Number (see https://en.wikipedia.org/wiki/Partition_of_a_set)

3
On

The answer is yes.

Every word can be permuted to itself with the identity permutation. Every permutation is invertible so if $W_1 = P(W_2)$ there is another permutation $P'$ such that $P'(W_1) = W_2$. if $W_1$ can be permuted to $W_2$ by permutation $P$ and $W_2$ can be permuted to $W_3$ by permutation $P'$ then $P'(P(W_1)) = W_3$.

So this is an equivalence relation.

Regarding the equivalence classes:

Two words are equivalent if they can be permuted to each other, or in better phrasing, if they contain the same letters.

For example if $n=2$ and $A = \{a,b\}$ then the classes are $\overline{[aa]} = \{aa\}$, $\overline{[bb]} = \{bb\}$, $\overline{[ab]} = \{ab,ba\}$.

So really, the number of equivalence classes (or number of elements in $Q$) is the answer to the question "how many words of length $n$ can we create from alphabet $A$, with repetition (we can use a letter more than once) and without order (ab = ba))." The answer to that question is $\binom{n + |A| -1}{n}$