So, I feel as if I nearly understand this problem. It's not asking for actual words in the English language, just combinations of the letters. If not for the fact that this question says "of any length", thus adding in combinations of 6 letters or less, I would just say 6! but I don't think that's correct. Any help?
How many "words" of any length can be made from the letters in TREATS?
2.5k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
Note that while you say "combination", I'm going to assume that that's not what you mean; a combination implies that there is no order, i.e. "TAR" is the same as "ART". What you want is a permutation, rather, a sum of all possible permutations of any length (possibly including $\emptyset$ though I doubt the question would really accept that as a word, and not just blank space). However, there are two Ts in "TREATS" and presumably they are not distinct. We'll need to take on the cases where there are two Ts and less than two Ts separately.
If there are less than 2 Ts, we can just treat is as a permutation of "TREAS" (or "TEARS", if you like), which is just every k-permutation of that word for $k$ from $0$ to $5$, (though, again, you should probably ask yourself whether silence is a word). Hence, $\sum_{i=0}^{5} (5)_i$.
If there are 2 Ts, then we can think of putting 2 indistinct Ts in some place in the word, one to the left of the other, and find all of the ways to put the other letters down between them. First, we need to iterate over all possible numbers of letters we put between the Ts, meaning from $0$ to $4$. We'll also need to order them, so each term in the sum will have a falling factorial in it. Finally, figuring out where to put the other letters is like an integer composition; we have $x$ non-T letters and two dividers (the Ts), so we want to find out how many ways we can pick the two dividers out of a string of x+2 elements, resulting in $\binom{x+2}{2}$. Hence, $\sum_{i=0}^4 (4)_i \binom{x+2}{2}$.
By rule of sums, $\sum_{i=0}^4 (4)_i \binom{i+2}{2} +\sum_{j=0}^{5} (5)_j$.
EDIT: For a word of six distinct letters, it is $\sum_{i=0}^6 (6)_i$.
We have the 4 letters "REAS" and the two Ts. From the four letters you can form $\Sigma_{n=0}^4 \Sigma_{k=0}^n {n \choose k}$ words (with inner sum representing an $n$ letter word). Each of the $n$-letter words can be complemented by either 0, 1 or 2 Ts. For 0 Ts you have 1 position, for 1 T there are $n+1$ positions and for 2 Ts there are 5+1 over 2 positions (but with double counts so these must be divided by two). Yielding:
$\sum_{n=0}^4 \sum_{k=0}^n {n \choose k} \;[{n+1 \choose 0}+{n+1 \choose 1} + \frac{{n+1 \choose 2}}{2}] \; = \; 271$.