
Optimal Card Stacking
Card Stacking is a game on a computer starting with an array of

For the given arrangement of 6 cards the minimum total distance is
For
We define
For example, when
You are given
Find
Note:
Card Stacking is a game on a computer starting with an array of
For the given arrangement of 6 cards the minimum total distance is
For
We define
For example, when
You are given
Find
Note: