From: "Guy S" <no@spam.net>
Path: news.mathworks.com!newsfeed.mathworks.com!webx
Newsgroups: comp.soft-sys.matlab
Subject: Re: MATLAB Programming Contest: November 3-10, 2004
Message-ID: <eeefd44.8@webx.raydaftYaTP>
Date: Wed, 3 Nov 2004 10:46:08 -0500
References: <eeefd44.-1@webx.raydaftYaTP>
Lines: 25
NNTP-Posting-Host: 80.179.204.113
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:239251


In the example provided, aren't you missing a duplicate [3 3 ] move ?

aInit = [ 4 0 0 3 ;
           0 0 0 0 ;
           0 0 0 0 ;
           1 2 0 0 ]

aFinal = [ 0 0 0 4 ;
           0 0 0 0 ;
           0 2 3 0 ;
           0 1 0 0 ]

wt = [ 5
       10
       20
        1 ];

One solution is
move = [ 3 4
         3 3
         4 2
         4 2
         4 2
         2 1
         1 2]