Ask Your Question

rburing's profile - activity

2022-08-08 11:32:41 +0200 answered a question unable to coerce <class 'sage.monoids.string_monoid_element.StringMonoidElement'> to an integer

If you want to XOR you can just use integers directly with the ^^ operator in SageMath (or ^ in Python). Integers can be

2022-08-08 11:05:10 +0200 answered a question compose (non-)symbolic functions

Your first (original) attempt can be fixed by making k and K symbolic, and using substitution: import scipy.stats n=20

2022-07-23 20:49:00 +0200 edited answer Why, in any system of equations, does Sage give repeated solutions only once?

Here are the roots with multiplicities, using a different solution method: sage: R.<a,b,c,d,e,f,g,x> = QQ[] sage:

2022-07-23 20:47:10 +0200 answered a question Why, in any system of equations, does Sage give repeated solutions only once?

Here are the roots with multiplicities, using a different solution method: sage: R.<a,b,c,d,e,f,g,x> = QQ[] sage:

2022-07-16 11:27:04 +0200 answered a question In a system of 5 nonlinear equations with 5 unknowns using the solve command, Sage gives 5 lists of 5 solutions. Is it possible to print only one list with the 5 third solutions?

Yes it's possible like this: sage: var('a,b,c,d,e,f,g,h,i,j,k,l,x,y,p,q,r,s,t,u,v,A,B,C,D,E,F,G,H,T,K,L,M,N') sage: sol

2022-07-07 13:43:31 +0200 received badge  Necromancer (source)
2022-07-07 13:32:39 +0200 answered a question how to find standard monomials of an Ideal?

A basis of the quotient ring $K[x_1,\ldots,x_n]/I$ as a $K$-vector space is also called a normal basis of the ideal $I$.

2022-07-06 08:02:42 +0200 commented question Ubuntu on Windows cannot open notebook

Note Serving notebooks from local directory: /home/vickram, which could explain "no directories present". You could star

2022-07-02 08:13:15 +0200 commented question Creating a polynomial from a string with symbolic constants

Why do you need to define a polynomial from a string? Sounds like it could be an XY problem.

2022-06-19 05:58:45 +0200 received badge  Nice Answer (source)
2022-06-18 13:24:15 +0200 answered a question How to define a matrix with variables in SageMath?

Symbolic matrix: sage: matrix(SR, 3, 2, lambda i,j: var('x_{}_{}'.format(i,j))) [x_0_0 x_0_1] [x_1_0 x_1_1] [x_2_0 x_2_

2022-06-17 20:19:14 +0200 received badge  Nice Answer (source)
2022-06-15 20:59:28 +0200 answered a question Correct syntax for "solve(f.derivative(x1,x2)==(0,0))"

The result of Df(x1,x2) is a vector with symbolic entries, and testing equality with the tuple (0, 0) returns False, hen

2022-05-05 12:01:23 +0200 commented question Order of coefficients of univariate polynomial: Bug or Feature?

That inconsistent behavior in the univariate case looks undesirable to me, but changing it would break compatibility wit

2022-05-04 16:42:36 +0200 commented question Subextension over non-prime subfield as a quotient

You can map z in L0 to one of z.minpoly().change_ring(L).roots(multiplicities=False) in L. Unfortunately defining a homo

2022-05-02 07:48:18 +0200 commented answer Find expansion of polynomial in an ideal

That p does not belong to that I, so no valid choice of c exists in that case. Did you make a typing mistake somewhere i

2022-05-02 07:47:41 +0200 commented answer Find expansion of polynomial in an ideal

That p does not belong to that I, so no valid choice of c exists. Did you make a typing mistake somewhere in your input?

2022-04-28 16:48:28 +0200 received badge  Nice Answer (source)
2022-04-27 15:45:33 +0200 edited answer Constructing total graph

There is a subdivide_edges method but it doesn't seem to give control over the names of the new vertices. If I understo

2022-04-27 15:39:51 +0200 answered a question Constructing total graph

There is a subdivide_edges method but it doesn't seem to give control over the names of the new vertices. If I understo

2022-04-26 15:46:12 +0200 commented question Minimal Faithful Degree code not working.

The definition of mu looks suspicious, as alph is simply overwritten with each iteration of the loop.

2022-04-24 10:51:32 +0200 commented question Mathematica style formatting of equations in Sage cell

You will need something like a custom Jupyter Widget to achieve this. Such a widget would be usable more generally than

2022-04-24 10:21:32 +0200 answered a question Constructing Cayley Graphs

If you enter PermutationGroupElement? at a SageMath prompt you will see the required format of the input, and that your

2022-04-19 14:14:48 +0200 commented question Understanding SAGE code

Where do you get 0x7f7467c66450 from? It is too large to correspond to an element of the field F.

2022-04-19 14:13:41 +0200 commented question Understanding SAGE code

Where do you get 0x7f7467c66450 from?

2022-04-18 08:40:22 +0200 received badge  Good Answer (source)
2022-04-17 17:39:22 +0200 received badge  Nice Answer (source)
2022-04-17 11:05:13 +0200 edited answer Finding all digraphs up to isomorphism for a given undirected graph using Sage

An efficient way is to use directg from nauty, which is accessible in SageMath through digraphs.nauty_directg. The optio

2022-04-17 11:03:29 +0200 commented answer Finding all digraphs up to isomorphism for a given undirected graph using Sage

I've updated the answer to address the second part of the question.

2022-04-17 10:59:07 +0200 edited answer Finding all digraphs up to isomorphism for a given undirected graph using Sage

An efficient way is to use directg from nauty, which is accessible in SageMath through digraphs.nauty_directg. The optio

2022-04-17 10:46:31 +0200 answered a question Finding all digraphs up to isomorphism for a given undirected graph using Sage

An efficient way is to use directg from nauty, which is accessible in SageMath through digraphs.nauty_directg. The optio

2022-04-17 10:31:53 +0200 commented answer Finding all digraphs up to isomorphism for a given undirected graph using Sage

The break in the code should be continue instead.

2022-04-15 17:07:40 +0200 commented question How can i know if a field is monigenic?

The method from section 5 of Computing power integral bases in algebraic number fields yields that the powers of (c + 1)

2022-04-15 05:25:02 +0200 received badge  Nice Answer (source)
2022-04-15 05:24:22 +0200 received badge  Nice Answer (source)
2022-04-15 05:22:35 +0200 received badge  Nice Answer (source)
2022-04-13 20:13:29 +0200 received badge  Nice Answer (source)
2022-04-13 18:45:16 +0200 commented answer How to make a list of polynomials callable?

Are you sure you want e.polynomial(R)? (Check the parent/ring of the element you get; it is probably not what you want.)

2022-04-13 15:50:38 +0200 answered a question How to make a list of polynomials callable?

You can use MakeCallable = vector: sage: R=PolynomialRing(QQ,5,"x") sage: R.inject_variables() Defining x0, x1, x2, x3,

2022-04-12 17:54:11 +0200 commented answer Append Set to Set

You can't really, unless you make a custom type, or call a custom printing function. I offer SageMath's Set as an altern

2022-04-12 17:52:32 +0200 edited answer Append Set to Set

To circumvent this problem the frozenset (which can't be modified after creation) was invented: sage: a.add(frozenset(b

2022-04-12 17:44:17 +0200 answered a question Append Set to Set

To circumvent this problem the frozenset (which can't be modified after creation) was invented: sage: a.add(frozenset(b

2022-04-12 15:58:36 +0200 edited answer ExtGCD in Finite Fields

You are operating on the wrong types. The extended euclidean algorithm takes polynomials as input and returns polynomial

2022-04-12 15:57:08 +0200 edited answer ExtGCD in Finite Fields

You are operating on the wrong types. The extended euclidean algorithm takes polynomials as input and returns polynomial

2022-04-12 15:55:54 +0200 answered a question ExtGCD in Finite Fields

You are operating on the wrong types. The extended euclidean algorithm takes polynomials as input. Elements of a finite

2022-04-12 15:38:36 +0200 answered a question Multiply Arbitrary Permutations

You can define the symmetric group on your set instead: sage: P = SymmetricGroup(var('x,y,z')); P Symmetric group of or

2022-04-09 19:12:56 +0200 received badge  Good Answer (source)
2022-04-09 13:46:29 +0200 answered a question Reducing an expressing modulo a variable expression

For a symbolic approach you can use a substitution with a wildcard: sage: var('p,a') sage: f = (a*p+1)^2 sage: w0 = SR.

2022-04-07 17:21:45 +0200 received badge  Nice Answer (source)
2022-04-07 11:26:47 +0200 commented question submit a job to a supercomputer using slurm

Your bash script should say e.g. sage HPC2.sage instead of trying to use two lines like that. Whoever offers access to t