## Task 2 - 340632

The letters of a word can be rearranged into a different order. Each such sequence of letters is also called a "word," even if it does not make sense in the German language. What is important is that each letter appears exactly as many times as in the original word.

For example, the following words can be formed from the word TAL:

$$
A L T, \quad A T L, \quad L A T, \quad L T A, \quad T A L, \quad T L A
$$

They are listed here in alphabetical order (for example, ATL comes before LAT because the first letter A of ATL appears earlier in the alphabet than the first letter L of LTA; the second letter decides the order between LAT and LTA, etc.).

As you can see, the word TAL is in the 5th position in this list.

(a) List all the words that can be formed from the word LAND (the word LAND should also be included)!

(b) If the words in (a) are listed alphabetically, at which position does the word LAND appear?

(c) How many words can be formed from the word UMLAND? (Again, UMLAND should be included.)

(d) At which position does the word UMLAND appear when the words from (c) are listed alphabetically?
(a) The sought words, already alphabetically ordered, are:

```
ADLN, ADNL, ALDN, ALND, ANDL, ANLD, DALN, DANL, DLAN, DLNA, DNAL, DNLA,
LADN, LAND, LDAN, LDNA, LNAD, LNDA, NADL, NALD, NDAL, NDLA, NLAD, NLDA
```

(b) The word LAND stands at the 14th position here.
(c) For the choice of the 1st letter (from the 6 letters U, M, L, A, N, D), there are exactly 6 possibilities.

In each of these possibilities, there are exactly 5 possibilities for the choice of the 2nd letter. Thus, there are $6 \cdot 5$ possibilities for the choice of the first two letters.

Correspondingly, it follows:

For the choice of the first three letters, there are $6 \cdot 5 \cdot 4$ possibilities. Continuing in this manner, it results in: There are exactly $6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 720$ words from the 6 letters of the word UMLAND.

(d) To mark the words that precede the word UMLAND, we first consider the words beginning with A. They are formed by appending A with all words from the 5 letters D, L, M, N, U.

As derived in (c), this results in exactly $5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 120$ words.

Continuing in this manner, we arrive at the following enumeration. The word UMLAND is preceded by:

For each of the 5 letters A, D, L, M, N, there are $5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 120$ words that begin with this respective letter;

further, words beginning with U, and for each of the 3 letters A, D, L, there are $4 \cdot 3 \cdot 2 \cdot 1 = 24$ words in which this respective letter follows the initial letter U;

further, words beginning with UM, and for each of the 2 letters A, D, there are $3 \cdot 2 \cdot 1 = 6$ words in which this respective letter follows the word beginning UM;

finally (after the last words with the beginning UMD) the one word UMLADN. Together, this is $5 \cdot 120 + 3 \cdot 24 + 2 \cdot 6 + 1 = 685$ words. Thus, the word UMLAND stands at the 686th position.