Search

 
Problem Description
Four piles of blocks, each 6 blocks high and
containing the letters "A' through "F" are scrambled versions of the
"solution" stack. For each of the 4 stacks, you are given the number
of pairs that match the solution stack and the number of pairs that are
reversed versions of pairs in the solution stack. Your job is to
reconstruct the solution stack.
Background & Techniques
The "piles of blocks" aren't the random result of child's play but clues
to a final solution stack. Like the rest, this final pile has 6 bricks, each
with a different one of the six letters. Your job is to determine the order
of the blocks in the final pile.
The numbers below the piles tell you two things:
 The number of adjacent pairs of bricks in the that column also
appear adjacent in the same order in the
final stack. 
 The number of adjacent pairs of bricks that make a correct pair but
are in the wrong order. 
This puzzle was adapted from "Logical Puzzles  320 Teasing Tests of Your
Mental Acumen", Chartwell Books
Inc., 2006.
If you want to try to solve it yourself, you can enter letters A
through F in the solution column and the current counts of "Inorder"
and "Reversed" matches against each of the other stacks will show up in the "User Guesses" box.
When your stack's counts of Inorder and Reversed pairs matches the
numbers comparing each stack to the solution, you've solved it!
The "Solve" button will solve the puzzle by searching through all 720
possible ways to arrange the 6 blocks in a stack (6 choices for the first
block, 5 choices for the second, etc. 6x5x4x3x2x1=720).
The "Create" button will create new random puzzles with unique
solutions.
Nonprogrammers are welcome to read on, but may
want to skip to the bottom of this page to download
executable version of the program.
{Program description to be added later  no time
today, so it's this or not post at all.}
Running/Exploring the Program
Suggestions for Further Explorations
 I had originally planned to use a stack image
with blank blocks and draw the letters on the blocks in the image for
each stack. Just ran out of time. 
 A "Hint" button could reveal a different letter of the
solution for each click. 
 I wonder about the "extreme" configurations.
 Could a puzzle be created with no matching and no reversed
pairs? If not, what is the minimum sum of "In order" and
"Reversed" pair counts? 
 If the four stacks were not scrambled at all, there would
be 5 pairs in order for each stack (20 in total). If the
stacks were all inverted versions of the solution stack, there would
be 5 reversed pairs for each. Could the sum of the "In order"
and "Reversed" counts be 20 for any other configurations? If
not, what is the next highest count possible? 
 My Create button filters out all nonunique random puzzles it
creates, but I wonder: What is the maximum number of solutions that
might exists for a particular puzzle? 

Original Date: March 3, 2008 
Modified:
May 15, 2018 

