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

See The Solution Submitted by nikki    
Rating: 2.0000 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
3 another way | Comment 4 of 6 |
ABCDE
ADEBC
EBADC
EDCBA

  Posted by eric on 2005-05-06 16:29:24
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (7)
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