Jump to content

Tough Logic Puzzle?


ZachMEdwards

Recommended Posts

My (nerd) friend presented me this puzzle today:

 

There are 4 people on 2 sides of a room, with 1 empty spot in the middle (looks like AAAA_BBBB).

 

Your ending goal is to reverse the starting order. So the solution is BBBB_AAAA.

 

Here are the valid moves:

  • Advance: Person moves into blank tile. (AAAA_BBBB -> AAA_ABBBB)
  • Pass: Person hops around another person of opposite type into blank tile. (AAA_ABBBB -> AAABA_BBB)

 

I've been at this for a good time and I still can't figure it out. I mean I guess I could hard write a solution but that'd be for a fixed amount (4 A's and 4 B's).

 

I was think recursion but I'm not sure... Needing help ASAP in order to get my free lunch tomorrow! :D

Link to comment
Share on other sites

Does this work????

 

 

AAAA_BBBB

AAA_ABBBB

AAABA_BBB

AAAB_ABBB

AA_BAABBB

A_ABAABBB

ABA_AABBB

ABAA_ABBB

ABAABA_BB

ABAAB_ABB

ABA_BAABB

ABAB_AABB

AB_BAAABB

_BABAAABB

B_ABAAABB

BBA_AAABB

BBAA_AABB

BBAAA_ABB

BBAAABA_B

BBAAABAB_

BBAAAB_BA

BBAA_BABA

BBA_ABABA

BBABA_ABA

BBABABA_A

BBABAB_AA

BBAB_BAAA

BB_BABAAA

BBB_ABAAA

BBBBA_AAA

BBBB_AAAA

Link to comment
Share on other sites

strrev may produce the correct output, but it doesn't adhere to the rules stated.

 

I beg to differ.  It's not my fault the rules were vaguely stated.

 

 

 

 

The program is just a representation for the abstract problem. The output itself isn't important, what it represents is. If I created a suitable solution but made it so it outputs the result using 0s and 1s rather than As and Bs there would be no difference because they both represent the same idea. However, your output doesn't represent the idea, so it is therefore meaningless.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.