Ask Your Question

chebolu's profile - activity

2022-04-22 22:47:23 +0200 received badge  Famous Question (source)
2019-05-30 20:57:29 +0200 received badge  Notable Question (source)
2018-08-30 10:01:13 +0200 received badge  Popular Question (source)
2017-11-11 05:54:21 +0200 asked a question Finite graphs in latex

I want to have a finite graph G on 10 vertices in my latex document. I thought the easiest way to get it is to first draw it sage notebook using the graph_editor(). Then use latex(G) to get the latex code and copy and paste it. But when I do this, I keep getting errors. It says undefined control sequence for \Vertex..

Is there any example which will walk me through these steps? Many thanks for your help,

2017-03-05 19:40:31 +0200 received badge  Student (source)
2017-03-02 19:13:26 +0200 asked a question general linear group finite field

I am trying to compute the number of 3 x 3 matrices A over the field of p elements (p prime) such that A^2 = I. I wrote the following code which gives me the answers for p=2 and p=3, but it is taking for ever to compute when for p=5. Is there a better way to do this job which can speed up the computations? Many thanks for help.


def num_invol(n):
    G = GL(n,GF(3));
    sum = 0
    for A in G:
        if A^2 == G.one():
                sum = sum +1
    return sum

for p in (2..11):
    if p.is_prime():
        print (p, num_invol(p))
2015-05-14 03:21:14 +0200 asked a question How to create curved, directed, and labelled edges of a graph

I am using the graph_editor() to create a graph in the SageMath notebook. This is good but it does not allow me to create a curved edge, directed edge or a labelled edge. Does anyone know how to do this in SageMath? Thank you for your help.