Ask Your Question

FabianG's profile - activity

2024-01-02 07:35:10 +0200 received badge  Popular Question (source)
2023-09-13 05:24:14 +0200 received badge  Notable Question (source)
2023-08-10 14:33:13 +0200 received badge  Notable Question (source)
2023-06-06 16:01:04 +0200 received badge  Notable Question (source)
2023-06-06 16:01:04 +0200 received badge  Popular Question (source)
2022-10-15 13:24:34 +0200 received badge  Popular Question (source)
2022-10-03 11:53:16 +0200 received badge  Popular Question (source)
2021-08-12 01:30:48 +0200 commented question Is there a way in sagemath assisted by mathematics to find only and exclusively the first valid solution without calculating the other solutions?

If you do not know what solvedoes, you also won't know the time complexity of your algorithm...

2021-08-09 11:31:39 +0200 commented question How do I calculate the first solution, without calculating all the others?

I could not open the screenshots. You could take a look at what solveactually calls in your case and then try to call it

2021-08-08 01:25:40 +0200 commented question How do I calculate the first solution, without calculating all the others?

If this is your actual problem, in this case, you could directly ask for 3^(1/100) for instance. If you are interested i

2021-08-05 12:31:06 +0200 commented question Lower-level Singular interface / turn off unneeded PARI calculations

Thanks, that is mostly what I resolved to do. In the process, I also need to factorize univariate polynomials over said

2021-08-05 12:30:21 +0200 commented question Lower-level Singular interface / turn off unneeded PARI calculations

Thanks, that is mostly what I resolved to do. In the process, I also need to factorize univariate polynomials over the n

2021-08-04 23:10:24 +0200 edited question Lower-level Singular interface / turn off unneeded PARI calculations

Lower-level Singular interface / turn off unneeded PARI calculations I am trying to implement an efficient elimination a

2021-08-02 12:56:58 +0200 commented question Combining sets with a matrix

all tests whether all elements in a sequence evaluate to True

2021-08-02 12:55:21 +0200 commented question Combining sets with a matrix

With matrix(ZZ, n)you get an n times n matrix over the integers filled with zeros. Then you can set the entries one by o

2021-08-02 12:55:07 +0200 commented question Combining sets with a matrix

With matrix(ZZ, n)you get an n times n matrix over the integers filled with zeros. Then you can set the entries one by o

2021-08-02 09:56:50 +0200 commented question Rooted Product Graphs on Sagemath

This does not seem to be implemented in Sage, but you can use the formulas from the wikipedia article and the add_edge()

2021-08-02 09:56:37 +0200 commented question Rooted Product Graphs on Sagemath

This does not seem to be implemented in Sage, but you can use the formulas from the wiipedia article and the add_edge()

2021-07-30 12:35:43 +0200 received badge  Nice Question (source)
2021-07-30 11:54:25 +0200 received badge  Organizer (source)
2021-07-30 11:54:03 +0200 edited question Lower-level Singular interface / turn off unneeded PARI calculations

Turn off unneeded PARI calculations I am trying to implement an efficient elimination and substitution procedure for cal

2021-07-30 11:54:01 +0200 edited question Lower-level Singular interface / turn off unneeded PARI calculations

Turn off unneeded PARI calculations I am trying to implement an efficient elimination and substitution procedure for cal

2021-07-30 10:36:09 +0200 edited question Lower-level Singular interface / turn off unneeded PARI calculations

Turn off unneeded PARI calculations I am trying to implement an efficient elimination and substitution procedure for cal

2021-07-30 10:12:42 +0200 asked a question Lower-level Singular interface / turn off unneeded PARI calculations

Turn off unneeded PARI calculations I am trying to implement an efficient elimination and substitution procedure for cal

2021-07-28 21:07:48 +0200 received badge  Self-Learner (source)
2021-07-28 19:17:20 +0200 edited question Polynomial ring conversion error

Polynomial ring conversion error I am trying to recursively solve a (zero-dimensional) system of polynomial equations in

2021-07-28 19:16:52 +0200 edited question Polynomial ring conversion error

Polynomial ring conversion: potential bug I am trying to recursively solve a (zero-dimensional) system of polynomial equ

2021-07-28 19:16:02 +0200 marked best answer Polynomial ring conversion error

I am trying to recursively solve a (zero-dimensional) system of polynomial equations in multiple variables by calculating elimination ideals, solving the resulting univariate polynomials algebraically and plugging the roots in to the original equations in order to remove a variable.

For this, it is necessary to observe within Sage that after plugging in a value for one variable, the result is then a polynomial in fewer variables. The following code shows an example where the coercion into a polynomial ring in fewer variables works in the first step but fails in the second (although in both steps the polynomial does not even contain the variable to be eliminated):

R.<x, y, s, t> = QQ[]
g = x * y

f1 = PolynomialRing(QQ, t)(t - 1)
L1.<a1> = QQ.extension(f1)
R1 = PolynomialRing(L1, [x, y, s])
g = g.change_ring(L1)    # allow coefficients in L1
g = g(x, y, s, a1)       # plug in t := a1
g = R1(g)                # regard as polynomial in fewer variables
assert parent(g) == R1   # works

f2 = PolynomialRing(L1, s)(s - 1)
L2.<a2> = L1.extension(f2)
R2 = PolynomialRing(L2, [x, y])
g = g.change_ring(L2)
g = g(x, y, a2)
g = R2(g)    # fails: "TypeError: not a constant polynomial"

(Note that this is a toy example, my code tries to achieve the same for arbitrary $R$, $f_i$'s and $g$.)

2021-07-28 19:15:54 +0200 answered a question Polynomial ring conversion error

The issue is that x, y still refer to the old variables in the polynomial ring with four variables. It works when adding

2021-07-28 16:35:56 +0200 edited question Polynomial ring conversion error

Polynomial ring conversion: potential bug I am trying to recursively solve a (zero-dimensional) system of polynomial equ

2021-07-28 16:30:25 +0200 asked a question Polynomial ring conversion error

Polynomial ring conversion: potential bug I am trying to recursively solve a (zero-dimensional) system of polynomial equ

2021-07-02 00:27:42 +0200 answered a question why can't I compute the zeros of an integer polynomial using solve()?

The two methods use different approaches under the hood. The second method computes the factorization of the polynomial

2021-07-01 23:52:06 +0200 answered a question Consider the set of all symmetric matrices of a given size $n$ with entries lying in $\{0,1\}$ such that all diagonal entries are zeros in the matrices.

For even $n = 2k$, you can take a permutation matrix belonging to $k$ disjoint transpositions like $(12)(34)\ldots(n-1,n

2021-06-29 10:30:40 +0200 commented answer Bug? Polynomial variable name matters

thank you!

2021-06-29 10:30:18 +0200 marked best answer Bug? Polynomial variable name matters

The following calculation of an intersection of curves over QQbar raises an error within Singular on Sage v9.2.

P.<a, y, z> = ProjectiveSpace(QQbar, 2)
f = a^3 + z^3
C = Curve(f)
g = (a + y)^3 + z^3
D = Curve(g)
print(C.intersection_points(D))

It does work when replacing the variable name a by x.

I assume this is a bug but could not trace it down to the internals of rational_points and the Singular interface. The variables band d work, whereas c raises a different error. Does anyone know more about that? Is it already fixed in the newer versions? Should I post this as a ticket on https://trac.sagemath.org?

2021-06-28 18:06:14 +0200 received badge  Good Question (source)
2021-06-28 17:20:26 +0200 received badge  Nice Question (source)
2021-06-28 13:54:17 +0200 edited question Bug? Polynomial variable name matters

Bug? Polynomial variable name matters The following calculation of an intersection of curves over QQbar raises an error

2021-06-28 13:13:57 +0200 asked a question Bug? Polynomial variable name matters

Bug? Polynomial variable name matters The following calculation of an intersection of curves over QQbar raises an error

2021-06-25 17:42:53 +0200 received badge  Supporter (source)
2021-06-25 17:42:15 +0200 marked best answer Is parallel computation with mpi4py still supported?

I am working with Sage code which calculates many independent instances of a problem and is thus fully parallelizable. Now, I would like to port it to a multi-node cluster environment.

My current idea is to use a main process which manages a problem instance queue from which worker processes fetch instances, solve them and save their results to the file system. In the multi-node environment, I understand that some form of message passing is needed to communicate the problem instances to the workers (ruling out task queue management with the @parallel decorator). I have found that the Python package mpi4py provides Python bindings for the Message Passing Interface. It also implements a very convenient MPIPoolExecutor class which manages such a task queue.

The current Sage (9.3) documentation includes a thematic tutorial on mpyi4py mentioning that mpi4py is supported in Sage by means of an optional package. However, I do not find it in the list of optional packages for Sage 9.3 and on my current v9.2 install, the method optional_packages() also does not list it (and neither the other required openmpi package).

Is mpi4py still supported in a current Sage version? Would it be much effort to try and build it for the current version like it was done for openmpi in Sage Trac ticket 8537?

Or are there other recommendations for task distribution with Sage in a multi-node environment?

2021-06-25 17:42:15 +0200 received badge  Scholar (source)
2021-06-25 16:59:00 +0200 received badge  Self-Learner (source)
2021-06-25 16:56:20 +0200 commented question Is parallel computation with mpi4py still supported?

Thank you! It did work! I wrote this as an answer, but couldn't accept it, and all the credit should of course go to you

2021-06-25 16:54:02 +0200 answered a question Is parallel computation with mpi4py still supported?

As suggested by rburing, I installed the (Ubuntu packages) openmpi-bin and openmpi-common via the system package manager

2021-06-25 16:53:48 +0200 commented question Is parallel computation with mpi4py still supported?

Thank you! It did work! I wrote and accepted this as an answer, but all the credit should of course go to you :)