Ask Your Question

Max Alekseyev's profile - activity

2024-07-24 22:02:15 +0200 commented question Pickling error with multiprocessing

Have you tried to use built-in Sage's parallel computing functionality? https://doc.sagemath.org/html/en/reference/paral

2024-07-23 17:20:42 +0200 commented question Pickling error with multiprocessing

Your code works fine in Sagecell

2024-07-21 00:52:07 +0200 answered a question convert symbolic matrix to numeric one

You can perform substitution in each element: M.apply_map(lambda t: t.subs(subsdict))

2024-07-20 09:36:48 +0200 received badge  Nice Answer (source)
2024-07-19 20:59:17 +0200 answered a question An Exercicse from A=B

Function $r(n,k)$ and thus $g(n,k)$ can be computed from $f(n,k)$ as follows: var('k n') f(n,k) = factorial(n)^4 / fact

2024-07-18 19:20:57 +0200 received badge  Nice Answer (source)
2024-07-16 22:25:32 +0200 commented question How to use GF() on a very large finite field ?

For a composite, which is not a prime power, one can try to work in the corresponding ring defined via Zmod().

2024-07-16 19:48:01 +0200 commented question How to use GF() on a very large finite field ?

Can you illustrate the issue with an actual code example?

2024-07-15 20:55:17 +0200 commented question Does there exists any simple connected graph $G$ of order $n$, such that whenever $\dfrac{\lambda}{k}$ is an eigenvalue of the adjacency matrix of $G$

See code for a similar problem at https://ask.sagemath.org/question/59220/

2024-07-05 14:51:20 +0200 commented question About Grobner basis

When the number of solutions is finite, you can get them by calling .variety() method of the ideal. Unfortunately, this

2024-07-05 14:43:41 +0200 commented question Finding integer solutions to systems of polynomial equations

There may be infinitely many solutions to your equation. What kind of answer do you expect in that case?

2024-07-02 19:06:22 +0200 commented question mini-AES inconsistent implementation between v4.5.1 and v10.3

It's https://github.com/sagemath/sage/issues/38298

2024-07-02 19:05:24 +0200 commented answer get the coefficients from the polynomial of several variables

One can avoid specifying n at all by using InfinitePolynomialRing.

2024-07-02 11:02:16 +0200 commented answer Trouble with subs

Please update your question with more details, or better ask a new one.

2024-07-02 11:02:04 +0200 commented answer Trouble with subs

Please update your question with more details, better ask a new one.

2024-07-01 16:56:31 +0200 commented answer Trouble with subs

That's because your substitutions are inconsistent with each other: multiplying E*E==-1/6, L*L==-1/2, gives E*E*L*L==1/1

2024-07-01 16:55:57 +0200 commented answer Trouble with subs

That's because your substitutions are inconsistent with each other: multiplying E*E==-1/6, L*L==-1/2, gives E*E*L*L==1/1

2024-07-01 16:55:42 +0200 commented answer Trouble with subs

That's because your substitutions are "inconsistent": multiplying E*E==-1/6, L*L==-1/2, gives E*E*L*L==1/12; however mul

2024-07-01 16:53:48 +0200 commented answer Trouble with subs

That's because your substitutions are "inconsistent": multiplying E*E==-1/6, L*L==-1/2, gives E*E*L*L==1/12; however mul

2024-07-01 15:56:13 +0200 edited question how to display the list of all monomials occurring in a polynomial

how to display the set of all monomials occurring in a polynomial let $f=x+y+z+xy$, how to display the list of all monom

2024-07-01 13:40:45 +0200 received badge  Nice Answer (source)
2024-07-01 12:14:12 +0200 edited question get the coefficients from the polynomial of several variables

get the coefficients from the polynomial of several variables I have a polynomial $p(x)=[(x_1-x_2)(x_1-x_3)(x_1-x_4)(x_2

2024-07-01 12:13:59 +0200 edited question get the coefficients from the polynomial of several variables

get the coefficients from the polynomial of several variables I have a polynomial $p(x)=\[(x_1-x_2)(x_1-x_3)(x_1-x_4)(x_

2024-07-01 12:06:45 +0200 edited question get the coefficients from the polynomial of several variables

get the coefficients from the Polynomial polynomial of several variables I have a polynomial $p(x)=(x_1-x_2)(x_1-x_3)(x_

2024-07-01 10:40:43 +0200 answered a question get the coefficients from the polynomial of several variables

Like this: K.<x_1,x_2,x_3,x_4> = QQ[] p = (x_1-x_2)*(x_1-x_3)*(x_1-x_4)*(x_2-x_3)*(x_2-x_4)*(x_3-x_4)^18*(x_1^2+x

2024-06-29 14:29:01 +0200 received badge  Good Answer (source)
2024-06-28 21:19:34 +0200 received badge  Nice Answer (source)
2024-06-28 18:59:30 +0200 received badge  Nice Answer (source)
2024-06-28 18:29:16 +0200 answered a question Replacing an expression by another in the ring of polynomials

f % (x*y^2 - z) will do the job: K.<x,y,z> = ZZ[] f = x*y^2 + x + y + z print( f % (x*y^2 - z) )

2024-06-28 15:59:10 +0200 received badge  Good Answer (source)
2024-06-28 12:18:51 +0200 commented answer Trouble with subs

Yes, they are commutative.

2024-06-28 11:29:18 +0200 received badge  Nice Answer (source)
2024-06-28 07:45:29 +0200 commented question mini-AES inconsistent implementation between v4.5.1 and v10.3

Please report the issue at https://github.com/sagemath/sage/issues

2024-06-28 07:43:12 +0200 edited answer Trouble with subs

One can have a better control such substitutions using polynomial machinery, reducing a polynomial modulo the ideal gene

2024-06-28 07:40:33 +0200 answered a question Implementing characters inside the function

It is always a good idea to avoid generic symbolic ring in favor of more specific classes, which typically provide rich

2024-06-28 07:19:11 +0200 answered a question Computing the time of execution

You can use time module for that purpose - like this: import time start_time = time.time() # ...whatever code... end_t

2024-06-28 07:15:03 +0200 edited answer Trouble with subs

One can have a better control such substitutions using polynomial machinery, reducing a polynomial modulo the ideal gene

2024-06-28 07:14:29 +0200 answered a question Trouble with subs

One can have a better control such substitutions using polynomial machinery, reducing a polynomial modulo the ideal gene

2024-06-25 17:03:29 +0200 edited question "==" with symbolics is doing unwanted boolean comparison

"==" with symbolics is doing unwanted boolean comparison parameters var('v0 t', domain='positive') generic funtions

2024-06-25 16:41:33 +0200 answered a question Ordering a list of triplets according to lexical order

Lexicographic order is the default one for tuples. So, you can simply use sorted() function or .sort() method on your li

2024-06-25 16:38:17 +0200 answered a question "==" with symbolics is doing unwanted boolean comparison

It is convenient to keep equations in the form expression == 0 and furthermore functions dealing with equations will typ

2024-06-25 16:25:50 +0200 commented question Error: trying to find the normal subgroups of a given group

The thing is that group-theoretic functionality is implemented at large for permutation groups only (via GAP). So, you m

2024-06-25 16:25:20 +0200 commented question Error: trying to find the normal subgroups of a given group

The thing is that group-theoric functionality is implemented at large for permutation groups only (via GAP). So, you may

2024-06-24 20:29:27 +0200 received badge  Nice Answer (source)
2024-06-23 18:11:52 +0200 answered a question Generating two integers with conditions

This question has nothing to do with Sage, and furthermore what is asked is impossible. We have $\log_N(2^{58}) \leq \al

2024-06-20 20:44:08 +0200 received badge  Nice Answer (source)
2024-06-20 06:23:25 +0200 received badge  Nice Answer (source)
2024-06-20 02:11:43 +0200 commented answer Generate a random integer with some condition

It depends on the type of condition. Any modular condition can be treated similarly to what's done in my answer.

2024-06-20 02:06:29 +0200 commented answer Generate a random integer with some condition

What specific condition?

2024-06-20 01:42:15 +0200 answered a question Generate a random integer with some condition

$3e\equiv 1\pmod5$ means that $e=5k+2$ for some $k$. Then $e$ having $n=71$ bits means $e\in[2^{n-1},2^n-1]$, which tran