Link to home
Create AccountLog in
Avatar of dandeliondream
dandeliondreamFlag for Singapore

asked on

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
Avatar of Peter Kwan
Peter Kwan
Flag of Hong Kong image

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
ASKER CERTIFIED SOLUTION
Avatar of Peter Kwan
Peter Kwan
Flag of Hong Kong image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of dandeliondream

ASKER

yah you are right. it is impossible to follow the rules. Thanks for your help