I am struggling with the following problem / riddle, which reads:
A tea merchant has five tin tea boxes of cubical shape, which he keeps on his counter in a row. Every box has a picture on each of its six sides, so there are thirty pictures in all; but one picture on No. $1$ is repeated on No. $4$, and two other pictures on No. $4$ are repeated on No. $3$. There are, therefore, only twenty-seven different pictures. The owner always keeps No. $1$ at one end of the row, and never allows Nos. $3$ and $5$ to be put side by side.
The tradesman's customer, having obtained this information, thinks it a good puzzle to work out in how many ways the boxes may be arranged on the counter so that the order of the five pictures in front shall never be twice alike. Of course, two similar pictures may be in a row, as it is all a question of their order.
So here is my attempt:
If all the figures on the boxes were different, then we'd have $30$ different pictures, but due to the condition above, we only have $27$ different figures on the boxes.
Now, the other condition is Box $1$ at the end, and $3$ and $5$ never near, which leaves the total combinations (orders) of the boxes to twelve:
$1-2-3-4-5$
$1-3-2-4-5$
$1-3-4-2-5$
$1-3-2-5-4$
$1-3-4-5-2$
$1-4-3-2-5$
Plus the symmetry of the exchange $5\to 3$
So I have $12$ possible dispositions of the boxes.
Now, let's call the figures on each box as
$$1 = \{A_1, A_2, A_3, A_4, A_5, A_6\}$$ $$2 = \{B_1, \ldots, B_6\}$$ $$3 = \{C_1 \ldots C_6\}$$ $$4 = \{D_1, D_2, D_3, A_1, C_1, C_2\}$$ $$5 = \{E_1 \ldots E_6\}$$
The box $4$ is written as this because the text says one figure is on box $1$ and two on box $3$ hence I took box $4$ as the "reference frame$ with less pictures.
Due to this I have managed to work out that, for the combination $1-2-3-4-5$ there are $576$ possible ways to order the boxes in relation to the figures.
But then there are other $11$ dispositions, and I don't know how to cut off the identical orders.
This shall be the solution:
There are twelve ways of arranging the boxes without considering the pictures. If the thirty pictures were all different the answer would be $93,312$. But the necessary deductions for cases where changes of boxes may be made without affecting the order of pictures amount to $1,728$, and the boxes may therefore be arranged, in accordance with the conditions, in $91,584$ different ways. I will leave my readers to discover for themselves how the figures are to be arrived at.
Editing the answer given by @Bram28
Total 432+432+864 = 1728