Hey Dima,
   What I was thinking of was ECII and generalized permutations had the 
condition that if we had repeated indices in the top row, the bottom had to 
be weakly increasing, and then also be able to go back and forth between 
N-matrices.

   However, you do make a good point, but what about for objects which are 
implicitly a two-line array and taking advantage of that? In 
particular, any word implicitly has the top row of 1,2,...,n, so I don't 
want to create that list, but I guess we could get around this by using a 
generator. The other is a N-matrix and we don't necessarily have to create 
the two-line array to do the RSK.

   Actually, on that thought, perhaps we need an iterator in the 
appropriate objects which create pairs of integers which then row insertion 
gets performed. Thus the RSK function would go like this:

def RSK(obj1, obj2=None):
    if obj2 is None:
        try:
            itr = obj1._rsk_iter()
        except AttributeError:
            itr = obj1
    else:
        itr = zip(obj1, obj2)

    for (a,b) in itr:
        # do RSK
    return (P,Q)

   For the inverse, this would likely have to be implemented as 
constructors in the appropriate objects. Although perhaps we should put the 
common code in a category (or metaclass)...

Hey Martin,
   Thank you for posting the code and references. However I'm thinking that 
that might be something left to another ticket (if you wanted it 
incorporated into sage).

Best,
Travis


On Wednesday, November 28, 2012 8:26:04 AM UTC-8, Dima Pasechnik wrote:
>
> On 2012-11-28, Anne Schilling <an...@math.ucdavis.edu <javascript:>> 
> wrote: 
> > On 11/28/12 5:35 AM, Dima Pasechnik wrote: 
> >> On 2012-11-27, Travis Scrimshaw <tsc...@ucdavis.edu <javascript:>> 
> wrote: 
> >>> ------=_Part_468_5000489.1354057101700 
> >>> Content-Type: text/plain; charset=ISO-8859-1 
> >>> 
> >>> Hey everyone, 
> >>>    I've been trying to figure out how to handle generalized 
> >>> permutations (a.k.a. two-line arrays, bi-words, ...) since we want 
> >>> Permutation() to only accept input from 1 to n. 
> >> A typical misuse of Permutation is in 
> >> sage/combinat/integer_vector_weighted.py 
> >> where nothing prevents one to return lists all the time. 
> >> Cf. e.g. the relevant part of 
> >> 
> http://trac.sagemath.org/sage_trac/attachment/ticket/13742/trac_13742_reviewer1.patch
>  
> >> Yes, and the RSK stuff is a more tricky one. 
> >> 
> >> I have a stupid question: why can't one just use lists? 
> >> One should not overdesign. What are the real 
> >> reasons for GeneralizedPermutation to come? 
> >> E.g. to have a special class to just handle a pair of lists of 
> >> equal length is a big an overdesign to me. 
> >> And if you need the first list to be ordered, use a pair (set,list) 
> > 
> > Hi Dima, 
> > 
> > This last suggestion would indeed be a good idea. Where would you put 
> the 
> > code in this case? The input would be a (set,list) and the output 
> > a pair of semistandard Young tableaux, so it is not so obvious where it 
> > belongs. 
>
> I guess it's a perfect illustration of **limits** of the object-oriented 
> approach. 
> RSK takes (p,q) in PxQ and outputs (a,b) in AxB. 
> Does this mean we have to knock ourselves out creaing classes for each 
> pair of classes P,Q  we have? 
> And note that P and Q is so general that there are undoubtly zillions 
> of functions out there which can take P and Q and output something that 
> has absolutely nothing to do with RSK, SSYTs, even combinatorics in 
> general. 
>
> Just put RSK in global scope (or, better, in a package, which incorporates 
> stuff 
> that deals with A and B, which here is much more restrictive than P and 
> Q). 
> Or, if you must go OO, you can think of RSK as a constructor 
> for elements of AxB (do you have a class for pairs of tableaux 
> already?). In this way you don't need to worry about a new 
> class for PxQ, at least. 
>
> HTH, 
> Dima 
>
>
>
> > 
> > Best, 
> > 
> > Anne 
> > 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/DhvffvVrzPwJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to