# Rearranging numbered cards to reverse their order

I have been thinking about this question for a long time, but I can't solve it. Here is the question:

We have $9$ cards, with numbers one to nine written on them (in the order $1, 2, \ldots , 9$).

You can move $n$ cards, if they are located next to each other (physically, not numerically).

First, I have to show how to make it $9, 8, 7, \ldots, 1$ in five moves and then prove that it is possible.

Sorry for any spelling and grammar errors, improper tags or any other mistake.

An example of a valid move:

We pick cards $1,2,3,4$ and put them between $7$ and $8$. The sequence after the move looks like this: $$5,6,7,1,2,3,4,8,9.$$

• It's not totally clear what you mean by 'You can move $n$ cards if they are located next to each other'. What are the valid moves you can do to the sequence of numbers $a_1,a_2,\ldots,a_9$? (I hope my edits haven't changed the meaning of your question - they were mostly formatting and grammar changes). – Dan Rust Dec 1 '13 at 19:44
• @DanielRust hi. thanks for the edit . I made an example of a correct move. hope it helps – soheils Dec 2 '13 at 11:40
• is it clear enough? – soheils Dec 2 '13 at 14:53
• Is the move from 123456789 to 145672389 legal? – Did Dec 2 '13 at 16:28
• @Did yes. it is a legal move – soheils Dec 2 '13 at 17:32