We have several cubes that are ordered as in the picture below:

enter image description here

What is the smallest number of moves with which we are able to reach every possible order?

Only the order of the cubes in the columns matters, the ordering of the columns on the desk is irrelevant. The height and the number of columns may change.

Valid moves:

  • In every step we may take a cube and put it on another cube or on the desk.

Possible answers:

  1. $11$
  2. $14$
  3. $17$
  4. $23$
  5. $25$

My attempt:If we put all cubes on the desk and then bring them together we will need $17$ moves so every case can be made using $17$ moves.I also got a combination that needs at least $16$ moves because it is a test the answer will be $17$ but I need a complete proof.So my question is which combination needs $17$ moves to be made?

  • $\begingroup$ what do you exactly mean by random order? As my understanding there should be no consecutive letters together right? And the does solution has to be the same order with this one ( 5 -3 - 1 -2 )? $\endgroup$
    – Burak Mete
    Commented Aug 29, 2017 at 8:05
  • $\begingroup$ Can't you just have 11 empty spots on the desk and put the cubes there one by one at a randomly chosen still empty location in 11 moves? $\endgroup$ Commented Aug 29, 2017 at 8:09
  • 1
    $\begingroup$ @Taha Akbari Is A-C taken as a random order or a regular order ? Probably this summarizes Burak Mete's doubt as well.. $\endgroup$ Commented Aug 29, 2017 at 8:09
  • $\begingroup$ @BurakMete No I mean a order that every cube can be every where but the order of columns doesn't matter and consecutive letters can be next to each other.And the order doesn't have to be like $(5-3-1-2)$. $\endgroup$ Commented Aug 29, 2017 at 8:12
  • $\begingroup$ Either I’m really stupid or the emperor isn’t wearing any clothes.  What do you mean by “order”? $\endgroup$ Commented Aug 30, 2017 at 5:48

1 Answer 1


The correct answer is


one order that would require that many moves would be

a single stack of cubes with the cubes from top to bottom: ABCDEFGHIKJ

This way every cube has to be put on the desk and then on the stack. There is no shortcut. 7 moves to put all the cubes on the desk and then 10 moves to stack the cubes on top of each other.


Not the answer you're looking for? Browse other questions tagged or ask your own question.