RSK/Burge & difference in speed



 
Certainly I WANT to share it. BUT: Please note that is not finished yet.
1. no error handling
2. RSK (alternate form of Burge) is missing
3. TabloidP, SSYTableauP, SYTableauP is missing
4. not well commented and tested yet!!!

Usage: Burge([[1,1,1,2,2,3,3,3],[2,2,1,3,2,3,2,1]]) gives the
pair of Semi-standard-Young tableaux (SSYT) associated via the
Burge-correspondence with the permutation given. Note that the
"generalized permutation", i.e. the 2-rowed array TA should be given in
revers lexicographic order: TA[1] should be weakly increasing and if
TA[1][i]=TA[1][j] then TA[2][i]>=TA[2][j].
The result consists of two tableaux, the first is the so-called insertion
tableau, the second the recording tableau. A SSYT is increasing in rows
and strictly increasing in columns. I store the tableaux as lists of the
form [c_1, c_2, ... ,c_k], where c_i -- corresponding to the i^th column
-- is a list of strictly increasing integers.

By the way, it is probably obvious why lisp is faster: I can use the
common lisp built-in POSITION-IF, which is not available in Maxima.
Of course, this is true in this very special case only. I don't know
whether other algorithms are so much lisp-suited...

Hence my argument: use (common) lisp, if it's better suited than maxima,
use maxima, if it's better suited than lisp. I find no reason to avoid
lisp. In my opinion, it is one of the most important strengths of maxima,
that it has a lisp underneath!

Best wishes

On 10 Jan 2002, James Amundson wrote:

> On Thu, 2002-01-10 at 13:39, a9104910@unet.univie.ac.at wrote:
> > After compiling, the maxima code was faster than MMA by a factor of two,
> > but the lisp code was faster by a factor of eight (!). (Well, not very
> > thoroughly tested, though)
> >
> > Should we really write packages for which speed is an issue and for which
> > not much maxima stuff is needed in the maxima language? Of course, a
> > package written in lisp should run on all lisps that maxima supports, but
> > this is probably rarely a problem (or isn't it?)
>
> It would definitely be interesting to look at your code in order to
> analyze where the large speed difference arises. Would you be willing to
> share it with us?
>
> --Jim
>

Attached file: burge.max
Attached file: burge.lisp