The brainbuster

Find the solution to this brainbuster and win £200 of Amazon vouchers to spend on high-tech!

A division of Acme Software has five engineers, each in their own office. Which is just as well, because none of the engineers can stand to be in the same office at the same time as another one.

See the diagram below - we’ve shortened the names to single letters to protect the engineers’ identities (although I’m sure you could name names). There’s one empty office.

Image

Now B and E need to swap offices - what is the minimum number of moves that will achieve this? (By the way, the others aren’t bothered about which office they work in.)

You’ll need to give a valid solution showing which engineer moves into the empty office each time. For example, ACD…

Show your workings. Only complete entry forms will be considered. The judge's decision is final.

The competition closed on Sunday 17th December 2017.

The entries

There was good number of entries for this competition, although under half of the respondents found the correct answer. Some people seemed more taken with the description of the engineers not getting on with one another, and provided 'joke' answers. A few others maintained the minimum number of moves was 21.

In fact, the actual number was less than this, as demonstrated below.

The solution

The solution as provided by our winner was:

17 moves: BEDBACBDEADBCDAEB

Generated by [a] Prolog program which will give solutions 17 steps or smaller.
By experimentation with this program, there are no solutions with fewer than 17 moves.

And the winner is...

Jared Khan, studying for a BA in Computer Science at the University of Cambridge, is the winner of ecm's Brainbuster no. 42 competition.

Jared wins £200 of Amazon vouchers to spend on high-tech. Congratulations again to him, and watch out for ecm's next brainbuster, in 2018!