[comp.lang.pascal] Penny - Dime Problem

kdunn@lehi3b15.csee.Lehigh.EDU (Kevin Dunn) (12/12/90)

  I was wondering if any of you netlanders had any info on the following
problem:
   The problem is called the penny-dime problem.  You start with a ring with
13 spaces on it, and 6 pennies and 6 dimes.  The arrangement is
    PDPDPD<space>PDPDPD.  The object is to get PPPPPP<space>DDDDDD.
  Only 4 moves are allowed:  A left shift into the space, a right shift into 

the space, or a left or write jump over 1 into the space.
    If anyone has any leads for an alogrithm for solving this, please let me 
know.  Thanks in advance...
                    
                  Kdunn@lehi3b15.Csee.lehigh.edu

John G. Spragge <SPRAGGEJ@QUCDN.QueensU.CA> (12/16/90)

In article <1298@lehi3b15.csee.Lehigh.EDU>, kdunn@lehi3b15.csee.Lehigh.EDU
(Kevin Dunn) says:

>   The problem is called the penny-dime problem.  You start with a ring with
>13 spaces on it, and 6 pennies and 6 dimes.  The arrangement is
>    PDPDPD<space>PDPDPD.  The object is to get PPPPPP<space>DDDDDD.
>  Only 4 moves are allowed:  A left shift into the space, a right shift into
>the space, or a left or write jump over 1 into the space.

>                  Kdunn@lehi3b15.Csee.lehigh.edu

This looks to me like a problem that was invented to give students some
insight into the problems of sorting. I'd suggest that you look at a
book on sorts, and just offhand, you might want to pay some special
attention to bubble sorts.