Ask Your Question
0

Obtaining mutation class of a quiver in Sage with Sage

asked 2024-02-09 07:31:19 +0100

klaaa gravatar image

Given a quiver $Q$ of finite mutation class (such as a Dynkin quiver), I want to use Sage to give me all quivers mutation equivalent to this quiver in terms of pictures. (I am using the Sage online cell for this https://sagecell.sagemath.org/ ) Here my attempts:

Attempt 1:

    Q = ClusterQuiver(['A',3])
Ts = Q.mutation_class()
[print(T) for T in Ts]

Attempt 2:

Q = ClusterQuiver(['A',3])
Ts = Q.mutation_class()
[plot(T) for T in Ts]

Both attempts do not work to produce visable pictures. Is there an easy fix? When I use Q.plot() , I get at least a picture of Q itself.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2024-02-09 08:54:33 +0100

rburing gravatar image

updated 2024-02-09 14:02:49 +0100

Try

graphics_array([plot(T) for T in Ts]).show(figsize=[3*len(Ts), 3], aspect_ratio=1)

or

cols = 10
rows = Integer(len(Ts)) // cols
graphics_array([plot(T) for T in Ts], ncols=cols).show(figsize=[3*cols, 3*rows], aspect_ratio=1)

or

for T in Ts:
    T.plot().show()
edit flag offensive delete link more

Comments

Thank you very much. The first way works in the sage online cell, while the second outputs nothing (I dont know why). But there is a small problem: For big quivers the pictures are too small and barely visible. Is there an easy way to make them larger so that it might also work for quiver with around 6-8 vertices? Here an example showing that the sage online cell doesnt display things very nice:

Q = ClusterQuiver(['D',5])
Ts = Q.mutation_class()
graphics_array([plot(T) for T in Ts])
klaaa gravatar imageklaaa ( 2024-02-09 09:24:32 +0100 )edit

@klaaa Sorry about that, I've updated the answer.

rburing gravatar imagerburing ( 2024-02-09 13:18:25 +0100 )edit

Thank you very much again! I noted that there is an error for E7:

Q = ClusterQuiver(['E',7])
Ts = Q.mutation_class()
graphics_array([plot(T) for T in Ts]).show(figsize=[3*len(Ts), 3], aspect_ratio=1)
display(len(Ts))

A last small question: Is there an easy command to filter out those quivers, which are not acyclic (as a directed graph)?

klaaa gravatar imageklaaa ( 2024-02-09 13:51:58 +0100 )edit

You can add conditions to a list comprehension, e.g. [plot(T) for T in Ts if T.is_acyclic()] or [plot(T) for T in Ts if not T.is_acyclic()].

rburing gravatar imagerburing ( 2024-02-09 14:04:31 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-02-09 07:31:19 +0100

Seen: 99 times

Last updated: Feb 09