## Task 1 - 310621

a) A six-digit number is to be written using the digits 1, 1, 2, 2, 3, 3. The order of these six digits should be chosen such that the following conditions are met:

(1) Between the two digits 1, exactly one other digit should stand.

(2) Between the two digits 2, exactly two other digits should stand.

(3) Between the two digits 3, exactly three other digits should stand.

b) An eight-digit number is to be written using the digits 1, 1, 2, 2, 3, 3, 4, 4. In addition to conditions (1), (2), and (3), the following condition should also be met:

(4) Between the two digits 4, exactly four other digits should stand.

For a) and b), give all numbers that meet the conditions! A justification is not required.
The conditions are precisely met by the numbers

a) 231213 and 312132,

b) 23421314 and 41312432.

a) At the two positions between the digits 2 . . 2, neither the two digits 1 nor the two digits 3 can appear. Therefore, the desired number must contain the subsequence 2132 (or conversely 2312).

Now, the digit 1 can only be added in such a way that 12132 (or the reversed sequence) is formed. Following this, only 312132 (or conversely) is possible.

b) At the four positions between the digits $4 \cdots 4$, one of the three digits 1, 2, 3 must appear twice. The digit 3 cannot be this (since there would not be enough space between two digits 3). If it were the digit 2, it would have to appear at the positions 42 . 24; between the digits 2, no digit 1 could then stand, so both digits 3 would have to stand there, which is not possible. Therefore, only $41 \cdot 1 \cdot 4$ (or conversely) is feasible.

Now, the entry $41 \cdot 134$ would require 41.134 3, although only two digits 2 are left to be entered. Therefore, only $41 \cdot 124$ and subsequently uniquely with $41 \cdot 124 \cdot 2$ and with 41312432 (or conversely 23421314) can continue.