Ask Your Question

GA316's profile - activity

2024-04-12 20:15:37 +0200 marked best answer labelling the edges of poset

P = SetPartitions(3) f = lambda q,p: q in p.refinements() Po = Poset((P,f))

By using this command I have defined a poset in sage.

Po.show() displays the poset as a directed graph. My question is how to put labels to edges of this graph. when I try to do so, I try to iterate over the edge set like:

for u in Po.edges() :

but sage saying the error message that poset object has no method edges.

Can any one tell me how to put label for this directed graph.

If we define the corresponding Hasse diagram then we can define label, but I want to do label for the edges in the poset but not for the edges in the Hasse diagram. because when we display the pose it looks nice to see, but when we print Hasse diagram it looks little messy.

Thanks for your valuable time.

2024-03-18 10:08:26 +0200 received badge  Famous Question (source)
2024-03-18 10:08:26 +0200 received badge  Notable Question (source)
2024-02-21 11:25:28 +0200 received badge  Popular Question (source)
2024-02-21 11:25:22 +0200 received badge  Notable Question (source)
2023-09-13 22:08:10 +0200 received badge  Famous Question (source)
2023-04-10 14:19:57 +0200 received badge  Popular Question (source)
2022-09-29 04:36:02 +0200 asked a question Distances in k-uniform hyper graphs

Distances in k-uniform hyper graphs Hello Everyone, I have the following questions. 1. How to use k-uniform hy

2022-05-20 20:39:06 +0200 received badge  Notable Question (source)
2022-03-14 16:12:17 +0200 received badge  Popular Question (source)
2022-02-16 12:46:38 +0200 received badge  Popular Question (source)
2022-01-13 11:25:33 +0200 received badge  Famous Question (source)
2021-09-11 04:43:20 +0200 received badge  Popular Question (source)
2021-07-16 22:13:27 +0200 received badge  Notable Question (source)
2021-07-16 22:13:27 +0200 received badge  Popular Question (source)
2020-12-29 21:26:31 +0200 received badge  Popular Question (source)
2020-12-29 21:26:31 +0200 received badge  Notable Question (source)
2020-10-09 05:26:58 +0200 received badge  Famous Question (source)
2020-09-22 05:16:29 +0200 received badge  Popular Question (source)
2020-02-20 02:06:06 +0200 marked best answer Partially commutative monoid of a graph

I am interested in the free partially commutative monoid associated to a graph whose definition can be seen here www.sciencedirect.com/science/article... and here https://en.m.wikipedia.org/wiki/Trace....

Basically I need a free monoid in which some variables commutes.

My questions are

  1. whether this notion is already implemented in Sage?

  2. If not how to implement this in Sage?

2020-02-20 02:06:00 +0200 received badge  Popular Question (source)
2020-01-10 07:16:56 +0200 received badge  Notable Question (source)
2019-09-10 11:51:05 +0200 received badge  Associate Editor (source)
2019-09-10 11:41:54 +0200 asked a question $p$-adic extension of $n$th root of unity.

I have used the following command to define the 5-adic Unramified extension ring in c defined by the polynomial $x^3 + 3x + 3$:

Sage: R.<c> = zq(125, prec=20)

Now, I want to find all the $n$th root of unity in this ring for $n$ dividing $124$. I dont know, how the $n$-th roots are implemented. Kindly help me with this.

Thank you.

2019-09-10 11:36:10 +0200 received badge  Enthusiast
2019-08-27 10:59:52 +0200 received badge  Nice Question (source)
2019-08-19 12:05:49 +0200 asked a question Automorphism group of Coxeter groups

Coxeter groups can be invoked using the comment

W = CoxeterGroup(['A',3],implementation='reflection')

Now, W has three simple reflections S_1, S_2 and S_3. and I am interested in studying the automorphism S_1 -----> S_3, S_2 -----> S_2 and S_3 -----> S_1. Can any one please tell me, how to implement this automorphism of W in sage?

Thank you.

2019-08-08 08:13:05 +0200 commented question tree ordering in sage

Sorry, I shall paste it like this in future. Thanks for your comment.

2019-08-08 08:11:29 +0200 commented answer removing the repeated rows of a matrix

This is a great answer and it works perfectly. Thanks for your valuable time.

2019-08-07 13:54:59 +0200 asked a question removing the repeated rows of a matrix

My sage program outputs a matrix with integer entries in which some rows are repeated. But I want to remove the multiple entries of rows in the output. Kindly somebody explains to me how to do this.

Thank you.

2019-08-07 06:18:41 +0200 asked a question tree ordering in sage

I am using the following code to generate the isomorphism class of trees of order $n$.

sage: from sage.graphs.trees import TreeIterator
sage: def check_trees(n):
....:     trees = []
....:     for t in TreeIterator(n):    
....:         if not t.is_tree():  
....:             return False 
....:         if t.num_verts() != n: 
....:             return False   
....:         if t.num_edges() != n - 1:
....:             return False
....:         for tree in trees:
....:             if tree.is_isomorphic(t):
....:                 return False
....:         trees.append(t)
....:     return True

Then when I print the trees in TreeIterator using loops it is giving the trees in a particular order.

Can anyone explain to me what is this predefined order on trees of order $n$ on sage?

For n = 6, we have the following order.

image description

image description

image description

image description

image description

image description

2019-08-05 10:43:37 +0200 commented answer caterpillar graphs in sage

Can you please explain to me what is the number of vertices and vertices of degree on in $G$? It keeps changing when I run. Thank you.

2019-08-05 08:57:15 +0200 asked a question caterpillar graphs in sage

A caterpillar or caterpillar tree is a tree in which all the vertices are within distance 1 of a central path.

How to define caterpillar graphs in sage? is it already implemented?

Kindly help me with this.

Thank you.

2019-08-04 08:32:11 +0200 commented answer graphs of order n

Thank you. one doubt. graphs(5) gives the list of graphs up to isomorphism?

2019-08-04 08:29:15 +0200 marked best answer graphs of order n

How to generate all the graphs of particular order $n$ in sage?

is it possible to do the same up to isomorphism at least for small $n$?

Thank you.