• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4304
  • Last Modified:

Moving letters

Hi,
I have 8 coloured dots (represented by Y for Yellow dots) and B for blue dots. Underscore denotes a space. Below is the inital stage:
YYYY_BBBB
After rearranging, it should end up like the one shown below:
BBBB_YYYY
RULES: A dot can move to an empty space adjacent to it. A dot can jump over only one dot of either colour. Blue dots can only move to the right and Yellow dots to the left.

I have tried to cut out the dots and try to solve it by shifting the dots in all possible ways but i still cannot accomplish the goal without breaking the rules. Please help
0
dandeliondream
Asked:
dandeliondream
  • 2
1 Solution
 
Peter KwanCommented:
I am guessing there is a better way to do this. But here is my solution:

YYY_YBBBB
YYYBY_BBB
YYYB_YBBB
YY_BYYBBB
Y_YBYYBBB
YBY_YYBBB
YBYY_YBBB
YBYYBY_BB
YBYYB_YBB
YBY_BYYBB
YBYB_YYBB
YBYBY_YBB
YBYBYBY_B
YBYBYB_YB
YBYBYBBY_
YBYBYBB_Y
YBYBYB_BY
YBYB_BYBY
YB_BYBYBY
_BYBYBYBY
B_YBYBYBY
BBY_YBYBY
BBYBY_YBY
BBYBYBY_Y
BBYBYB_YY
BBYB_BYYY
BB_BYBYYY
BBB_YBYYY
BBBBY_YYY
BBBB_YYYY
0
 
Peter KwanCommented:
However, how can I follow the following rule which is impossible?

"Blue dots can only move to the right and Yellow dots to the left."

Since the yellow dots are originally on the left hand side and blue dots are on the right hand side.
0
 
dandeliondreamAuthor Commented:
yah you are right. it is impossible to follow the rules. Thanks for your help
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now