Re: [sage-combinat-devel] Re: dot2tex, combinat

2011-11-22 Thread Anne Schilling
On 11/21/11 11:02 PM, William Stein wrote:
> On Mon, Nov 21, 2011 at 7:01 PM, Anne Schilling  wrote:
>> On 11/21/11 8:24 AM, William Stein wrote:
>>> On Mon, Nov 21, 2011 at 8:08 AM, Dima Pasechnik  wrote:
 This means you have graphviz spkg installed under macosx...
 I cannot seem to be able to accomplish this:
 http://trac.sagemath.org/sage_trac/ticket/7438
>>>
>>> I installed graphviz under OS X by installing it from the Graphviz
>>> website, instead of using the spkg.
>>
>> After installing dot2tex using
>>
>> sage -i dot2tex
>>
>> does the command
>>
>> sage: CrystalOfTableaux(['A',2], shape=[1]).latex()
>> '\n\\begin{tikzpicture}[>=latex,line join=bevel,]\n%%\n\\node (1) at 
>> (8bp,162bp) [draw,draw=none]
>> {${\\def\\lr#1{\\multicolumn{1}{|@{\\hspace{.6ex}}c@{\\hspace{.6ex}}|}{\\raisebox{-.3ex}{$#1$}}}\\raisebox{-.6ex}{$\\begin{array}[b]{c}\\cline{1-1}\\lr{1}\\cline{1-1}\\end{array}$}}$};\n
>>   \\node
>> (3) at (8bp,10bp) [draw,draw=none]
>> {${\\def\\lr#1{\\multicolumn{1}{|@{\\hspace{.6ex}}c@{\\hspace{.6ex}}|}{\\raisebox{-.3ex}{$#1$}}}\\raisebox{-.6ex}{$\\begin{array}[b]{c}\\cline{1-1}\\lr{3}\\cline{1-1}\\end{array}$}}$};\n
>>   \\node
>> (2) at (8bp,86bp) [draw,draw=none]
>> {${\\def\\lr#1{\\multicolumn{1}{|@{\\hspace{.6ex}}c@{\\hspace{.6ex}}|}{\\raisebox{-.3ex}{$#1$}}}\\raisebox{-.6ex}{$\\begin{array}[b]{c}\\cline{1-1}\\lr{2}\\cline{1-1}\\end{array}$}}$};\n
>>   \\draw
>> [blue,->] (1) ..controls (8bp,140.79bp) and (8bp,121.03bp)  .. (2);\n  
>> \\definecolor{strokecol}{rgb}{0.0,0.0,0.0};\n  
>> \\pgfsetstrokecolor{strokecol}\n  \\draw (17bp,124bp) node {$1$};\n  \\draw
>> [red,->] (2) ..controls (8bp,64.789bp) and (8bp,45.027bp)  .. (3);\n  \\draw 
>> (17bp,48bp) node {$2$};\n%\n\\end{tikzpicture}\n'
>>
>> work?
> 
> Yes.
> 
> When I was preparing my talk, I was evidently using sage-4.7.1.  I
> upgraded to a newer version of Sage, and the issue is totally
> resolved.   Sorry for the noise and thanks for the further debugging 
> questions.
> 
> Just to confirm, doing
> 
> sage: CrystalOfTableaux(['A',2], shape=[1]).latex_file('/tmp/a.tex')
> sage:
> 
> no longer gives an error for me, and it *does* create the file
> /tmp/a.tex and if I go to the /tmp directory, pdflatex it, and view
> the
> resulting pdf, then I get the diagram.

By the way, you should be able to bypass the step of pdflatex in a directory by
using the commands

sage: C = CrystalOfTableaux(['A',2], shape=[1])
sage: view(C)

directly in Sage. The picture should just come up.

Best,

Anne

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
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.



[sage-combinat-devel] Segfault in DiGraph.automorphism_group

2011-11-22 Thread Florent Hivert
  Hi there,

I want to report a segfault in DiGraph.automorphism_group.

> On my machine the following code creates a segfault if
> finite_semigroup-nt.patch is applied and works if not. 
> 
> sage: G = DiGraph()
> sage: G.add_vertices([1, 6, 9])
> sage: G.add_edges([(9, 1, None), (9, 6, None)])
> sage: G.automorphism_group()
> 
> 
> Can someone confirm that the segfault happen on other machine ?
> 
> For Nicolas: could it be related to the recent work on categories ?

We (Nicolas & myself) tracked back the segfault and found that it was
triggered by the category system but it should have nothing to do with it. The
problem seems to been raised by an early import of DiGraph.

Here is a simple way to trigger the segfault:

Starts from vanilla sage-4.7.2 together with the following patch:

"""
# HG changeset patch
# Parent 9e29a3d84c48c399daaf3920bcb8b17273a0e876
diff --git a/sage/categories/all.py b/sage/categories/all.py
--- a/sage/categories/all.py
+++ b/sage/categories/all.py
@@ -39,6 +39,8 @@ from finite_monoids import FiniteMonoids
 from finite_groups import FiniteGroups
 from finite_permutation_groups import FinitePermutationGroups
 
+from sage.graphs.digraph import DiGraph
+
 # fields
 from number_fields import NumberFields
"""

Then,

sage: DiGraph().automorphism_group()

Kaboom !!!

I don't think I'll have time to investigate this further. Should I open a
ticket ?

Cheers,

Florent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
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.



[sage-combinat-devel] RSK for type B

2011-11-22 Thread Nicolas M. Thiery
- Forwarded message from Aba Mbirika  -
Does anyone know if any RSK algorithm code has been written for type B
signed permutations.  Stanton-White give a generalized RSK for k-rim
hook tableaux.  When k=2, this basically amounts to a bijective map
from signed permutations onto the set of pairs of standard young
bitableaux ( (P_1,P_2), (Q_1,Q_2) ), where the P_i and Q_i have the
same shape.  And the tuple (P_i,Q_i) is just the standard type-A RSK
image of the positively-signed and negatively-signed entries of the
signed permutation, respectively, for i=1,2.  I am very familiar with
the algorithm as I've been doing it by hand for some time now, but I
would like to do more computations and the hand-technique seems no
longer feasible.  Does anyone know if this has already been coded in
Sage or otherwise?  The image of this generalized map may also appear
as pairs of same-shape domino tableaux of sufficiently-large sized
core.

Thank you,
Aba Mbirika (ambir...@bowdoin.edu)

Postdoctoral Fellow at Bowdoin College
www.bowdoin.edu/~ambirika
- End forwarded message -

Nicolas
--
Nicolas M. ThiƩry "Isil" 
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
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.