The following program is designed to apply Knuth Equivalences and Dual Equivalences, as well as create their related Dual Equivalence Graphs. Several implimentations were tried and tested for time considerations. Below the code is a demonstration of various features of the program.
Introdution: The Knuth Equivalences are a well studied equivalence relation on permutations. More recently, people have begun to look at a dual of this relation. More recently still, people have begun to look at the graph given by this dual as a means. In such a graph, each connected component corresponds to an equivalence class.
The intended application is as follows. It is, in general, a dificult problem to tell if a symmetric function is Schur Positive (has nonneggative integer coefficients over the basis of Schur functions). By moving to the broader basis of Elementary Quasi-symmetric functions, which are provide easier closed formulas, we hope to come up with a simpler criterion for Schur positivity. Though we are graphing permutations, each of these permutations corresponds to an elementary quasisymmetric function, and each connected component corresponds to a schur function. The problem then translates into whether a graph on quasisymmetrics can transformed into these nice components, which can be couned in non-negative intergers.
There is more explanation below.
__home_com..._6_code_sage2_spyx.c   __home_com...code_sage2_spyx.html   __sagenb_s...15_code_sage2_spyx.c   __sagenb_s...code_sage2_spyx.html
|
We have acually already saved some graphs in dictionaries that we will call later.
|
We will now demo some of the capabilities. First, the Knuth and dual equivalences act as either the identity or as a transposition on permutations. The inputs are a permutation and a number $i$ in $2\leq i \leq n-1$. See if you can figure out the rule being applied.
[2, 3, 1, 5, 4] [2, 1, 3, 5, 4] [2, 1, 5, 3, 4] [3, 1, 2, 5, 4] [2, 1, 3, 5, 4] [2, 1, 4, 5, 3] [2, 3, 1, 5, 4] [2, 1, 3, 5, 4] [2, 1, 5, 3, 4] [3, 1, 2, 5, 4] [2, 1, 3, 5, 4] [2, 1, 4, 5, 3] |
All of these functions have been designed to accept integers, lists, and tuples, though large permutations do not accept integers due to ambiguities witht two digit numbers.
[2, 3, 1, 5, 4] [2, 1, 3, 5, 4] [2, 1, 5, 3, 4] [3, 1, 2, 5, 4] [2, 1, 3, 5, 4] [2, 1, 4, 5, 3] [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1] [2, 3, 1, 5, 4] [2, 1, 3, 5, 4] [2, 1, 5, 3, 4] [3, 1, 2, 5, 4] [2, 1, 3, 5, 4] [2, 1, 4, 5, 3] [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1] |
The key feature of the program is that it generates Dual Equivalence Graphs. That is, if you give it a permutation, it will apply all dual equivalences to get new vertices attached by edges labeled by the $i$ value of the equivalence. It then repeats the process on the new vertices to generate the entire connected component. Again, this has been programmed to accept integers, lists, and tuples.
|
These graphs can get quite complicated, so it is very helpful that sage has several built in features to change how they are displayed.
It is sometimes helpful to clean up the graphs further by eliminating double edges. Additionally, some functionality of sage does not work on multi-edge graphs. Plus, single edge graphs are cleaner looking and usually faster to create.
|
The difference is more striking for larger graphs. (The following cell takes a minute or two to run.)
|
We may employ another function to produce complete lists of graphs quickly. Below are all degree 7 graphs (which may have never been produced in entirety before this). That is, below is a complete partition of $S_n$ into its dual equivalence classes in graph form. Again, a presaved dictionary would be faster, but this lets us demonstrate a useful function that can be utilized for any degree.
|
For speedy future tests, we also save small degree graphs in a dictionary, which are saved to the worksheet and automatically loaded upon opening. This is a good example of how to use the functions partitions (built into sage) and Rep_Word (part of this worksheet) to make a single representative word for each isomorphism type. It may also be helpful to realize that SE_DEG tends to run faster thatn DEG. Also, multi-edge graphs do not save correctly without adding a patch to save. For this reason, they are not currently saved to the worksheet.
|
|
Graph on 168 vertices Graph on 168 vertices |
We may also use sage to test standard graph properties.
True True |
False False |
DEGs have been checked to be bipartite up to degree 9. Below is a bit of code for testing such things, but really, one of the premade dictionaries could speed this up for degree less than or equal to 9.
[5, 4, 3, 2, 1] passes! [5, 4, 3, 1, 2] passes! [5, 3, 4, 1, 2] passes! [5, 4, 1, 2, 3] passes! [4, 5, 1, 2, 3] passes! [5, 1, 2, 3, 4] passes! [1, 2, 3, 4, 5] passes! They all passed! [5, 4, 3, 2, 1] passes! [5, 4, 3, 1, 2] passes! [5, 3, 4, 1, 2] passes! [5, 4, 1, 2, 3] passes! [4, 5, 1, 2, 3] passes! [5, 1, 2, 3, 4] passes! [1, 2, 3, 4, 5] passes! They all passed! |
Finally, we should point out that work is being done on a more general version of dual equivalence, which we will call LLT Dual Equivalence for reasons that do not matter to the casual reader. This dual equivalence takes an extra input of a weekly increasing word $w$ such that $w_i \geq i+1$ exept for the last entry $w_n=n.$ (Even this definition of LLT dual equivalence is not quite standardized.)
[1, 3, 2, 4] [1, 3, 2, 4] |
The process is more computationally heavy, but we may make and save lists as before. Again, the SE_LLTs are a bit faster to generate. Regaurdless, the computational time grows quickly. LLTs5 takes about 16 seconds of wall time. Moving up to 7 would probably put the computation time around a day or two.
2 3 4 5 6 CPU time: 2113.59 s, Wall time: 2367.74 s 2 3 4 5 6 CPU time: 2113.59 s, Wall time: 2367.74 s |
We have just made all degree 6 LLT DEGs. Infact several other dictionaries, LLTs5, SE_LLTs5, and SE_LLTs6, are also saved to this worksheet and automatically loaded upon opening the worksheet.
13 13 88 88 13 13 88 88 |
We do not have an easy way of calling a particular graph type in this case, so we must simply call them by the number in which they appeared in the above algorithm.
|
We end with what is probably the first ever display of all degree 6 LLT Dual Equivalence Graphs. There is an open question of whether all LLT Dual Equivalence graphs can be turned into standard dual equivalence graphs by "acceptable" modifications to the edge sets. At this point, it is possible (if unlikely) that a counter example is displayed below.
|
This concludes the walk through. We hope you found it fun, eductional, and utilitarian. If nothing else, there seems to be promise as a Warshak test generator.
|