Hi,

I do some calculations about graphs and ideals via M2 interface of Sage or 
just using M2, but for that, I have to use M2 input as below:

sage: macaulay2('loadPackage "Graphs"')
sage: macaulay2('G = graph({{1,2},{2,3},{3,4}})')  

as explained in the link:
http://math.uiuc.edu/Macaulay2/doc/Macaulay2-1.8.2/share/doc/Macaulay2/Graphs/html/_graph.html
Is there a way to convert a graph or an ideal written in Sage code into 
Maculay2 ones so that it can be employed in M2 interface. For instance,

sage: d={1:[2], 2:[1,3], 3:[2,4], 4:[3]}

sage: G = Graph(d)
sage: macaulay2('H=graph(G)')   (or H=macaulay2('graph(G)'))


Of course M2 won't accept my silly code in the 3rd line, but I've tried various 
ways like injecting a square free-quadratic-monomial ideal or edge list of a 
graph into M2 and I always fail.
I also have the same problem for ideals.

It's a long-standing problem of mine and it costs me writing heavy codes in 
Sage for multiple calculations. Calculating via M2 with Sage inputs will save 
lots of my time. 

Can anyone help?

Thanks in advance! :)


Best Regards

Mehmet

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to