All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
Buggy problem (Posted on 2005-05-06) Difficulty: 2 of 5
You enter a laboratory and see 5 insects arranged from left to right in alphabetical order, according to name:

Ant, Bee, Cricket, Dragonfly, Earwig.

By moving two adjacent insects at a time and inserting them elsewhere in the set (still adjacent, no rotations), can you find the fewest number of steps needed to place the insects in reverse alphabetical order? Each time you move an insect, the gap it leaves behind will be closed up.

Examples of legal and illegal moves:

Legal:
ABCDE -> CDABE
ABCDE -> ACDBE

Illegal:
ABCDE -> CBADE (as though the bugs got rotated, which is not allowed)
ABCDE -> CADBE (the bugs you are moving must stay adjacent)
ABCDE -> BDACE (the bugs you are moving must start adjacent)
ABCDE -> BADEC (you get the idea)

Credit for this problem goes to Cliff Pickover

  Submitted by nikki    
Rating: 2.0000 (3 votes)
Solution: (Hide)
The quickest way is in three moves, but there are a few (16) ways to do it:

ABCDE -> CDABE (or ABCDE -> CDABE)
CDABE -> CBEDA (or CDABE -> CBEDA)
CBEDA -> EDCBA (or CBEDA -> EDCBA)

And of course there is the mirror image solution:

ABCDE -> ADEBC (or ABCDE -> ADEBC)
ADEBC -> EBADC (or ADEBC -> EBADC)
EBADC -> EDCBA (or EBADC -> EDCBA)

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Puzzle ThoughtsK Sengupta2024-07-11 02:53:07
definitely 3R Rod2005-05-10 22:02:13
comparing the two solutionsJer2005-05-06 17:04:22
3 another wayeric2005-05-06 16:29:24
3 it is thenFletch2005-05-06 14:37:13
re: 4 Swaps?Robert2005-05-06 14:31:15
4 Swaps?Fletch2005-05-06 14:05:13
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information