# Questions tagged [sagemath]

For questions concerning the mathematical software system SageMath. Consider whether your question would be a better fit at [ask SageMath](http://ask.sagemath.org/).

193 questions
29 views

### Generating words in a finitely presented group in SAGE

I'm trying to get a list of all words of length $n$ (in the word metric sense) in some finitely presented group. I have tried some very naive enumerations but it is very slow. Is there an efficient ...
19 views

### How to translate an element in a Coxeter group written as a matrix in Sage to reflections (a list)?

I am trying to use Sage to reduce a word to a reduced word. For example, consider the word $w=[4, 3, 2, 4, 3, 2, 1, 2, 4, 3, 2, 1, 3]=s_4s_3s_2s_4s_3s_2s_1s_2s_4s_3s_2s_1$. I used the following code ...
82 views

64 views

### Homology of a chain complex with unknow boundary map

Question. Let $(C_\bullet,\partial)$ be a $\mathbb{Z}/2\mathbb{Z}$-chain complex generated by $a$, $b_1,b_2,b_3$, $c_1,c_2$ with gradings: $$|a|=2,|b_1|=|b_2|=|b_3|=1,|c_1|=|c_2|=0.$$ Which ...
19 views

### quadratic gauss sum calculation in sage

I tried to calculate quadratic gauss sum in SAGE but it works just for primes 3 and 5 which are $i\sqrt{3}$ and $\sqrt{5}$ respectively. p=3 print sum((legendre_symbol(x,p))*(e^(2*piIx/p)) for x in ...
60 views

### Sage code to check independence of rational points on elliptic curve

Suppose I have three rational points $(x_1,y_1),(x_2,y_2),(x_3,y_3)$ on certain elliptic curve. Then they are linearly independent if and only if the determinant of matrix $(<P_i,P_j>)_{i,j}$ is ...
10 views

### periodicity of a word

I have the following code to create words. sage: M. = FreeMonoid(3) sage: Word(x^3yxz^2x) word: xxxyxzzx I want find the periodicity of a given word. For example ababab has periodicity 3 and ...
62 views

### Why is (1-t)^2 == (t-1)^2 in SageMath?

This is really odd, not much to say about it. ...
80 views

### Command to compute the number of $5$-colorings of all $(2k, k^2)$-graphs

I would like Sage to compute the number of all $5$-colorings of graphs on $2k$ vertices and $k^2$ edges with clique number 3 for a specified $k \geq 1$. I know how to ask call nauty and ask sage to ...
67 views

56 views

### How to make a list of variables in Magma(computer algebra system)?

In sagemath, for making a list of variables like $Z=[z00,z01,z02, ... ,z97,z98,z99]$ we can use this code: ...
57 views

### Find Tangent Points of Circle and Two Lines in First Quadrant

I need to define explicit expressions to find the points (x1,y1) and (x2,y2), which are the two tangent points of a circle with radius r (known) and two lines (equations known). The center of the ...
25 views

### What are the conditions on using Eisenstein reduction of ternary quadratic forms?

The ternary quadratic form $Q(x,y,z) = -3 x^2 + 3 x y + 3 x z - y^2 - y z - z^2$ is not positive definite. In Sage, using code found in this link, Q = TernaryQF([-3, -1, -1, -1, 3, 3]) Qr, m = Q....
28 views

### Minimum Spanning set for a given vector

I have a matrix $M \in \mathbb{Q}_{r \times c}$, where $r << c$ and I want to know what is the minimum number $s$ such that some $s$ columns of the matrix span a given vector $v \in \mathbb{Q}^r$...
92 views

### Division polynomial of a super-singular vs ordinary Elliptic Curve

For an Elliptic Curve in Finite Field of characteristic $p$, I'm trying to understand how the division polynomial for multiplication by field-characteristic differs between an ordinary curve and a ...
41 views

### Minimizing function with inequality constraints in R^n

I have a point $p$ in $R^n$, and I need to find the point $q$ which minimizes a distance function $f(p,q)$ with a number of constraints on $q$ (namely, $q$ needs to represent a probability ...
15 views

### sage : plotting graph with dotted edges

I need to draw a graph in which some edges are usual and some edges are dotted. I know how to make all the edges dotted (using the option "dotted" for the parameter edge_style of plot). But I need ...
33 views

### Show poset in sage enlarging it

I happen to have a finite poset, and when there are many elements and relations in my poset and I type Poset.show() (suppose the name of my poset is Poset), it will create the hasse diagram but you ...
100 views

### Example of addition of Twisted Edwards Curve on Sage, Python,..

Can somebody tell me how can I make a example of addition in Twisted Edwards Curve on sage? For example: $ax^2 + y^2 = 1 + dx^2y^2$ Given the following twisted Edwards curve with $a=3$ and $d=2$: ...
50 views

### Polynomial Ring on Sage

Somebody can explain me what does this function do? ...
16 views

### natural sub-class of trees in Sage

I want to calculate certain parameter for class of trees like path graphs, star graphs. I dont want to calculate it for all trees with n vertices as this wont help me in my problem. Basically I need a ...
127 views

### how can I find the character table of $(Z/9Z)^\times$?

I tried using sagemath. But I don't think sagemath is supporting character table of multiplicative groups of $(Z/nZ)^\times$. Also it would be great if you can suggest a way to calculate character ...
132 views

83 views

126 views

### Learn mathematical thinking with open source (SageMath, GeoGebra, …)

Hi do you know a good introduction about mathematical thinking using opensource software like Sage math and/or geogebra ? I found http://abstract.ups.edu/download/aata-20170805-sage-8.0.pdf but I ...